From owner-svn-src-user@freebsd.org Tue Jun 20 08:36:08 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 DD939D92CE2 for ; Tue, 20 Jun 2017 08:36:08 +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 AEAB8790D6; Tue, 20 Jun 2017 08:36:08 +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 v5K8a7Jq026152; Tue, 20 Jun 2017 08:36:07 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K8a73w026151; Tue, 20 Jun 2017 08:36:07 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706200836.v5K8a73w026151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 20 Jun 2017 08:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320139 - user/pho/stress2 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: Tue, 20 Jun 2017 08:36:09 -0000 Author: pho Date: Tue Jun 20 08:36:07 2017 New Revision: 320139 URL: https://svnweb.freebsd.org/changeset/base/320139 Log: Local config overrides the default. Do not run the test when saving the binaries. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/default.cfg Modified: user/pho/stress2/default.cfg ============================================================================== --- user/pho/stress2/default.cfg Tue Jun 20 08:03:50 2017 (r320138) +++ user/pho/stress2/default.cfg Tue Jun 20 08:36:07 2017 (r320139) @@ -6,6 +6,8 @@ # As a minimum you must updated "testuser". hostname=`hostname` # Name of the local configuration file +[ -f "./$hostname" ] && . "./$hostname" # Source in local configuration +[ -f "../$hostname" ] && . "../$hostname" # Source in local configuration # Default values export RUNDIR=${RUNDIR:-/tmp/stressX} @@ -17,7 +19,7 @@ export LOAD=${LOAD:-20} # the amount of RAM in the test box. export INCARNATIONS=${INCARNATIONS:-20} -export BLASTHOST=192.168.1.1 # host with udp discard enabled in inetd.conf +export BLASTHOST=${BLASTHOST:-192.168.1.1} # host with udp discard enabled in inetd.conf #export nfs_export=somehost:mount # Used by the NFS tests # Run all test cases: @@ -35,7 +37,7 @@ export rwLOAD=${rwLOAD:-70} export mkdirLOAD=${mkdirLOAD:-80} export creatLOAD=${creatLOAD:-80} -export symlinkLOAD=20} +export symlinkLOAD=${symlinkLOAD:-20} export tcpKILL=1 export shmINCARNATIONS=${shmINCARNATIONS:-5} @@ -113,6 +115,7 @@ mycc () { # "-o" must be first argument echo "Overwriting $STRESS2BIN/$file" echo "cp $2 $STRESS2BIN" cp $2 $STRESS2BIN + exit 0 # Build but do not run the test elif [ "$BMODE" = "2" ]; then [ -z "$file" ] && return if [ ! -x $STRESS2BIN/$file ]; then @@ -125,9 +128,6 @@ mycc () { # "-o" must be first argument $CC $@ # default "build and run" mode fi } - -[ -f "./$hostname" ] && . "./$hostname" # Source in local configuration -[ -f "../$hostname" ] && . "../$hostname" # Source in local configuration id $testuser > /dev/null 2>&1 || { echo "Non-root \$testuser \"$testuser\" not found." \ From owner-svn-src-user@freebsd.org Tue Jun 20 08:44:04 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 87E82D92F08 for ; Tue, 20 Jun 2017 08:44:04 +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 3D870794D0; Tue, 20 Jun 2017 08:44:04 +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 v5K8i3GV030190; Tue, 20 Jun 2017 08:44:03 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K8i3YA030189; Tue, 20 Jun 2017 08:44:03 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706200844.v5K8i3YA030189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 20 Jun 2017 08:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320140 - user/pho/stress2/testcases/syscall 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: Tue, 20 Jun 2017 08:44:04 -0000 Author: pho Date: Tue Jun 20 08:44:03 2017 New Revision: 320140 URL: https://svnweb.freebsd.org/changeset/base/320140 Log: This test is now handled by misc/syscall4.sh Sponsored by: Dell EMC Isilon Deleted: user/pho/stress2/testcases/syscall/ From owner-svn-src-user@freebsd.org Thu Jun 22 07:35:07 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 DCD5FDA83BC for ; Thu, 22 Jun 2017 07:35:07 +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 9235D710B2; Thu, 22 Jun 2017 07:35:07 +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 v5M7Z6O4092978; Thu, 22 Jun 2017 07:35:06 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7Z6UL092977; Thu, 22 Jun 2017 07:35:06 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706220735.v5M7Z6UL092977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 22 Jun 2017 07:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320225 - 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: Thu, 22 Jun 2017 07:35:08 -0000 Author: pho Date: Thu Jun 22 07:35:05 2017 New Revision: 320225 URL: https://svnweb.freebsd.org/changeset/base/320225 Log: Preserve stdout and stderr for debugging. Fix style while here. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/syscall4.sh Modified: user/pho/stress2/misc/syscall4.sh ============================================================================== --- user/pho/stress2/misc/syscall4.sh Thu Jun 22 07:14:37 2017 (r320224) +++ user/pho/stress2/misc/syscall4.sh Thu Jun 22 07:35:05 2017 (r320225) @@ -61,39 +61,34 @@ kldstat -v | grep -q sysvshm || $stress2tools/kldload kldstat -v | grep -q aio || $stress2tools/kldload.sh aio kldstat -v | grep -q mqueuefs || $stress2tools/kldload.sh mqueuefs -mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint -mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +mount | grep -q "on $mntpoint " && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart mdconfig -a -t swap -s 2g -u $mdstart || exit 1 bsdlabel -w md$mdstart auto -newfs $newfs_flags md${mdstart}$part > /dev/null +newfs $newfs_flags -n md${mdstart}$part > /dev/null mount /dev/md${mdstart}$part $mntpoint chmod 777 $mntpoint -daemon sh -c "(cd $odir/../testcases/swap; ./swap -t 10m -i 20 -k)" > \ +[ -z "$noswap" ] && + daemon sh -c "(cd $odir/../testcases/swap; ./swap -t 10m -i 20 -k)" > \ /dev/null sleeptime=${sleeptime:-12} st=`date '+%s'` while [ $((`date '+%s'` - st)) -lt $((10 * sleeptime)) ]; do - (cd $mntpoint; /tmp/syscall4 $* ) & + (cd $mntpoint; /tmp/syscall4 $* 1>>stdout 2>>stderr) & start=`date '+%s'` while [ $((`date '+%s'` - start)) -lt $sleeptime ]; do pgrep syscall4 > /dev/null || break sleep .5 done - while pkill -9 syscall4; do - : - done + while pkill -9 syscall4; do :; done wait ipcs | grep nobody | awk '/^(q|m|s)/ {print " -" $1, $2}' | xargs -L 1 ipcrm done -while pkill -9 swap; do - : -done -while pkill -9 syscall4; do - : -done +while pkill -9 swap; do :; done +while pkill -9 syscall4; do :; done for i in `jot 10`; do mount | grep -q md${mdstart}$part && \ @@ -106,9 +101,9 @@ if mount | grep -q md${mdstart}$part; then exit 1 fi rm -f /tmp/syscall4 -exit +exit 0 EOF -#include +#include #include #include #include @@ -122,6 +117,10 @@ EOF #include #include #include +#if defined(__FreeBSD__) +#include +#define __NP__ +#endif #include #include #include @@ -150,17 +149,17 @@ static int ignore[] = { SYS_sigwaitinfo, }; -int fd[900], fds[2], kq, socketpr[2]; +static int fd[900], fds[2], kq, socketpr[2]; #ifndef nitems #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #endif -#define N (128 * 1024 / (int)sizeof(u_int32_t)) +#define N 4096 #define MAGIC 1664 #define RUNTIME 120 #define THREADS 50 -u_int32_t r[N]; -int magic1, syscallno, magic2; +static uint32_t r[N]; +static int magic1, syscallno, magic2; static int random_int(int mi, int ma) @@ -170,10 +169,10 @@ random_int(int mi, int ma) static void hand(int i __unused) { /* handler */ - _exit(1); + exit(1); } -unsigned long +static unsigned long makearg(void) { unsigned int i; @@ -198,27 +197,37 @@ makearg(void) return(val); } -void * +static void * test(void *arg __unused) { - - FTS *fts; - FTSENT *p; - int ftsoptions, i; + FTS *fts; + FTSENT *p; + time_t start; + int ftsoptions, i, numfiles; char *args[] = { "/dev", "/proc", - "/compat/linux/proc", - "/media", + "mnt2", ".", NULL, }; +#ifdef __NP__ + pthread_set_name_np(pthread_self(), __func__); +#endif + numfiles = 0; ftsoptions = FTS_PHYSICAL; - - for (;;) { + start = time(NULL); + while (time(NULL) - start < 2) { for (i = 0; i < N; i++) r[i] = arc4random(); + + if (pipe(fds) == -1) + err(1, "pipe()"); + if (socketpair(PF_UNIX, SOCK_SEQPACKET, 0, socketpr) == -1) + err(1, "socketpair()"); + kq = kqueue(); + if ((fts = fts_open(args, ftsoptions, NULL)) == NULL) err(1, "fts_open"); @@ -227,20 +236,21 @@ test(void *arg __unused) if (fd[i] > 0) close(fd[i]); if ((fd[i] = open(p->fts_path, O_RDWR)) == -1) - if ((fd[i] = open(p->fts_path, O_WRONLY)) == -1) - if ((fd[i] = open(p->fts_path, O_RDONLY)) == -1) + if ((fd[i] = open(p->fts_path, O_WRONLY)) == + -1) + if ((fd[i] = open(p->fts_path, + O_RDONLY)) == -1) continue; i++; i = i % nitems(fd); + if (numfiles++ < 10) { + fprintf(stderr, "%d: pts_path = %s\n", + numfiles, p->fts_path); + } } if (fts_close(fts) == -1) - err(1, "fts_close()"); - if (pipe(fds) == -1) - err(1, "pipe()"); - if (socketpair(PF_UNIX, SOCK_SEQPACKET, 0, socketpr) == -1) - err(1, "socketpair()"); - kq = kqueue(); + warn("fts_close()"); sleep(1); close(socketpr[0]); close(socketpr[1]); @@ -248,18 +258,21 @@ test(void *arg __unused) close(fds[1]); close(kq); } - return(0); + return(NULL); } -void * +static void * calls(void *arg __unused) { + time_t start; int i, j, num; unsigned long arg1, arg2, arg3, arg4, arg5, arg6, arg7; - for (i = 0;; i++) { - if (i == 0) - usleep(1000); +#ifdef __NP__ + pthread_set_name_np(pthread_self(), __func__); +#endif + start = time(NULL); + for (i = 0; time(NULL) - start < 10; i++) { num = syscallno; while (num == 0) { num = random_int(0, SYS_MAXSYSCALL); @@ -278,7 +291,8 @@ calls(void *arg __unused) arg7 = makearg(); #if 0 /* Debug mode */ - fprintf(stderr, "%2d : syscall(%3d, %lx, %lx, %lx, %lx, %lx, %lx, %lx)\n", + fprintf(stderr, "%2d : syscall(%3d, %lx, %lx, %lx, %lx, %lx," + " %lx, %lx)\n", i, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7); sleep(2); #endif @@ -286,10 +300,10 @@ calls(void *arg __unused) syscall(num, arg1, arg2, arg3, arg4, arg5, arg6, arg7); num = 0; if (magic1 != MAGIC || magic2 != MAGIC) - _exit(1); + exit(1); } - return (0); + return (NULL); } int @@ -301,7 +315,6 @@ main(int argc, char **argv) time_t start; int e, j; - magic1 = magic2 = MAGIC; if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); @@ -340,27 +353,32 @@ main(int argc, char **argv) syscallno = atoi(argv[1]); for (j = 0; j < (int)nitems(ignore); j++) if (syscallno == ignore[j]) - errx(0, "syscall #%d is on the ignore list.", syscallno); + errx(0, "syscall #%d is on the ignore list.", + syscallno); } - if (daemon(0, 0) == -1) + if (daemon(1, 1) == -1) err(1, "daemon()"); start = time(NULL); while ((time(NULL) - start) < RUNTIME) { if (fork() == 0) { - arc4random_stir(); if ((e = pthread_create(&rp, NULL, test, NULL)) != 0) errc(1, e, "pthread_create"); usleep(1000); for (j = 0; j < THREADS; j++) - if ((e = pthread_create(&cp[j], NULL, calls, NULL)) != 0) + if ((e = pthread_create(&cp[j], NULL, calls, + NULL)) != 0) errc(1, e, "pthread_create"); for (j = 0; j < THREADS; j++) pthread_join(cp[j], NULL); - _exit(0); + + if ((e = pthread_kill(rp, SIGINT)) != 0) + errc(1, e, "pthread_kill"); + exit(0); } wait(NULL); + usleep(10000); } return (0); From owner-svn-src-user@freebsd.org Thu Jun 22 07:36:03 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 0CC43DA843C for ; Thu, 22 Jun 2017 07:36:03 +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 D075871243; Thu, 22 Jun 2017 07:36:02 +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 v5M7ZxTc093045; Thu, 22 Jun 2017 07:35:59 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7ZxM3093044; Thu, 22 Jun 2017 07:35:59 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706220735.v5M7ZxM3093044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 22 Jun 2017 07:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320226 - 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: Thu, 22 Jun 2017 07:36:03 -0000 Author: pho Date: Thu Jun 22 07:35:59 2017 New Revision: 320226 URL: https://svnweb.freebsd.org/changeset/base/320226 Log: Added a no-swap option. 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 Thu Jun 22 07:35:05 2017 (r320225) +++ user/pho/stress2/misc/syscall5.sh Thu Jun 22 07:35:59 2017 (r320226) @@ -42,10 +42,11 @@ esyscall=0 last=/tmp/syscall5.last log=/tmp/syscall5.log -while getopts ae:rs:t:u flag; do +while getopts ae:nrs:t:u flag; do case "$flag" in a) all=1 ;; e) esyscall="$OPTARG" ;; + n) export noswap=1 ;; r) [ -h $last ] && syscall=`ls -l $last | awk '{print $NF}'` syscall=$((syscall - 1)) @@ -54,7 +55,8 @@ while getopts ae:rs: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] [-e number] [-t seconds] [-u]" + *) echo "Usage $0 [-a] [-n] [-r] [-s number] [-e number] "\ + "[-t seconds] [-u]" return 1 ;; esac done From owner-svn-src-user@freebsd.org Thu Jun 22 07:37:14 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 11256DA8482 for ; Thu, 22 Jun 2017 07:37:14 +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 D3E827138B; Thu, 22 Jun 2017 07:37:13 +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 v5M7bAO9093125; Thu, 22 Jun 2017 07:37:10 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7bArH093124; Thu, 22 Jun 2017 07:37:10 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706220737.v5M7bArH093124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 22 Jun 2017 07:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320227 - 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: Thu, 22 Jun 2017 07:37:14 -0000 Author: pho Date: Thu Jun 22 07:37:10 2017 New Revision: 320227 URL: https://svnweb.freebsd.org/changeset/base/320227 Log: Added test for free disk space. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/sendfile5.sh Modified: user/pho/stress2/misc/sendfile5.sh ============================================================================== --- user/pho/stress2/misc/sendfile5.sh Thu Jun 22 07:35:59 2017 (r320226) +++ user/pho/stress2/misc/sendfile5.sh Thu Jun 22 07:37:10 2017 (r320227) @@ -42,7 +42,12 @@ cd /tmp sed '1,/^EOF/d' < $here/$0 > sendfile5.c mycc -o sendfile5 -Wall -Wextra -O2 sendfile5.c rm -f sendfile5.c -dd if=/dev/zero of=$diskimage bs=1m count=1k 2>&1 | egrep -v "records|transferred" +need=1024 +[ `df -k $(dirname $diskimage) | tail -1 | awk '{print int($4 / 1024)'}` \ + -lt $need ] && + printf "Need %d MB on %s.\n" $need `dirname $diskimage` && exit 0 +dd if=/dev/zero of=$diskimage bs=1m count=$need 2>&1 | + egrep -v "records|transferred" cd $here mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint From owner-svn-src-user@freebsd.org Sat Jun 24 09:44:32 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 6A73AD9B948 for ; Sat, 24 Jun 2017 09:44:32 +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 2F1C33F5B; Sat, 24 Jun 2017 09:44:32 +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 v5O9iVvR036588; Sat, 24 Jun 2017 09:44:31 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5O9iVYv036586; Sat, 24 Jun 2017 09:44:31 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706240944.v5O9iVYv036586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sat, 24 Jun 2017 09:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320305 - 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: Sat, 24 Jun 2017 09:44:32 -0000 Author: pho Date: Sat Jun 24 09:44:31 2017 New Revision: 320305 URL: https://svnweb.freebsd.org/changeset/base/320305 Log: Only use SU if the default newfs_flags is used. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/symlink.sh user/pho/stress2/misc/symlink2.sh Modified: user/pho/stress2/misc/symlink.sh ============================================================================== --- user/pho/stress2/misc/symlink.sh Sat Jun 24 09:33:25 2017 (r320304) +++ user/pho/stress2/misc/symlink.sh Sat Jun 24 09:44:31 2017 (r320305) @@ -72,6 +72,7 @@ tst() { } for i in "" "-U"; do + [ "$i" = "-U" -a "$newfs_flags" != "-U" ] && continue echo "newfs $i /dev/md$mdstart" newfs $i /dev/md$mdstart > /dev/null 2>&1 mount /dev/md$mdstart $mntpoint Modified: user/pho/stress2/misc/symlink2.sh ============================================================================== --- user/pho/stress2/misc/symlink2.sh Sat Jun 24 09:33:25 2017 (r320304) +++ user/pho/stress2/misc/symlink2.sh Sat Jun 24 09:44:31 2017 (r320305) @@ -52,6 +52,7 @@ mdconfig -l | grep md$mdstart > /dev/null && mdconfig mdconfig -a -t vnode -f $D -u $mdstart for i in "" "-U"; do + [ "$i" = "-U" -a "$newfs_flags" != "-U" ] && continue echo "newfs $i /dev/md$mdstart" newfs $i /dev/md$mdstart > /dev/null 2>&1 mount /dev/md$mdstart $mntpoint From owner-svn-src-user@freebsd.org Sat Jun 24 09:47:58 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 89251D9B971 for ; Sat, 24 Jun 2017 09:47:58 +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 4E26F64047; Sat, 24 Jun 2017 09:47:58 +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 v5O9lvmp036756; Sat, 24 Jun 2017 09:47:57 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5O9lvNM036755; Sat, 24 Jun 2017 09:47:57 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706240947.v5O9lvNM036755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sat, 24 Jun 2017 09:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320306 - user/pho/stress2/testcases 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: Sat, 24 Jun 2017 09:47:58 -0000 Author: pho Date: Sat Jun 24 09:47:57 2017 New Revision: 320306 URL: https://svnweb.freebsd.org/changeset/base/320306 Log: Forgot to remove the syscall entry when this test was removed. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/testcases/Makefile Modified: user/pho/stress2/testcases/Makefile ============================================================================== --- user/pho/stress2/testcases/Makefile Sat Jun 24 09:44:31 2017 (r320305) +++ user/pho/stress2/testcases/Makefile Sat Jun 24 09:47:57 2017 (r320306) @@ -21,7 +21,6 @@ shm \ socket \ swap \ symlink \ -syscall \ sysctl \ tcp \ thr1 \ From owner-svn-src-user@freebsd.org Sat Jun 24 17:19:32 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 A0C12DA2894 for ; Sat, 24 Jun 2017 17:19:32 +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 6FD0C73996; Sat, 24 Jun 2017 17:19:32 +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 v5OHJVCm022532; Sat, 24 Jun 2017 17:19:31 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OHJV6N022531; Sat, 24 Jun 2017 17:19:31 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706241719.v5OHJV6N022531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sat, 24 Jun 2017 17:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320320 - 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: Sat, 24 Jun 2017 17:19:32 -0000 Author: pho Date: Sat Jun 24 17:19:31 2017 New Revision: 320320 URL: https://svnweb.freebsd.org/changeset/base/320320 Log: Updated to use MAP_GUARD. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/mmap16.sh Modified: user/pho/stress2/misc/mmap16.sh ============================================================================== --- user/pho/stress2/misc/mmap16.sh Sat Jun 24 17:10:33 2017 (r320319) +++ user/pho/stress2/misc/mmap16.sh Sat Jun 24 17:19:31 2017 (r320320) @@ -28,32 +28,35 @@ # $FreeBSD$ # -exit 0 # Experimental test scenario - # Test scenario by kib@ [ `uname -m` = "i386" ] || exit 0 . ../default.cfg +grep -q MAP_GUARD /usr/include/sys/mman.h 2>/dev/null || exit 0 here=`pwd` cd /tmp sed '1,/^EOF/d' < $here/$0 > mmap16.c mycc -o mmap16 -Wall -Wextra -O2 -g mmap16.c -lpthread || exit 1 rm -f mmap16.c /tmp/mmap16.core -rm -f /tmp/mmap16.core +echo "Expect: + mmap16: mprotect: Permission denied" /tmp/mmap16 > /dev/null +s=$? rm -f /tmp/mmap16 /tmp/mmap16.core -exit 0 +exit $s EOF /* $Id: map_hole.c,v 1.6 2014/06/16 05:52:03 kostik Exp kostik $ */ #include #include #include + #include +#include #include #include #include @@ -61,10 +64,6 @@ EOF #include #include -#ifndef MAP_HOLE -#define MAP_HOLE 0x00002000 /* no backing pages */ -#endif - static void sighandler(int signo, siginfo_t *info, void *uap1) { @@ -126,10 +125,10 @@ main(void) err(1, "sigaction"); pagesz = getpagesize(); - printf("MAP_HOLE\n"); - addr = mmap(NULL, pagesz, PROT_NONE, MAP_HOLE, -1, 0); + printf("MAP_GUARD\n"); + addr = mmap(NULL, pagesz, PROT_NONE, MAP_GUARD, -1, 0); if (addr == (char *)MAP_FAILED) - err(1, "FAIL: mmap(MAP_HOLE)"); + err(1, "FAIL: mmap(MAP_GUARD)"); test_access(addr); printf("PROT_NONE wire\n"); @@ -137,7 +136,8 @@ main(void) if (addr == (char *)MAP_FAILED) err(1, "mmap(PROT_NONE)"); if (mlock(addr, pagesz) == -1) - err(1, "mlock"); + if (errno != ENOMEM) + err(1, "mlock"); test_access(addr); snprintf(cmd, sizeof(cmd), "procstat -v %d", getpid());