Date: Wed, 22 Jun 2011 17:31:50 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r223427 - projects/stress2/misc Message-ID: <201106221731.p5MHVonO058783@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <unistd.h> #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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106221731.p5MHVonO058783>