Date: Mon, 29 May 2017 11:10:23 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r319120 - user/pho/stress2/misc Message-ID: <201705291110.v4TBANpv047702@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Mon May 29 11:10:22 2017 New Revision: 319120 URL: https://svnweb.freebsd.org/changeset/base/319120 Log: Implement end syscall number to test. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/syscall5.sh Modified: user/pho/stress2/misc/syscall5.sh ============================================================================== --- user/pho/stress2/misc/syscall5.sh Mon May 29 10:15:41 2017 (r319119) +++ user/pho/stress2/misc/syscall5.sh Mon May 29 11:10:22 2017 (r319120) @@ -37,16 +37,15 @@ syscall=`grep SYS_MAXSYSCALL /usr/include/sys/syscall.h | awk '{print $NF}'` syscall=$((syscall - 1)) -uname -a | grep -q OneFS && - syscall=`sysctl kern.syscalls | grep -v nosys | grep : | tail -1 | \ - sed 's/:.*//'` +esyscall=0 last=/tmp/syscall5.last log=/tmp/syscall5.log -while getopts ars:t:u flag; do +while getopts ae:rs:t:u flag; do case "$flag" in a) all=1 ;; + e) esyscall="$OPTARG" ;; r) [ -h $last ] && syscall=`ls -l $last | awk '{print $NF}'` syscall=$((syscall - 1)) @@ -55,10 +54,12 @@ while getopts ars:t:u flag; do t) sleeptime="$OPTARG" export sleeptime=$((sleeptime / 10)) ;; # used in syscall4.sh u) unnamed=1 ;; - *) echo "Usage $0 [-a] [-r] [-s number] [-t seconds] [-u]" + *) echo "Usage $0 [-a] [-r] [-s number] [-e number] [-t seconds] [-u]" return 1 ;; esac done +[ $syscall -gt $esyscall ] || + { echo "$syscall must be greater than $esyscall"; exit 1; } # syscalls with known issues: broken=" @@ -76,8 +77,6 @@ while [ $n -gt 0 ]; do ln -fs $n $last name=`grep -w "$n$" /usr/include/sys/syscall.h | awk '{print $2}' | sed 's/SYS_//'` - [ -z "$name" -a -n "$unnamed" ] && - { n=$((n - 1)); continue; } [ -z "$name" ] && name="unknown" rm -f /tmp/syscall5.name [ -x ../tools/exclude_syscall.sh ] && @@ -85,12 +84,15 @@ while [ $n -gt 0 ]; do { n=$((n - 1)); continue; } [ "$name" = "unknown" ] && [ -f /tmp/syscall5.name ] && name=`cat /tmp/syscall5.name` + [ -z "$name" -a -n "$unnamed" ] && + { n=$((n - 1)); continue; } echo "`date '+%T'` syscall $n ($name)" echo "`date '+%T'` syscall $n ($name)" >> $log printf "`date '+%T'` syscall $n ($name)\r\n" > /dev/console sync; sleep 1 echo "$broken" | grep -qw "$name" || ./syscall4.sh $n || break + [ $n -le $esyscall ] && break n=$((n - 1)) [ -z "$all" -a `date '+%s'` -gt $((start + 1800)) ] && break done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705291110.v4TBANpv047702>