From owner-svn-src-user@FreeBSD.ORG Thu Dec 5 12:58:34 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 ESMTPS id 49C32608; Thu, 5 Dec 2013 12:58:34 +0000 (UTC) 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 368FE1A14; Thu, 5 Dec 2013 12:58:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5CwY9S018448; Thu, 5 Dec 2013 12:58:34 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5CwYwx018447; Thu, 5 Dec 2013 12:58:34 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201312051258.rB5CwYwx018447@svn.freebsd.org> From: Peter Holm Date: Thu, 5 Dec 2013 12:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r258979 - 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.17 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, 05 Dec 2013 12:58:34 -0000 Author: pho Date: Thu Dec 5 12:58:33 2013 New Revision: 258979 URL: http://svnweb.freebsd.org/changeset/base/258979 Log: Use newfs_flags and added setrlimit(2) for the test of posix_openpt(2). 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 Dec 5 11:48:50 2013 (r258978) +++ user/pho/stress2/misc/syscall4.sh Thu Dec 5 12:58:33 2013 (r258979) @@ -54,7 +54,7 @@ mdconfig -l | grep -q md$mdstart && mdc mdconfig -a -t swap -s 2g -u $mdstart || exit 1 bsdlabel -w md$mdstart auto -newfs -U md${mdstart}$part > /dev/null +newfs $newfs_flags md${mdstart}$part > /dev/null mount /dev/md${mdstart}$part $mntpoint chmod 777 $mntpoint @@ -107,6 +107,7 @@ EOF #include #include #include +#include #include #include #include @@ -132,7 +133,6 @@ static int ignore[] = { #if __FreeBSD_version >= 900041 SYS_pdfork, #endif - SYS_posix_openpt }; int fd[900], fds[2], socketpr[2]; @@ -275,10 +275,12 @@ int main(int argc, char **argv) { struct passwd *pw; + struct rlimit limit; pthread_t rp, cp[50]; time_t start; int j; + magic1 = magic2 = MAGIC; if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); @@ -289,6 +291,10 @@ main(int argc, char **argv) err(1, "Can't drop privileges to \"nobody\""); endpwent(); + limit.rlim_cur = limit.rlim_max = 1000; + if (setrlimit(RLIMIT_NPTS, &limit) < 0) + err(1, "setrlimit"); + signal(SIGALRM, hand); signal(SIGILL, hand); signal(SIGFPE, hand);