mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
zdtm: don't use same cgoup names for a few tests (v2)
We run tests concurrently and they can race for equal resources v2: fix hooks too Signed-off-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
73fc3a775a
commit
2d1f5a06c8
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
tname=$(mktemp -d cgclean.XXXXXX)
|
||||
mount -t cgroup none $tname -o "none,name=zdtmtst"
|
||||
|
||||
echo "Cleaning $tname"
|
||||
|
||||
set +e
|
||||
rmdir "$tname/subcg/subsubcg/"
|
||||
rmdir "$tname/subcg/empty.0/"
|
||||
rmdir "$tname/subcg/empty.1/"
|
||||
rmdir "$tname/subcg/"
|
||||
set -e
|
||||
|
||||
echo "Left there is:"
|
||||
ls "$tname"
|
||||
umount "$tname"
|
||||
rmdir "$tname"
|
@@ -13,7 +13,7 @@ const char *test_author = "Pavel Emelianov <xemul@parallels.com>";
|
||||
char *dirname;
|
||||
TEST_OPTION(dirname, string, "cgroup directory name", 1);
|
||||
static const char *cgname = "zdtmtst";
|
||||
#define SUBNAME "subcg"
|
||||
#define SUBNAME "subcg00"
|
||||
#define SUBNAME2 SUBNAME"/subsubcg"
|
||||
|
||||
static int cg_move(char *name)
|
||||
|
@@ -1 +0,0 @@
|
||||
cgroup.hook
|
18
test/zdtm/live/static/cgroup00.hook
Executable file
18
test/zdtm/live/static/cgroup00.hook
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
tname=$(mktemp -d cgclean.XXXXXX)
|
||||
mount -t cgroup none $tname -o "none,name=zdtmtst"
|
||||
|
||||
echo "Cleaning $tname"
|
||||
|
||||
set +e
|
||||
rmdir "$tname/subcg00/subsubcg/"
|
||||
rmdir "$tname/subcg00/"
|
||||
set -e
|
||||
|
||||
echo "Left there is:"
|
||||
ls "$tname"
|
||||
umount "$tname"
|
||||
rmdir "$tname"
|
@@ -12,7 +12,7 @@ const char *test_author = "Tycho Andersen <tycho.andersen@canonical.com>";
|
||||
char *dirname;
|
||||
TEST_OPTION(dirname, string, "cgroup directory name", 1);
|
||||
static const char *cgname = "zdtmtst";
|
||||
static const char *subname = "subcg";
|
||||
static const char *subname = "subcg01";
|
||||
static const char *empty = "empty";
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@@ -1 +0,0 @@
|
||||
cgroup.hook
|
19
test/zdtm/live/static/cgroup01.hook
Executable file
19
test/zdtm/live/static/cgroup01.hook
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
tname=$(mktemp -d cgclean.XXXXXX)
|
||||
mount -t cgroup none $tname -o "none,name=zdtmtst"
|
||||
|
||||
echo "Cleaning $tname"
|
||||
|
||||
set +e
|
||||
rmdir "$tname/subcg01/empty.0/"
|
||||
rmdir "$tname/subcg01/empty.1/"
|
||||
rmdir "$tname/subcg01/"
|
||||
set -e
|
||||
|
||||
echo "Left there is:"
|
||||
ls "$tname"
|
||||
umount "$tname"
|
||||
rmdir "$tname"
|
Reference in New Issue
Block a user