mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 01:31:34 +00:00
This script prepares the cgroups hierarchies that are used by tests to avoid creation of those in parallel with tests, that do not expect them to appear. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
16 lines
509 B
Bash
Executable file
16 lines
509 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# If a controller is created during dumping processes, criu may fail with error:
|
|
# Error (cgroup.c:768): cg: Set 3 is not subset of 2
|
|
# so lets create all test controllers before executing tests.
|
|
|
|
cat /proc/self/cgroup | grep -q zdtmtst.defaultroot && exit
|
|
|
|
tdir=`mktemp -d zdtm.XXXXXX`
|
|
for i in "zdtmtst" "zdtmtst.defaultroot"; do
|
|
mount -t cgroup -o none,name=$i zdtm $tdir &&
|
|
# a fake group prevents destroying of a controller
|
|
mkdir -p $tdir/holder &&
|
|
umount $tdir || exit 1
|
|
done
|
|
rmdir $tdir
|