From owner-svn-src-user@freebsd.org Sun Dec 25 10:00:37 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBF39C90064 for ; Sun, 25 Dec 2016 10:00:37 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 85289D1F; Sun, 25 Dec 2016 10:00:37 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBPA0aWC038269; Sun, 25 Dec 2016 10:00:36 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBPA0aEc038268; Sun, 25 Dec 2016 10:00:36 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201612251000.uBPA0aEc038268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sun, 25 Dec 2016 10:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r310537 - user/pho/stress2/testcases/swap 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.23 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: Sun, 25 Dec 2016 10:00:37 -0000 Author: pho Date: Sun Dec 25 10:00:36 2016 New Revision: 310537 URL: https://svnweb.freebsd.org/changeset/base/310537 Log: Cleanup. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/testcases/swap/swap.c Modified: user/pho/stress2/testcases/swap/swap.c ============================================================================== --- user/pho/stress2/testcases/swap/swap.c Sun Dec 25 09:58:49 2016 (r310536) +++ user/pho/stress2/testcases/swap/swap.c Sun Dec 25 10:00:36 2016 (r310537) @@ -29,13 +29,14 @@ __FBSDID("$FreeBSD$"); #include +#include #include -#include -#include -#include #include -#include + #include +#include +#include +#include #include "stress.h" @@ -50,15 +51,16 @@ static unsigned long size; int setup(int nb) { - int pct = 0; - unsigned long mem; - int64_t swapinfo = 0; struct rlimit rlp; + int64_t swapinfo; + unsigned long mem; + int pct; if (nb == 0) { mem = usermem(); swapinfo = swap(); + pct = 0; if (op->hog == 0) pct = random_int(80, 100); @@ -112,11 +114,12 @@ cleanup(void) int test(void) { - char *c; - int page; - unsigned long i, oldsize = size; time_t start; + unsigned long i, oldsize; + int page; + char *c; + oldsize = size; c = malloc(size); while (c == NULL && done_testing == 0) { size -= 1024 * 1024;