mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
zdtm: use unique holder for cgroups
The idea that each zdtm.py should have own helder, so that two zdtm.py that are running on the same host don't effect each other. Fixes: #1774 Signed-off-by: Andrei Vagin <avagin@google.com>
This commit is contained in:
committed by
Andrei Vagin
parent
73a783ac17
commit
ab6191ccd3
@@ -27,6 +27,7 @@ import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
import uuid
|
||||
from builtins import input, int, open, range, str, zip
|
||||
|
||||
import yaml
|
||||
@@ -38,6 +39,7 @@ from zdtm.criu_config import criu_config
|
||||
STREAMED_IMG_FILE_NAME = "img.criu"
|
||||
|
||||
prev_line = None
|
||||
uuid = uuid.uuid4()
|
||||
|
||||
|
||||
def alarm(*args):
|
||||
@@ -617,12 +619,12 @@ class zdtm_test:
|
||||
if not os.access("zdtm/lib/libzdtmtst.a", os.F_OK):
|
||||
subprocess.check_call(["make", "-C", "zdtm/"])
|
||||
subprocess.check_call(
|
||||
["flock", "zdtm_mount_cgroups.lock", "./zdtm_mount_cgroups"])
|
||||
["flock", "zdtm_mount_cgroups.lock", "./zdtm_mount_cgroups", str(uuid)])
|
||||
|
||||
@staticmethod
|
||||
def cleanup():
|
||||
subprocess.check_call(
|
||||
["flock", "zdtm_mount_cgroups.lock", "./zdtm_umount_cgroups"])
|
||||
["flock", "zdtm_mount_cgroups.lock", "./zdtm_umount_cgroups", str(uuid)])
|
||||
|
||||
|
||||
def load_module_from_file(name, path):
|
||||
|
Reference in New Issue
Block a user