Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions test
5 changes: 5 additions & 0 deletions user/apps/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Test Tookit Overview
=========================

## Brief Introduction
This Directory contains all using test toolkit and source for DragonOS, including **compatible test** and **performance benchmarks**.
2 changes: 2 additions & 0 deletions user/apps/tests/benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Benchmark Overview
===================
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Please read the update-alternatives(1) man page for information on this
directory and its contents.
8 changes: 8 additions & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/etc/cron.daily/dpkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Skip if systemd is running.
if [ -d /run/systemd/system ]; then
exit 0
fi

/usr/libexec/dpkg/dpkg-db-backup
13 changes: 13 additions & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/etc/dpkg/dpkg.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# dpkg configuration file
#
# This file can contain default options for dpkg. All command-line
# options are allowed. Values can be specified by putting them after
# the option, separated by whitespace and/or an `=' sign.
#

# Do not enable debsig-verify by default; since the distribution is not using
# embedded signatures, debsig-verify would reject all packages.
no-debsig

# Log status changes and actions to a file.
log /var/log/dpkg.log
134 changes: 134 additions & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/etc/gprofng.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Copyright (C) 2021-2024 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
#
# Specify which classes of compiler commentary will be shown
# with annotated source.
scc all

# Specify which classes of compiler commentary will be shown
# with annotated disassembly
dcc all:src

# Set the default function-list metrics
# for heap data, show inclusive leaks and bytes leaked; not allocations
dmetrics i.heapleakbytes:e!heapleakbytes
dmetrics i.heapleakcnt:e!heapleakcnt
dmetrics i.heapallocbytes:e!heapallocbytes
dmetrics i.heapalloccnt:e!heapalloccnt:

# Clock profiling data
# Note: use same display order of LMS_* in: er.rc, TimelineVariable.java,
# Ovw_data.h, BaseMetricTreeNode.cc and Experiment.cc metric registration
dmetrics i!total:e!.total
# Show total cpu time
dmetrics ei%.totalcpu
dmetrics i!.user:e!.user
dmetrics i!system:e!.system
dmetrics i!trap:e!.trap
dmetrics i!lock:e!.lock
dmetrics i!datapfault:e!.datapfault
dmetrics i!textpfault:e!.textpfault
dmetrics i!kernelpfault:e!.kernelpfault
dmetrics i!stop:e!.stop
dmetrics i!wait:e!.wait
dmetrics i!sleep:e!.sleep

# for kernel clock profiling data, show inclusive and exclusive KCPU
dmetrics ei.kcpu
###dmetrics ie.kcpu

# for count data, show exclusive metrics only
dmetrics i!bit:e.bit

# for er_generic data, show exclusive metrics only
dmetrics i!icount:e.icount

# Hide implementation hack. Functionmark column only serves
# to force zero-count functions to be displayed.
dmetrics e!bit_FM

# for kernel profiles, show inclusive and exclusive kucycles and kcycles
# (kucycles and kcycles are for 12.3 and older experiments, Obsolete TBR)
dmetrics ei.kucycles:ei.kcycles
###dmetrics ie.kucycles:ie.kcycles

# for derived HWC metrics, show exclusive only
dmetrics i!IPC:e!.IPC
dmetrics i!CPI:e!.CPI
dmetrics i!K_IPC:e!.K_IPC
dmetrics i!K_CPI:e!.K_CPI

# for HWC, show exclusive only
dmetrics i!hwc:e%.hwc

# for synctrace, show inclusive only
dmetrics i.sync:e!sync
dmetrics i.syncn:e!syncn

# Set the default function-list metrics for OMP profiling
dmetrics i.ompwork:e!ompwork
dmetrics i.ompwait:e!ompwait
dmetrics i!.masterthread:e!.masterthread

#set the default function-list metrics for deadlock detection
dmetrics i!deadlocks:e.deadlocks

# io data
dmetrics i.ioreadtime:e!ioreadtime
dmetrics i.iowritetime:e!iowritetime
dmetrics i.ioothertime:e!ioothertime
dmetrics i.ioerrortime:e!ioerrortime
dmetrics i!.ioreadcnt:e!ioreadcnt
dmetrics i!.ioreadbytes:e!ioreadbytes
dmetrics i!.iowritecnt:e!iowritecnt
dmetrics i!.iowritebytes:e!iowritebytes
dmetrics i!.ioothercnt:e!ioothercnt
dmetrics i!.ioerrorcnt:e!ioerrorcnt

# for any other unnamed metrics, don't show them
dmetrics ie!.any

# don't show size or address; show name
dmetrics !size:!address:name

# Select the default function-list sorting metric
dsort ei.any:name
###dsort ie.any:name

# Set function name style
name long

# Set View mode to user
viewmode user

# Set compare mode
compare off

# Set enabling descendants to on
en_desc on

# Set path where the gprofng libraries are installed
preload_libdirs ../lib:../lib32:../lib64

# Add search path for annotated source and disasm
addpath $expts:.

# Add controls for specific load objects
# object_hide <Unknown>

# gprofng GUI tabs
tabs dsrc:function:timeline:processes:threads:ctree:callflame:src:dis:leaks:ioactivity:ifreq:callers-callees:header

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var/log/alternatives.log {
monthly
rotate 12
compress
delaycompress
missingok
notifempty
create 644 root root
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var/log/dpkg.log {
monthly
rotate 12
compress
delaycompress
missingok
notifempty
create 644 root root
}
19 changes: 19 additions & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/etc/netconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# The network configuration file. This file is currently only used in
# conjunction with the TI-RPC code in the libtirpc library.
#
# Entries consist of:
#
# <network_id> <semantics> <flags> <protofamily> <protoname> \
# <device> <nametoaddr_libs>
#
# The <device> and <nametoaddr_libs> fields are always empty in this
# implementation.
#
udp tpi_clts v inet udp - -
tcp tpi_cots_ord v inet tcp - -
udp6 tpi_clts v inet6 udp - -
tcp6 tpi_cots_ord v inet6 tcp - -
rawip tpi_raw - inet - - -
local tpi_cots_ord - loopback - - -
unix tpi_cots_ord - loopback - - -
21 changes: 21 additions & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/etc/perl/Net/libnet.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Prior to perl 5.8.8-7, libnet was a seperate package with a debconf
# configuration managed config in /etc/libnet.cfg which is used if
# present. Remove the following line, or the old file before making
# changes below.
return do '/etc/libnet.cfg' if -f '/etc/libnet.cfg';

{
nntp_hosts => [ qw {} ],
snpp_hosts => [ qw {} ],
pop3_hosts => [ qw {} ],
smtp_hosts => [ qw {} ],
ph_hosts => [ qw {} ],
daytime_hosts => [ qw {} ],
time_hosts => [ qw {} ],
inet_domain => undef,
ftp_firewall => qq {},
ftp_firewall_type => qq {},
ftp_ext_passive => 0,
ftp_int_passive => 0,
local_netmask => qq {},
}
1 change: 1 addition & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/etc/rmt
1 change: 1 addition & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/usr/bin/ar
1 change: 1 addition & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/usr/bin/as
1 change: 1 addition & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/usr/bin/c++filt
23 changes: 23 additions & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/usr/bin/c89-gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/sh

# Call the appropriate C compiler with options to accept ANSI/ISO C
# The following options are the same (as of gcc-2.95):
# -ansi
# -std=c89
# -std=iso9899:1990

extra_flag=-std=c89

for i; do
case "$i" in
-ansi|-std=c89|-std=iso9899:1990)
extra_flag=
;;
-std=*)
echo >&2 "`basename $0` called with non ANSI/ISO C option $i"
exit 1
;;
esac
done

exec gcc $extra_flag ${1+"$@"}
24 changes: 24 additions & 0 deletions user/apps/tests/benchmark/lmbench/sysroot/usr/bin/c99-gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /bin/sh

# Call the appropriate C compiler with options to accept ANSI/ISO C
# The following options are the same (as of gcc-3.3):
# -std=c99
# -std=c9x
# -std=iso9899:1999
# -std=iso9899:199x

extra_flag=-std=c99

for i; do
case "$i" in
-std=c9[9x]|-std=iso9899:199[9x])
extra_flag=
;;
-std=*|-ansi)
echo >&2 "`basename $0` called with non ISO C99 option $i"
exit 1
;;
esac
done

exec gcc $extra_flag ${1+"$@"}
Loading
Loading