From c4148940317e349ffce4e05345880df5fe66459f Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Mon, 18 May 2020 13:41:52 -0400 Subject: [PATCH] t/latency_percentiles: run cmdprio_percentage tests only if root The libaio/io_uring cmdprio_percentage option only works when fio is run from the root user account. Skip these tests (instead of failing) when this test script is run from a regular user account. Signed-off-by: Vincent Fu --- t/latency_percentiles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/latency_percentiles.py b/t/latency_percentiles.py index 5cdd49cf..972e2642 100755 --- a/t/latency_percentiles.py +++ b/t/latency_percentiles.py @@ -1303,9 +1303,9 @@ def main(): (args.run_only and test['test_id'] not in args.run_only): skipped = skipped + 1 outcome = 'SKIPPED (User request)' - elif platform.system() != 'Linux' and 'cmdprio_percentage' in test: + elif (platform.system() != 'Linux' or os.geteuid() != 0) and 'cmdprio_percentage' in test: skipped = skipped + 1 - outcome = 'SKIPPED (Linux required for cmdprio_percentage tests)' + outcome = 'SKIPPED (Linux root required for cmdprio_percentage tests)' else: test_obj = test['test_obj'](artifact_root, test, args.debug) status = test_obj.run_fio(fio) -- 2.25.1