[CRIU] [PATCH] zdtm/cgroup_yard: create a test cgroup yard from the post-start hook

Andrei Vagin avagin at gmail.com
Thu Sep 19 23:37:57 MSK 2019


Right now, it is created from the pre-dump hook, but
if the --snap option is set, the test fails:
$ python test/zdtm.py run -t zdtm/static/cgroup_yard -f h --snap --iter 3
...
Running zdtm/static/cgroup_yard.hook(--pre-dump)
Traceback (most recent call last):
  File zdtm/static/cgroup_yard.hook, line 14, in <module>
    os.mkdir(yard)
OSError: [Errno 17] File exists: 'external_yard'

Cc: Michał Cłapiński <mclapinski at google.com>
Signed-off-by: Andrei Vagin <avagin at gmail.com>
---
 test/zdtm/static/cgroup_yard.hook | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/zdtm/static/cgroup_yard.hook b/test/zdtm/static/cgroup_yard.hook
index cc3971707..072b9d38d 100755
--- a/test/zdtm/static/cgroup_yard.hook
+++ b/test/zdtm/static/cgroup_yard.hook
@@ -7,7 +7,7 @@ import tempfile
 
 yard = "external_yard"
 
-if sys.argv[1] == "--pre-dump":
+if sys.argv[1] == "--post-start":
 	'''
 	Create external cgroup yard to be passed to CRIU via --cgroup-yard
 	'''
-- 
2.14.5



More information about the CRIU mailing list