linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] xfstests: fsstress add command line style output for show_opts
@ 2011-11-03 17:55 Dmitry Monakhov
  2011-11-03 17:55 ` [PATCH 2/9] xfstests: freeze fsstress options for 117'th Dmitry Monakhov
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Dmitry Monakhov @ 2011-11-03 17:55 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: xfs, hch, aelder, tytso, Dmitry Monakhov

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 <dmonakhov@openvz.org>
---
 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


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-11-08 17:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-03 17:55 [PATCH 1/9] xfstests: fsstress add command line style output for show_opts Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 2/9] xfstests: freeze fsstress options for 117'th Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 3/9] xfstests: add fallocate support to fsstress Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 4/9] xfstests: fsstress add FS_IOC_{SET,GET}FLAGS operations v2 Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 5/9] xfstests: add fiemap operation to fsstress Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 6/9] xfstests: add a new test that runs fsstress under ENOSPC conditions Dmitry Monakhov
2011-11-07 13:25   ` David Sterba
2011-11-07 13:31     ` Dmitry Monakhov
2011-11-08 17:01       ` David Sterba
2011-11-08 17:04       ` Christoph Hellwig
2011-11-03 17:55 ` [PATCH 7/9] xfstests: add a new quota " Dmitry Monakhov
2011-11-03 19:39   ` Christoph Hellwig
2011-11-07  6:15     ` Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 8/9] xfstress: add regression testcase for d583fb87a3ff0 Dmitry Monakhov
2011-11-03 17:55 ` [PATCH 9/9] xfstress: Test data journaling flag switch for a single file Dmitry Monakhov
2011-11-07 20:52 ` [PATCH 1/9] xfstests: fsstress add command line style output for show_opts Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).