From owner-svn-src-user@FreeBSD.ORG Thu Sep 19 13:01:32 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02426E57; Thu, 19 Sep 2013 13:01:32 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4E3C2C7E; Thu, 19 Sep 2013 13:01:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JD1Vfu068777; Thu, 19 Sep 2013 13:01:31 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JD1VZr068776; Thu, 19 Sep 2013 13:01:31 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201309191301.r8JD1VZr068776@svn.freebsd.org> From: Peter Holm Date: Thu, 19 Sep 2013 13:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255703 - 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.14 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, 19 Sep 2013 13:01:32 -0000 Author: pho Date: Thu Sep 19 13:01:31 2013 New Revision: 255703 URL: http://svnweb.freebsd.org/changeset/base/255703 Log: Limit run time to 2 minutes. ftsoptions must be non zero. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/syscall4.sh Modified: user/pho/stress2/misc/syscall4.sh ============================================================================== --- user/pho/stress2/misc/syscall4.sh Thu Sep 19 12:28:59 2013 (r255702) +++ user/pho/stress2/misc/syscall4.sh Thu Sep 19 13:01:31 2013 (r255703) @@ -163,7 +163,6 @@ test(void *arg __unused) int i; ftsoptions = FTS_PHYSICAL; - ftsoptions = 0; args[0] = "/dev"; args[1] = "/proc"; args[2] = "/usr/compat/linux/proc"; @@ -188,8 +187,6 @@ test(void *arg __unused) i = i % 900; } - if (errno != 0 && errno != ENOENT) - warn("fts_read"); if (fts_close(fts) == -1) err(1, "fts_close()"); if (pipe(fds) == -1) @@ -249,7 +246,8 @@ main(int argc, char **argv) { struct passwd *pw; pthread_t rp, cp[50]; - int i, j; + time_t start; + int j; if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); @@ -276,7 +274,8 @@ main(int argc, char **argv) errx(0, "syscall #%d is on the ignore list.", syscallno); } - for (i = 0; i < 100000; i++) { + start = time(NULL); + while ((time(NULL) - start) < 120) { if (fork() == 0) { arc4random_stir(); if (pthread_create(&rp, NULL, test, NULL) != 0)