From 3e840917c944d7dcbb0ef353cdec6f2a0f0a03cb Mon Sep 17 00:00:00 2001 From: Stanislav Kinsburskiy Date: Tue, 2 Aug 2016 16:46:00 +0300 Subject: [PATCH] zdtm.py: check for link remap files presence on test end These files have to be removed after successful restore. v2: Check link remap files only for tests with "--link-remap" option in descriptor. Signed-off-by: Stanislav Kinsburskiy Signed-off-by: Pavel Emelyanov --- test/zdtm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/zdtm.py b/test/zdtm.py index 22979ddb7..569243a13 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -950,6 +950,13 @@ def check_visible_state(test, state, opts): print "%s: New mounts appeared: %s" % (pid, new_mounts) raise test_fail_exc("mounts compare") + if '--link-remap' in test.getdopts(): + import glob + link_remap_list = glob.glob(os.path.dirname(test.getname()) + '/link_remap*') + if link_remap_list: + print "%s: link-remap files left: %s" % (test.getname(), link_remap_list) + raise test_fail_exc("link remaps left") + class noop_freezer: def __init__(self):