3 # Do a random subset of VM related syscalls.
4 # (Always do mmap, so the child processes have some local maps)
7 TRINITY_PATH
=${TRINITY_PATH:-$OLDPATH}
10 TRINITY_TMP
=$
(mktemp
-d $
(pwd)/tmp
/trinity.XXXXXX
)
12 TRINITY_TMP
=$
(mktemp
-d /tmp
/trinity.XXXXXX
)
15 TRINITY_PATH
=${TRINITY_PATH:-.}
16 TRINITY_TMP
=$
(mktemp
-d /tmp
/trinity.XXXXXX
)
20 if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then
21 echo ERROR
: Taint flag changed $
(cat /proc
/sys
/kernel
/tainted
)
26 TAINT
=$
(cat /proc
/sys
/kernel
/tainted
)
30 ARRAY
[2]="migrate_pages"
38 ARRAY
[10]="munlockall"
41 ARRAY
[13]="remap_file_pages"
49 syscalls
=$
(echo $syscalls -c ${ARRAY[$(($RANDOM % 15))]})
52 echo testing
$syscalls
54 chmod 755 $TRINITY_TMP
55 pushd $TRINITY_TMP > /dev
/null
57 if [ ! -f $TRINITY_PATH/trinity
]; then
63 MALLOC_CHECK_
=2 $TRINITY_PATH/trinity
-q -l off
$syscalls -N 99999 -C 64