X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,J_CHICKENPOX_43, J_CHICKENPOX_64,T_DKIM_INVALID autolearn=no version=3.4.0-r929098 Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id pA3Hu1bd038333 for ; Thu, 3 Nov 2011 12:56:02 -0500 X-ASG-Debug-ID: 1320342960-509000910000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-bw0-f53.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 1DA59568D6E for ; Thu, 3 Nov 2011 10:56:00 -0700 (PDT) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) by cuda.sgi.com with ESMTP id eCUJazPM2pAHfynV for ; Thu, 03 Nov 2011 10:56:00 -0700 (PDT) Received: by bkbzs8 with SMTP id zs8so1634560bkb.26 for ; Thu, 03 Nov 2011 10:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=pjWOr+m3kLr7EhM5fyT0SdeJAexvb3tk4o8bVf4lctk=; b=srq5QoqLEOVcScaYO4ogN+xc/yTG2X25yaAunBKCIRWsffVeUYibKyqrG4esARfkV+ TsHvAQMP++bAuNYXc/hPQEW5LZN8bnuTM9PZS50aCKJ2OpCoLhjITd6iy3xoQ5Lm7Bmi Bls7Hrox58aeSRUf3QqtZB2WRf3ykKcoybCCc= Received: by 10.204.34.148 with SMTP id l20mr9252622bkd.95.1320342959594; Thu, 03 Nov 2011 10:55:59 -0700 (PDT) Received: from localhost.localdomain ([178.176.142.120]) by mx.google.com with ESMTPS id z9sm6365051bkn.7.2011.11.03.10.55.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Nov 2011 10:55:58 -0700 (PDT) Sender: Dmitry Monakhov From: Dmitry Monakhov To: linux-fsdevel@vger.kernel.org Cc: xfs@oss.sgi.com, hch@lst.de, aelder@sgi.com, tytso@mit.edu, Dmitry Monakhov X-ASG-Orig-Subj: [PATCH 1/9] xfstests: fsstress add command line style output for show_opts Subject: [PATCH 1/9] xfstests: fsstress add command line style output for show_opts Date: Thu, 3 Nov 2011 21:55:45 +0400 Message-Id: <1320342953-7973-1-git-send-email-dmonakhov@openvz.org> X-Mailer: git-send-email 1.7.0.4 X-Barracuda-Connect: mail-bw0-f53.google.com[209.85.214.53] X-Barracuda-Start-Time: 1320342961 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=DKIM_SIGNED, DKIM_VERIFIED X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.79225 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- -0.00 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Once some combination of seed+fs_ops result in regression it is reasonable to document that combination. It is usefull to dump that configuration in command line style. Later this line may be simply hardcoded in to regression test. Signed-off-by: Dmitry Monakhov --- 070 | 2 +- 117 | 2 +- ltp/fsstress.c | 21 +++++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/070 b/070 index 4458011..f48c33c 100755 --- a/070 +++ b/070 @@ -62,7 +62,7 @@ $FSSTRESS_PROG \ -f unresvsp=0 \ -f attr_set=100 \ -f attr_remove=100 \ - -S -p 1 -n 10000 >$seq.full 2>&1 + -p 1 -n 10000 -S c >$seq.full 2>&1 status=$? exit diff --git a/117 b/117 index fcf0485..edec157 100755 --- a/117 +++ b/117 @@ -85,7 +85,7 @@ while [ $i -lt $ITERATIONS ]; do -f attr_set=100 \ -f attr_remove=100 \ -s $seed \ - -S -p 1 -n 1000 >>$seq.full 2>&1 + -p 1 -n 1000 -S c >>$seq.full 2>&1 let i=$i+1 done diff --git a/ltp/fsstress.c b/ltp/fsstress.c index 133a247..f9d7d6e 100644 --- a/ltp/fsstress.c +++ b/ltp/fsstress.c @@ -284,7 +284,7 @@ int main(int argc, char **argv) nops = sizeof(ops) / sizeof(ops[0]); ops_end = &ops[nops]; myprog = argv[0]; - while ((c = getopt(argc, argv, "d:e:f:i:m:n:o:p:rs:vwzHS")) != -1) { + while ((c = getopt(argc, argv, "d:e:f:i:m:n:o:p:rs:S:vwzH")) != -1) { switch (c) { case 'd': dirname = optarg; @@ -345,7 +345,10 @@ int main(int argc, char **argv) zero_freq(); break; case 'S': - show_ops(0, NULL); + i = 0; + if (optarg[0] == 'c') + i = 1; + show_ops(1, NULL); printf("\n"); nousage=1; break; @@ -1310,7 +1313,8 @@ show_ops(int flag, char *lead_str) x+=printf("%s ", p->name); } printf("\n"); - } else { + } else if (flag == 0) { + /* Table view style */ int f; for (f = 0, p = ops; p < ops_end; p++) f += p->freq; @@ -1327,6 +1331,15 @@ show_ops(int flag, char *lead_str) (p->iswrite == 0) ? " " : "write op"); } } + } else { + /* Command line style */ + if (lead_str != NULL) + printf("%s", lead_str); + printf ("-z -s %ld -m %d -n %d -p %d \\\n", seed, idmodulo, + operations, nproc); + for (p = ops; p < ops_end; p++) + if (p->freq > 0) + printf("-f %s=%d \\\n",p->name, p->freq); } } @@ -1433,7 +1446,7 @@ usage(void) printf(" -v specifies verbose mode\n"); printf(" -w zeros frequencies of non-write operations\n"); printf(" -z zeros frequencies of all operations\n"); - printf(" -S prints the table of operations (omitting zero frequency)\n"); + printf(" -S [c,t] prints the list of operations (omitting zero frequency) in command line or table style\n"); printf(" -H prints usage and exits\n"); } -- 1.7.1