2
0
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:
Andrew Vagin
2014-08-15 16:37:00 +04:00
committed by Pavel Emelyanov
parent 73fc3a775a
commit 2d1f5a06c8
5 changed files with 39 additions and 24 deletions

View File

@@ -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"

View File

@@ -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)

View File

@@ -1 +0,0 @@
cgroup.hook

View 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"

View File

@@ -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)

View File

@@ -1 +0,0 @@
cgroup.hook

View 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"