From owner-svn-src-user@FreeBSD.ORG Tue May 26 09:37:15 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD22EB3; Tue, 26 May 2015 09:37:15 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C64A39F; Tue, 26 May 2015 09:37:15 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4Q9bF7n035849; Tue, 26 May 2015 09:37:15 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4Q9bFbE035848; Tue, 26 May 2015 09:37:15 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505260937.t4Q9bFbE035848@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 26 May 2015 09:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r283560 - 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.20 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, 26 May 2015 09:37:15 -0000 Author: pho Date: Tue May 26 09:37:14 2015 New Revision: 283560 URL: https://svnweb.freebsd.org/changeset/base/283560 Log: Limit runtime. Cleanup code. Modified: user/pho/stress2/misc/pfl.sh Modified: user/pho/stress2/misc/pfl.sh ============================================================================== --- user/pho/stress2/misc/pfl.sh Tue May 26 09:36:27 2015 (r283559) +++ user/pho/stress2/misc/pfl.sh Tue May 26 09:37:14 2015 (r283560) @@ -73,7 +73,16 @@ chmod 777 $mp2 su ${testuser} -c "cd $mp1; /tmp/pfl" & su ${testuser} -c "cd $mp2; /tmp/pfl" & -wait; wait +sleep .5 +start=`date '+%s'` +while pgrep -q pfl; do + if [ $((`date '+%s'`- start)) -gt 600 ]; then + echo "$0 timed out." + pkill -9 pfl + fi + sleep 10 +done +wait while mount | grep "$mp2 " | grep -q /dev/md; do umount $mp2 || sleep 1 @@ -86,16 +95,17 @@ mdconfig -d -u $md1 exit EOF +#include +#include +#include +#include + #include #include #include #include #include #include -#include -#include -#include -#include #include #define PARALLEL 10 @@ -104,8 +114,8 @@ static int size = 10000; void test(void) { - int fd, i, j; pid_t pid; + int fd, i, j; char file[128]; pid = getpid();