Skip to content

Commit d187fb0

Browse files
committed
programs/unixbench/run: run under x for graphical tests
Signed-off-by: Philip Li <[email protected]>
1 parent e4a349c commit d187fb0

File tree

4 files changed

+57
-26
lines changed

4 files changed

+57
-26
lines changed

jobs/unixbench.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@ unixbench:
3838
- hanoi
3939
- grep
4040
- sysexec
41+
42+
---
43+
# execl uses a lot of mmap syscall which will cause perf to record
44+
# a huge amounts of those events. perf record then will not be able
45+
# to finish processing the captured perf.data before the test is done.
46+
perf-profile:
47+
duration: 2
48+
49+
unixbench:
50+
test: execl
51+
52+
---
53+
need_x: true
54+
55+
unixbench:
56+
test:
4157
- 2d-rects
4258
- 2d-lines
4359
- 2d-circle
@@ -49,13 +65,3 @@ unixbench:
4965
- 2d-blit
5066
- 2d-window
5167
- ubgears
52-
53-
---
54-
# execl uses a lot of mmap syscall which will cause perf to record
55-
# a huge amounts of those events. perf record then will not be able
56-
# to finish processing the captured perf.data before the test is done.
57-
perf-profile:
58-
duration: 2
59-
60-
unixbench:
61-
test: execl

programs/unixbench/pkg/depends

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ x11-apps
88
libx11-6
99
freeglut3
1010
libgl1-mesa-dri
11+
xinit
12+
xorg

programs/unixbench/run

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,16 @@
88
## of a Unix-like system; hence, multiple tests are used to test
99
## various aspects of the system's performance.
1010

11-
. $LKP_SRC/lib/reproduce-log.sh
12-
. $LKP_SRC/lib/upload.sh
11+
. $LKP_SRC/lib/debug.sh
1312

1413
cd $BENCHMARK_ROOT/unixbench || die "no $BENCHMARK_ROOT/unixbench"
1514

16-
export LANG=C
15+
if [ "$need_x" = true ]; then
16+
mkdir -p /tmp/.X11-unix
17+
chmod 1777 /tmp/.X11-unix
18+
chown root:root /tmp/.X11-unix
1719

18-
[ -n "$runtime" ] || runtime=300
19-
20-
# Each iteration in UnixBench is about 10 seconds
21-
iteration=$(( runtime / 10 ))
22-
23-
[ $test = "shell8" ] && iteration=1
24-
25-
[ -n "$nr_task" ] && other_params="-c $nr_task"
26-
27-
cd UnixBench || exit
28-
log_cmd ./Run $test $other_params -i $iteration || exit
29-
30-
upload_files -t results $BENCHMARK_ROOT/unixbench/UnixBench/results/*
20+
xinit $LKP_SRC/programs/unixbench/xinitrc
21+
else
22+
$LKP_SRC/programs/unixbench/xinitrc
23+
fi

programs/unixbench/xinitrc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
# - runtime
3+
# - test
4+
# - nr_task
5+
6+
## UnixBench is the original BYTE UNIX benchmark suite. The purpose
7+
## of UnixBench is to provide a basic indicator of the performance
8+
## of a Unix-like system; hence, multiple tests are used to test
9+
## various aspects of the system's performance.
10+
11+
. $LKP_SRC/lib/reproduce-log.sh
12+
. $LKP_SRC/lib/upload.sh
13+
14+
cd $BENCHMARK_ROOT/unixbench || die "no $BENCHMARK_ROOT/unixbench"
15+
16+
export LANG=C
17+
18+
[ -n "$runtime" ] || runtime=300
19+
20+
# Each iteration in UnixBench is about 10 seconds
21+
iteration=$(( runtime / 10 ))
22+
23+
[ $test = "shell8" ] && iteration=1
24+
25+
[ -n "$nr_task" ] && other_params="-c $nr_task"
26+
27+
cd UnixBench || exit
28+
log_cmd ./Run $test $other_params -i $iteration || exit
29+
30+
upload_files -t results $BENCHMARK_ROOT/unixbench/UnixBench/results/*

0 commit comments

Comments
 (0)