From 58b02f47a001fefaf1509cec5ee9b670fc60186a Mon Sep 17 00:00:00 2001 From: Liang Yan Date: Thu, 28 Jun 2018 14:26:48 +0800 Subject: [PATCH] test: set norandommap to be a variable in fio.py The norandommap and verify parameter are mutually exclusive. So add norandommap variable in fio template. If verify is enabled, the norandommap is zero. Change-Id: I60a82ee561a3ae9fa94a58c00a35576f60fbc185 Signed-off-by: Liang Yan Reviewed-on: https://review.gerrithub.io/417094 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto --- scripts/fio.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/fio.py b/scripts/fio.py index 33f9a1af9..8e2316d2b 100755 --- a/scripts/fio.py +++ b/scripts/fio.py @@ -16,7 +16,7 @@ ioengine=libaio direct=1 bs=%(blocksize)d iodepth=%(iodepth)d -norandommap=1 +norandommap=%(norandommap)d %(verify)s verify_dump=1 @@ -86,12 +86,15 @@ def get_target_devices(): def create_fio_config(size, q_depth, devices, test, run_time, verify): + norandommap = 0 if not verify: verifyfio = "" + norandommap = 1 else: verifyfio = verify_template fiofile = fio_template % {"blocksize": size, "iodepth": q_depth, - "testtype": test, "runtime": run_time, "verify": verifyfio} + "testtype": test, "runtime": run_time, + "norandommap": norandommap, "verify": verifyfio} for (i, dev) in enumerate(devices): fiofile += fio_job_template % {"jobnumber": i, "device": dev} return fiofile