[v2,01/21] zdtm: Make possible to claim for features list

Submitted by Kirill Tkhai on May 31, 2017, 5:51 p.m.

Details

Message ID 149625310894.18060.2709821830735844147.stgit@localhost.localdomain
State Accepted
Series "Add /proc/[pid]/ns/pid_for_children ns support (and fixes)"
Headers show

Commit Message

Kirill Tkhai May 31, 2017, 5:51 p.m.
Currently, one feature is supported. Add possibility
for a test to depend on several features.

v2: Delete excess "if" as suggested by Andrey Vagin.
    Rename variables to decrise patch size.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 test/zdtm.py |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm.py b/test/zdtm.py
index 5fcc3e1a6..8fabe4ef4 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1749,15 +1749,18 @@  default_test = {}
 				l.skip(t, "manual run only")
 				continue
 
-			feat = tdesc.get('feature', None)
-			if feat:
+			feat_list = tdesc.get('feature', "")
+			for feat in feat_list.split():
 				if feat not in features:
 					print "Checking feature %s" % feat
 					features[feat] = criu.check(feat)
 
 				if not features[feat]:
 					l.skip(t, "no %s feature" % feat)
-					continue
+					feat_list = None
+					break
+			if feat_list is None:
+				continue
 
 			if self_checkskip(t):
 				l.skip(t, "checkskip failed")