[CRIU] [PATCH] zdtm: use a separate file for flock

Andrey Vagin avagin at gmail.com
Wed Feb 24 10:40:39 PST 2016


From: Andrey Vagin <avagin at openvz.org>

In Ubuntu flock opens a file with O_RDWR and then it can't be executed
flock: ./zdtm_mount_cgroups: Text file busy

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index 6165e14..1ace919 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -432,7 +432,7 @@ class zdtm_test:
 			subprocess.check_call(["make", "zdtm_ct"])
 		if not os.access("zdtm/lib/libzdtmtst.a", os.F_OK):
 			subprocess.check_call(["make", "-C", "zdtm/"])
-		subprocess.check_call(["flock", "zdtm_mount_cgroups", "./zdtm_mount_cgroups"])
+		subprocess.check_call(["flock", "zdtm_mount_cgroups.lock", "./zdtm_mount_cgroups"])
 
 
 class inhfd_test:
-- 
2.5.0



More information about the CRIU mailing list