From owner-svn-src-user@freebsd.org Mon May 29 11:10:24 2017 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AD8ECFBEA6 for ; Mon, 29 May 2017 11:10:24 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A12F74EBB; Mon, 29 May 2017 11:10:24 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TBANVZ047703; Mon, 29 May 2017 11:10:23 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TBANpv047702; Mon, 29 May 2017 11:10:23 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201705291110.v4TBANpv047702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 29 May 2017 11:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r319120 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 11:10:24 -0000 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