From owner-svn-src-projects@FreeBSD.ORG Wed Jun 22 17:31:50 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 885C9106566C; Wed, 22 Jun 2011 17:31:50 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 793688FC16; Wed, 22 Jun 2011 17:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5MHVoiB058785; Wed, 22 Jun 2011 17:31:50 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5MHVonO058783; Wed, 22 Jun 2011 17:31:50 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201106221731.p5MHVonO058783@svn.freebsd.org> From: Peter Holm Date: Wed, 22 Jun 2011 17:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223427 - projects/stress2/misc X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 17:31:50 -0000 Author: pho Date: Wed Jun 22 17:31:50 2011 New Revision: 223427 URL: http://svn.freebsd.org/changeset/base/223427 Log: Updated to reflect the new block / frag defaults defined by r222319. While here, fix the error handling cleanup. Modified: projects/stress2/misc/linger.sh Modified: projects/stress2/misc/linger.sh ============================================================================== --- projects/stress2/misc/linger.sh Wed Jun 22 16:40:45 2011 (r223426) +++ projects/stress2/misc/linger.sh Wed Jun 22 17:31:50 2011 (r223427) @@ -86,12 +86,12 @@ EOF #include #define PARALLEL 10 -static int size = 14130; /* 6 free inodes */ +static int size = 6552; /* 10 free inodes */ int test(void) { - int error = 0, fd, i, j; + int fd, i, j; pid_t pid; char file[128]; @@ -107,7 +107,6 @@ test(void) if (errno != EINTR) { warn("creat(%s). %s:%d", file, __FILE__, __LINE__); unlink("continue"); - error = 1; break; } } @@ -117,12 +116,10 @@ test(void) } sleep(3); - if (error == 0) - j--; - for (i = j; i >= 0; i--) { + for (i = --j; i >= 0; i--) { sprintf(file,"p%05d.%05d", pid, i); if (unlink(file) == -1) - err(3, "unlink(%s)", file); + warn("unlink(%s)", file); } return (0);