[Piglit] [Patch v3 4/4] piglit-run.py: Restrict dmesg to serial runs

Dylan Baker baker.dylan.c at gmail.com
Mon Feb 3 15:40:53 PST 2014


Dmesg reporting has always been inaccurate with concurrent runs, and the
solution to concurrent runs would be to have each run take out a lock,
removing the chance that another test generated an error in dmesg while
it was running. But this effectively makes them a serial run, and at the
cost of greater code complexity. With that in mind it makes more sense
to just force --dmesg to imply -1.

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 piglit-run.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/piglit-run.py b/piglit-run.py
index faf3adb..d837ccf 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -81,7 +81,7 @@ def main():
     parser.add_argument("--dmesg",
                         action="store_true",
                         help="Capture a difference in dmesg before and "
-                             "after each test")
+                             "after each test. Implies -1/--no-concurrency")
     parser.add_argument("test_profile",
                         metavar="<Path to one or more test profile(s)>",
                         nargs='+',
@@ -96,6 +96,11 @@ def main():
     if args.platform:
         os.environ['PIGLIT_PLATFORM'] = args.platform
 
+    # If dmesg is requested we must have serial run, this is becasue dmesg
+    # isn't reliable with threaded run
+    if args.dmesg:
+        args.concurrency = "none"
+
     # Read the config file
     if args.config_file:
         core.PIGLIT_CONFIG.readfp(args.config_file)
-- 
1.8.5.3



More information about the Piglit mailing list