summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2016-06-03 11:17:00 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-03 11:17:00 +0200
commit856ca72b294faef84aa92f1cbda04d011f10e287 (patch)
tree820bc9201fd04524c3a87229098546ddc2ef1559 /test
parentresolved: fix comments in resolve.conf for search domain overflows (#3422) (diff)
downloadsystemd-856ca72b294faef84aa92f1cbda04d011f10e287.tar.xz
systemd-856ca72b294faef84aa92f1cbda04d011f10e287.zip
tests: introduce UNIFIED_CGROUP_HIERARCHY (#3419)
There are many cgroups-related changes (thanks, @htejun!) This commit will simplify testing a bit. Use: make run UNIFIED_CGROUP_HIERARCHY=yes to enable cgroup-v2 make run UNIFIED_CGROUP_HIERARCHY=no to enable cgroup-v1
Diffstat (limited to 'test')
-rw-r--r--test/test-functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test-functions b/test/test-functions
index e2e07a833c..5f95a8129e 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -10,6 +10,7 @@ KERNEL_MODS="/lib/modules/$KERNEL_VER/"
QEMU_TIMEOUT="${QEMU_TIMEOUT:-infinity}"
NSPAWN_TIMEOUT="${NSPAWN_TIMEOUT:-infinity}"
FSTYPE="${FSTYPE:-ext3}"
+UNIFIED_CGROUP_HIERARCHY="${UNIFIED_CGROUP_HIERARCHY:-no}"
if ! ROOTLIBDIR=$(pkg-config --variable=systemdutildir systemd); then
echo "WARNING! Cannot determine rootlibdir from pkg-config, assuming /usr/lib/systemd" >&2
@@ -70,6 +71,7 @@ init=$ROOTLIBDIR/systemd \
ro \
console=ttyS0 \
selinux=0 \
+systemd.unified_cgroup_hierarchy=$UNIFIED_CGROUP_HIERARCHY \
$KERNEL_APPEND \
"
@@ -101,6 +103,9 @@ run_nspawn() {
if [[ "$NSPAWN_TIMEOUT" != "infinity" ]]; then
_nspawn_cmd="timeout --foreground $NSPAWN_TIMEOUT $_nspawn_cmd"
fi
+
+ _nspawn_cmd="env UNIFIED_CGROUP_HIERARCHY=$UNIFIED_CGROUP_HIERARCHY $_nspawn_cmd"
+
set -x
$_nspawn_cmd
}