-
Notifications
You must be signed in to change notification settings - Fork 202
/
aim7
executable file
·80 lines (67 loc) · 1.7 KB
/
aim7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
# - test
# - load
## AIM7 is a program written in C that forks many processes called
## tasks, each of which concurrently runs in random order a set of
## subtests called jobs. There are 53 kinds of jobs, each of which
## exercises a different aspect of the operating system, such as
## disk-file operations, process creation, user virtual memory
## operations, pipe I/O, and compute-bound arithmetic loops.
[ -n "$test" ] || exit
[ -n "$load" ] || exit
. $LKP_SRC/lib/reproduce-log.sh
aim7_setup()
{
# raise semaphore limit
log_eval 'echo "500 32000 128 512" > /proc/sys/kernel/sem'
# setup workfile
if [ -f "workfiles/workfile.$test" ]; then
log_cmd cp workfiles/workfile.$test workfile
else
# create workfile onlive
log_eval "cat > workfile <<EOF
FILESIZE: 1M
POOLSIZE: 10M
10 $test
EOF"
fi
# setup config file
if [ -n "$mount_points" ]; then
log_eval "echo \"$mount_points\" > config"
else
log_cmd mkdir -p /fs/shm
log_cmd umount /fs/shm > /dev/null 2>&1
log_cmd mount -t tmpfs /dev/shm /fs/shm
log_eval 'echo "/fs/shm" > config'
fi
}
run_aim()
{
export PATH=`pwd`:$PATH
aim7_setup
log_eval "
(
echo $HOSTNAME
echo $test
echo 1
echo $load
echo 2
echo $load
echo 1
) | ./multitask -t &"
# Run multitask in background and wait for it to avoid the below error
# triggered by the kill(0, SIGINT) call in multitask.c
#
# root /lkp/wfg# src/bin/run-local -o rt aim.yaml
# ...
# nanosleep({10, 0}, 0x7fff559ced20) = 0
# kill(0, SIGINT <unfinished ...>
# aim7 pid 55756 exit 130
# /lkp/wfg/src/bin/run-job: Interrupt
#
# AIM Multiuser Benchmark - Suite VII Testing over....
#
wait
}
cd $BENCHMARK_ROOT/aim7 || die "aim7 benchmark is not installed yet"
run_aim