From 39c3dcc64727610b3ef1b8fa216b4444ceb20850 Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Mon, 28 Feb 2022 14:47:14 -0800 Subject: test: Add missing verbose print, and track more time values --- test/harness/tests.py | 6 ++++-- test/harness/util.py | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/harness/tests.py b/test/harness/tests.py index b49bd3f..f5068bb 100644 --- a/test/harness/tests.py +++ b/test/harness/tests.py @@ -76,6 +76,7 @@ class TestRegression(unittest.TestCase): if i not in Global.subtest_list: util.vprint('Skipping subtest %d: FirstBurst={} MaxBurst={} MaxRecv={}'.format(*v) % i) else: + util.vprint('Running subtest %d: FirstBurst={} MaxBurst={} MaxRecv={}'.format(*v) % i) self.iscsi_logout() iscsi_data = IscsiData('Yes', 'No', 'None', 'None', v[0], v[1], v[2]) iscsi_data.update_cfg(Global.target, Global.ipnr) @@ -174,6 +175,7 @@ class TestRegression(unittest.TestCase): '-T', Global.target, '-p', Global.ipnr, '--logout']) - util.vprint("Times: fio=%-5.3f, sgdisk=%-5.3f, dd=%-5.3f, bonnie=%-5.3f" % \ - (Global.fio_time, Global.sgdisk_time, Global.dd_time, Global.bonnie_time)) + util.vprint("Times: fio=%-5.3f, sgdisk=%-5.3f, dd=%-5.3f, bonnie=%-5.3f, mkfs=%-5.3f, sleep=%d" % \ + (Global.fio_time, Global.sgdisk_time, Global.dd_time, \ + Global.bonnie_time, Global.mkfs_time, Global.sleep_time)) diff --git a/test/harness/util.py b/test/harness/util.py index 0e00592..f5cacb4 100644 --- a/test/harness/util.py +++ b/test/harness/util.py @@ -47,6 +47,8 @@ class Global: sgdisk_time = 0.0 dd_time = 0.0 bonnie_time = 0.0 + mkfs_time = 0.0 + sleep_time = 0 def dprint(*args): @@ -312,6 +314,7 @@ def wait_for_path(path, present=True, amt=10): dprint("Looking for path=%s, present=%s" % (path, present)) for i in range(amt): time.sleep(1) + Global.sleep_time += 1 if os.path.exists(path) == present: dprint("We are Happy :) present=%s, cnt=%d" % (present, i)) return True @@ -328,6 +331,7 @@ def wipe_disc(): # zero out the label and parition table vprint('Running "sgdisk" and "dd" to wipe disc label, partitions, and filesystem') time.sleep(1) + Global.sleep_time += 1 ts = time.time() res = run_cmd(['sgdisk', '--clear', Global.device]) te = time.time() @@ -382,9 +386,12 @@ def run_parted(): def run_mkfs(): vprint('Running "mkfs" to to create filesystem') + ts = time.time() res = run_cmd(Global.MKFSCMD + [ Global.partition ] ) + te = time.time() if res != 0: return (res, '%s: mkfs failed (%d)' % (Global.partition, res)) + Global.mkfs_time += (te - ts) return (0, 'Success') def run_bonnie(): -- cgit v1.2.1