"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "kernel-coverage.sh" between
stress-ng-0.12.09.tar.xz and stress-ng-0.12.10.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

kernel-coverage.sh  (stress-ng-0.12.09.tar.xz):kernel-coverage.sh  (stress-ng-0.12.10.tar.xz)
skipping to change at line 153 skipping to change at line 153
dd if=/dev/zero of=${FSIMAGE} bs=1M count=1024 dd if=/dev/zero of=${FSIMAGE} bs=1M count=1024
;; ;;
tmpfs) MKFS_CMD="true" tmpfs) MKFS_CMD="true"
MKFS_ARGS="" MKFS_ARGS=""
MNT_CMD="sudo mount -t tmpfs -o size=1G,nr_inodes=10k,mod e=777 tmpfs ${MNT}" MNT_CMD="sudo mount -t tmpfs -o size=1G,nr_inodes=10k,mod e=777 tmpfs ${MNT}"
;; ;;
ramfs) MKFS_CMD="true" ramfs) MKFS_CMD="true"
MKFS_ARGS="" MKFS_ARGS=""
MNT_CMD="sudo mount -t ramfs -o size=1G ramfs ${MNT}" MNT_CMD="sudo mount -t ramfs -o size=1G ramfs ${MNT}"
;; ;;
reiserfs)
MKFS_CMD="mkfs.reiserfs"
MKFS_ARGS="-q -f ${FSIMAGE}"
MNT_CMD="sudo mount -o loop ${FSIMAGE} ${MNT}"
dd if=/dev/zero of=${FSIMAGE} bs=1M count=1024
;;
*) *)
echo "unsupported file system $1" echo "unsupported file system $1"
return 1 return 1
;; ;;
esac esac
if which ${MKFS_CMD} ; then if which ${MKFS_CMD} ; then
echo ${MKFS_CMD} ${MKFS_ARGS} echo ${MKFS_CMD} ${MKFS_ARGS}
sudo ${MKFS_CMD} ${MKFS_ARGS} sudo ${MKFS_CMD} ${MKFS_ARGS}
rc=$? rc=$?
skipping to change at line 235 skipping to change at line 241
echo "FINISHED: $(date '+%F %X') using $* $ARGS (return $?)" >> $LOG echo "FINISHED: $(date '+%F %X') using $* $ARGS (return $?)" >> $LOG
sync sync
clear_journal clear_journal
} }
if [ -e $PERF_PARANOID ]; then if [ -e $PERF_PARANOID ]; then
paranoid_saved=$(cat /proc/sys/kernel/perf_event_paranoid) paranoid_saved=$(cat /proc/sys/kernel/perf_event_paranoid)
(echo 0 | sudo tee $PERF_PARANOID) > /dev/null (echo 0 | sudo tee $PERF_PARANOID) > /dev/null
fi fi
core_pattern_saved="$(cat /proc/sys/kernel/core_pattern)"
echo core | sudo tee /proc/sys/kernel/core_pattern >& /dev/null
# #
# Try to ensure that this script and parent won't be oom'd # Try to ensure that this script and parent won't be oom'd
# #
if [ -e /proc/self/oom_score_adj ]; then if [ -e /proc/self/oom_score_adj ]; then
echo -900 | sudo tee /proc/self/oom_score_adj >& /dev/null echo -900 | sudo tee /proc/self/oom_score_adj >& /dev/null
echo -900 | sudo tee /proc/$PPID/oom_score_adj >& /dev/null echo -900 | sudo tee /proc/$PPID/oom_score_adj >& /dev/null
elif [ -e /proc/self/oom_adj ]; then elif [ -e /proc/self/oom_adj ]; then
echo -14 | sudo tee /proc/self/oom_adj >& /dev/null echo -14 | sudo tee /proc/self/oom_adj >& /dev/null
echo -14 | sudo tee /proc/$PPID/oom_adj >& /dev/null echo -14 | sudo tee /proc/$PPID/oom_adj >& /dev/null
fi fi
skipping to change at line 267 skipping to change at line 276
sudo swapon $SWAP sudo swapon $SWAP
sudo lcov --zerocounters sudo lcov --zerocounters
if [ -f /sys/kernel/debug/tracing/trace_stat/branch_all ]; then if [ -f /sys/kernel/debug/tracing/trace_stat/branch_all ]; then
sudo cat /sys/kernel/debug/tracing/trace_stat/branch_all > branch_all.st art sudo cat /sys/kernel/debug/tracing/trace_stat/branch_all > branch_all.st art
fi fi
DURATION=180 DURATION=180
do_stress --dev 32 do_stress --dev 32
for FS in bfs btrfs ext4 f2fs fat hfs hfsplus jfs minix nilfs ntfs ramfs tmpfs u bifs udf vfat xfs for FS in bfs btrfs ext4 f2fs fat hfs hfsplus jfs minix nilfs ntfs ramfs reiserf s tmpfs ubifs udf vfat xfs
do do
echo "Filesystem: $FS" echo "Filesystem: $FS"
if mount_filesystem $FS; then if mount_filesystem $FS; then
DURATION=10 DURATION=10
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts direct,utimes --tem do_stress --hdd -1 --hdd-ops 50000 --hdd-opts direct,utimes --te
p-path $MNT mp-path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts dsync --temp-path $M do_stress --hdd -1 --hdd-ops 50000 --hdd-opts dsync --temp-path $
NT MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts iovec,noatime --temp do_stress --hdd -1 --hdd-ops 50000 --hdd-opts iovec,noatime --tem
-path $MNT p-path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fsync,syncfs --temp- do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fsync,syncfs --temp
path $MNT -path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fdatasync --temp-pat do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fdatasync --temp-pa
h $MNT th $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts rd-rnd,wr-rnd,fadv-r do_stress --hdd -1 --hdd-ops 50000 --hdd-opts rd-rnd,wr-rnd,fadv-
nd --temp-path $MNT rnd --temp-path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts rd-seq,wr-seq --temp do_stress --hdd -1 --hdd-ops 50000 --hdd-opts rd-seq,wr-seq --tem
-path $MNT p-path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fadv-normal --temp-p do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fadv-normal --temp-
ath $MNT path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fadv-noreuse --temp- do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fadv-noreuse --temp
path $MNT -path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fadv-rnd --temp-path do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fadv-rnd --temp-pat
$MNT h $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fadv-seq --temp-path do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fadv-seq --temp-pat
$MNT h $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fadv-willneed --temp do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fadv-willneed --tem
-path $MNT p-path $MNT
do_stress --hdd 0 --hdd-ops 50000 --hdd-opts fadv-dontneed --temp do_stress --hdd -1 --hdd-ops 50000 --hdd-opts fadv-dontneed --tem
-path $MNT p-path $MNT
do_stress --verity 0 --temp-path $MNT do_stress --verity -1 --temp-path $MNT
DURATION=10 DURATION=10
sudo $STRESS_NG --class filesystem --ftrace --seq 0 -v --timestam sudo $STRESS_NG --class filesystem --ftrace --seq -1 -v --timesta
p --syslog -t $DURATION --temp-path $MNT mp --syslog -t $DURATION --temp-path $MNT
sudo $STRESS_NG --class io --ftrace --seq 0 -v --timestamp --sysl sudo $STRESS_NG --class io --ftrace --seq -1 -v --timestamp --sys
og -t $DURATION --temp-path $MNT log -t $DURATION --temp-path $MNT
DURATION=5
do_stress --sysinfo -1 --temp-path $MNT
umount_filesystem $FS umount_filesystem $FS
fi fi
done done
# #
# Exercise I/O schedulers # Exercise I/O schedulers
# #
DURATION=20 DURATION=20
scheds=$(${STRESS_NG} --sched which 2>&1 | tail -1 | cut -d':' -f2-) scheds=$(${STRESS_NG} --sched which 2>&1 | tail -1 | cut -d':' -f2-)
for s in ${scheds} for s in ${scheds}
do do
sudo ${STRESS_NG} --sched $s --cpu 0 -t 5 --timestamp --tz --syslog --per sudo ${STRESS_NG} --sched $s --cpu -1 -t 5 --timestamp --tz --syslog --pe
f --no-rand-seed --times --metrics rf --no-rand-seed --times --metrics
sudo ${STRESS_NG} --sched $s --cpu 0 -t 5 --sched-reclaim --timestamp --t sudo ${STRESS_NG} --sched $s --cpu -1 -t 5 --sched-reclaim --timestamp --
z --syslog --perf --no-rand-seed --times --metrics tz --syslog --perf --no-rand-seed --times --metrics
done done
# #
# Exercise ionice classes # Exercise ionice classes
# #
ionices=$(${STRESS_NG} --ionice-class which 2>&1 | tail -1 | cut -d':' -f2-) ionices=$(${STRESS_NG} --ionice-class which 2>&1 | tail -1 | cut -d':' -f2-)
for i in ${innices} for i in ${innices}
do do
do_stress --ionice-class $i --iomix 0 -t 20 do_stress --ionice-class $i --iomix -1 -t 20
done done
# #
# Exercise all stressors, limit to 1 CPU for ones that # Exercise all stressors, limit to 1 CPU for ones that
# can spawn way too many processes # can spawn way too many processes
# #
DURATION=15 DURATION=15
for S in $STRESSORS for S in $STRESSORS
do do
case $S in case $S in
skipping to change at line 336 skipping to change at line 347
;; ;;
esac esac
done done
DURATION=60 DURATION=60
do_stress --all 1 do_stress --all 1
# #
# Exercise various stressor options # Exercise various stressor options
# #
do_stress --brk 0 --brk-notouch --vmstat 1 do_stress --brk -1 --brk-notouch --vmstat 1
do_stress --brk 0 --brk-mlock do_stress --brk -1 --brk-mlock
do_stress --cpu 0 --sched batch --thermalstat 1 do_stress --cpu -1 --sched batch --thermalstat 1
do_stress --cpu 0 --taskset 0,2 --ignite-cpu do_stress --cpu -1 --taskset 0,2 --ignite-cpu
do_stress --cpu 0 --taskset 1,2,3 do_stress --cpu -1 --taskset 1,2,3
do_stress --cpu 0 --taskset 0,1,2 --thrash do_stress --cpu -1 --taskset 0,1,2 --thrash
do_stress --cyclic 0 --cyclic-policy deadline do_stress --cyclic -1 --cyclic-policy deadline
do_stress --cyclic 0 --cyclic-policy fifo do_stress --cyclic -1 --cyclic-policy fifo
do_stress --cyclic 0 --cyclic-policy rr do_stress --cyclic -1 --cyclic-policy rr
do_stress --cyclic 0 --cyclic-method clock_ns do_stress --cyclic -1 --cyclic-method clock_ns
do_stress --cyclic 0 --cyclic-method itimer do_stress --cyclic -1 --cyclic-method itimer
do_stress --cyclic 0 --cyclic-method poll do_stress --cyclic -1 --cyclic-method poll
do_stress --cyclic 0 --cyclic-method posix_ns do_stress --cyclic -1 --cyclic-method posix_ns
do_stress --cyclic 0 --cyclic-method pselect do_stress --cyclic -1 --cyclic-method pselect
do_stress --cyclic 0 --cyclic-method usleep do_stress --cyclic -1 --cyclic-method usleep
do_stress --cyclic 0 --cyclic-prio 50 do_stress --cyclic -1 --cyclic-prio 50
do_stress --dccp 0 --dccp-opts send do_stress --dccp -1 --dccp-opts send
do_stress --dccp 0 --dccp-opts sendmsg do_stress --dccp -1 --dccp-opts sendmsg
do_stress --dccp 0 --dccp-opts sendmmsg do_stress --dccp -1 --dccp-opts sendmmsg
do_stress --dccp 0 --dccp-domain ipv4 do_stress --dccp -1 --dccp-domain ipv4
do_stress --dccp 0 --dccp-domain ipv6 do_stress --dccp -1 --dccp-domain ipv6
do_stress --epoll 0 --epoll-domain ipv4 do_stress --epoll -1 --epoll-domain ipv4
do_stress --epoll 0 --epoll-domain ipv6 do_stress --epoll -1 --epoll-domain ipv6
do_stress --epoll 0 --epoll-domain unix do_stress --epoll -1 --epoll-domain unix
do_stress --eventfd 0 --eventfd-nonblock do_stress --eventfd -1 --eventfd-nonblock
do_stress --itimer 0 --itimer-rand do_stress --itimer -1 --itimer-rand
do_stress --lease 0 --lease-breakers 8 do_stress --lease -1 --lease-breakers 8
do_stress --lockf 0 --lockf-nonblock do_stress --lockf -1 --lockf-nonblock
do_stress --mincore 0 --mincore-random do_stress --mincore -1 --mincore-random
do_stress --open 0 --open-fd do_stress --open -1 --open-fd
do_stress --mmap 0 --mmap-file do_stress --mmap -1 --mmap-file
do_stress --mmap 0 --mmap-mprotect do_stress --mmap -1 --mmap-mprotect
do_stress --mmap 0 --mmap-async do_stress --mmap -1 --mmap-async
do_stress --mmap 0 --mmap-odirect do_stress --mmap -1 --mmap-odirect
do_stress --mmap 0 --mmap-osync do_stress --mmap -1 --mmap-osync
do_stress --mremap 0 --mremap-mlock do_stress --mremap -1 --mremap-mlock
do_stress --pipe 0 --pipe-size 64K do_stress --pipe -1 --pipe-size 64K
do_stress --pipe 0 --pipe-size 1M do_stress --pipe -1 --pipe-size 1M
do_stress --pthread 0 --pthread-max 512 do_stress --pthread -1 --pthread-max 512
do_stress --pthread 0 --pthread-max 1024 do_stress --pthread -1 --pthread-max 1024
do_stress --sctp 0 --sctp-domain ipv4 do_stress --sctp -1 --sctp-domain ipv4
do_stress --sctp 0 --sctp-domain ipv6 do_stress --sctp -1 --sctp-domain ipv6
do_stress --seek 0 --seek-punch do_stress --seek -1 --seek-punch
do_stress --shm-sysv 0 --shm-sysv-segs 128 do_stress --shm-sysv -1 --shm-sysv-segs 128
do_stress --sock 0 --sock-nodelay do_stress --sock -1 --sock-nodelay
do_stress --sock 0 --sock-domain ipv4 do_stress --sock -1 --sock-domain ipv4
do_stress --sock 0 --sock-domain ipv6 do_stress --sock -1 --sock-domain ipv6
do_stress --sock 0 --sock-domain unix do_stress --sock -1 --sock-domain unix
do_stress --sock 0 --sock-type stream do_stress --sock -1 --sock-type stream
do_stress --sock 0 --sock-type seqpacket do_stress --sock -1 --sock-type seqpacket
do_stress --sock 0 --sock-opts random do_stress --sock -1 --sock-opts random
do_stress --stack 0 --stack-mlock do_stress --stack -1 --stack-mlock
do_stress --stack 0 --stack-fill do_stress --stack -1 --stack-fill
do_stress --stream 0 --stream-madvise hugepage do_stress --stream -1 --stream-madvise hugepage
do_stress --stream 0 --stream-madvise nohugepage do_stress --stream -1 --stream-madvise nohugepage
do_stress --stream 0 --stream-madvise normal do_stress --stream -1 --stream-madvise normal
do_stress --timer 0 --timer-rand do_stress --timer -1 --timer-rand
do_stress --timer 0 --timer-freq 1000000 do_stress --timer -1 --timer-freq 1000000
do_stress --timer 0 --timer-freq 100000 --timer-slack 1000 do_stress --timer -1 --timer-freq 100000 --timer-slack 1000
do_stress --timerfd 0 --timerfd-rand do_stress --timerfd -1 --timerfd-rand
do_stress --tmpfs 0 --tmpfs-mmap-async do_stress --tmpfs -1 --tmpfs-mmap-async
do_stress --tmpfs 0 --tmpfs-mmap-file do_stress --tmpfs -1 --tmpfs-mmap-file
do_stress --tun 0 do_stress --tun -1
do_stress --tun 0 --tun-tap do_stress --tun -1 --tun-tap
do_stress --udp 0 --udp-domain ipv4 do_stress --udp -1 --udp-domain ipv4
do_stress --udp 0 --udp-domain ipv6 do_stress --udp -1 --udp-domain ipv6
do_stress --udp 0 --udp-lite do_stress --udp -1 --udp-lite
do_stress --udp-flood 0 --udp-flood-domain ipv4 do_stress --udp-flood -1 --udp-flood-domain ipv4
do_stress --udp-flood 0 --udp-flood-domain ipv6 do_stress --udp-flood -1 --udp-flood-domain ipv6
do_stress --utime 0 --utime-fsync do_stress --utime -1 --utime-fsync
do_stress --vm 0 --vm-keep do_stress --vm -1 --vm-keep
do_stress --vm 0 --vm-locked do_stress --vm -1 --vm-locked
do_stress --vm 0 --vm-populate do_stress --vm -1 --vm-populate
do_stress --vm 0 --vm-madvise dontneed do_stress --vm -1 --vm-madvise dontneed
do_stress --vm 0 --vm-madvise hugepage do_stress --vm -1 --vm-madvise hugepage
do_stress --vm 0 --vm-madvise mergeable do_stress --vm -1 --vm-madvise mergeable
do_stress --vm 0 --vm-madvise nohugepage do_stress --vm -1 --vm-madvise nohugepage
do_stress --vm 0 --vm-madvise mergeable do_stress --vm -1 --vm-madvise mergeable
do_stress --vm 0 --vm-madvise normal do_stress --vm -1 --vm-madvise normal
do_stress --vm 0 --vm-madvise random do_stress --vm -1 --vm-madvise random
do_stress --vm 0 --vm-madvise sequential do_stress --vm -1 --vm-madvise sequential
do_stress --vm 0 --vm-madvise unmergeable do_stress --vm -1 --vm-madvise unmergeable
do_stress --vm 0 --vm-madvise willneed --page-in do_stress --vm -1 --vm-madvise willneed --page-in
# #
# Longer duration stress testing to get more # Longer duration stress testing to get more
# coverage because of the large range of files to # coverage because of the large range of files to
# traverse # traverse
# #
DURATION=360 DURATION=360
do_stress --sysfs 16 do_stress --sysfs 16
do_stress --procfs 32 do_stress --procfs 32
do_stress --sysinval 8 --pathological do_stress --sysinval 8 --pathological
DURATION=120 DURATION=120
do_stress --bad-ioctl 0 --pathological do_stress --bad-ioctl -1 --pathological
# #
# And exercise I/O with plenty of time for file setup # And exercise I/O with plenty of time for file setup
# overhead. # overhead.
# #
DURATION=60 DURATION=60
sudo $STRESS_NG --class filesystem --ftrace --seq 0 -v --timestamp --syslog -t $ sudo $STRESS_NG --class filesystem --ftrace --seq -1 -v --timestamp --syslog -t
DURATION $DURATION
sudo $STRESS_NG --class io --ftrace --seq 0 -v --timestamp --syslog -t $DURATION sudo $STRESS_NG --class io --ftrace --seq -1 -v --timestamp --syslog -t $DURATIO
N
if [ -f /sys/kernel/debug/tracing/trace_stat/branch_all ]; then if [ -f /sys/kernel/debug/tracing/trace_stat/branch_all ]; then
sudo cat /sys/kernel/debug/tracing/trace_stat/branch_all > branch_all.fi nish sudo cat /sys/kernel/debug/tracing/trace_stat/branch_all > branch_all.fi nish
fi fi
sudo swapoff $SWAP sudo swapoff $SWAP
sudo rm $SWAP sudo rm $SWAP
echo "$core_pattern_saved" | sudo tee /proc/sys/kernel/core_pattern >& /dev/null
if [ -e $PERF_PARANOID ]; then if [ -e $PERF_PARANOID ]; then
(echo $paranoid_saved | sudo tee $PERF_PARANOID) > /dev/null (echo $paranoid_saved | sudo tee $PERF_PARANOID) > /dev/null
fi fi
sudo lcov -c -o kernel.info >& /dev/null sudo lcov -c -o kernel.info >& /dev/null
sudo genhtml -o html kernel.info sudo genhtml -o html kernel.info
 End of changes. 12 change blocks. 
150 lines changed or deleted 163 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)