Welcome to mirror list, hosted at ThFree Co, Russian Federation.

zdtm_mount_cgroups « test - github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a99e16361bf5f3b89a37a0263baf4473c99df898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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.

uuid=$1

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.$uuid &&
	umount -l $tdir || exit 1
done
rmdir $tdir