[CRIU] [PATCH 01/21] zdtm: Make possible to claim for features list

Kirill Tkhai ktkhai at virtuozzo.com
Wed May 31 02:30:24 PDT 2017


On 30.05.2017 21:24, Andrei Vagin wrote:
> On Tue, May 23, 2017 at 03:38:11PM +0300, Kirill Tkhai wrote:
>> Currently, one feature is supported. Add possibility
>> for a test to depend on several features.
>>
>> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
>> ---
>>  test/zdtm.py |   16 ++++++++++------
>>  1 file changed, 10 insertions(+), 6 deletions(-)
[skip]
> feat = tdesc.get('feature', "") to remove next "if". Otherwise here are
> too many indents.

[PATCH v2]zdtm: Make possible to claim for features list

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 at virtuozzo.com>
---
 test/zdtm.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index 26b8939ae..16a65a22d 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1712,15 +1712,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")



More information about the CRIU mailing list