git » libjio » commit 2b4c0f1

tests/stress: Make --fi and --nproc > 1 incompatible

author Alberto Bertogli
2010-04-04 05:54:27 UTC
committer Alberto Bertogli
2010-04-04 05:54:27 UTC
parent 5610990beaa4550b2c42d179f1beeb8e97a68639

tests/stress: Make --fi and --nproc > 1 incompatible

Due to the way the stress tests are performed (with extensive jfsck), --fi and
--nproc are not really compatible, as it causes corruption reports that are
not real.

This patch makes the stress tests not run with that combination of options.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

tests/stress/jiostress +5 -1

diff --git a/tests/stress/jiostress b/tests/stress/jiostress
index 26b0f79..80c65fe 100755
--- a/tests/stress/jiostress
+++ b/tests/stress/jiostress
@@ -636,7 +636,7 @@ def main():
 		help = "number of processes (defaults to %default)")
 	parser.add_option("", "--fi", dest = "use_fi",
 		action = "store_true", default = False,
-		help = "use fault injection (conflicts with --as)")
+		help = "use fault injection (conflicts with --as and -p > 1)")
 	parser.add_option("", "--as", dest = "use_as",
 		action = "store_true", default = False,
 		help = "use J_LINGER + autosync (conflicts with --fi)")
@@ -668,6 +668,10 @@ def main():
 		print("Error: --fi and --as cannot be used together")
 		sys.exit(1)
 
+	if options.use_fi and options.nproc > 1:
+		print("Error: --fi cannot be used with multiple processes")
+		sys.exit(1)
+
 	if not options.use_internal_locks:
 		options.do_verify = False