From 75f765e961f2fef29493b0e3f1edc18a71a66b79 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Sun, 7 Aug 2016 10:47:09 +0800 Subject: [PATCH] Use absolute cgroup path for integration test So we can pass the test in container os local or systemd environment. Also fixes: #967 Signed-off-by: Qiang Huang --- tests/integration/cgroups.bats | 4 ++-- tests/integration/update.bats | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/cgroups.bats b/tests/integration/cgroups.bats index c415d5da..6880ef37 100644 --- a/tests/integration/cgroups.bats +++ b/tests/integration/cgroups.bats @@ -35,7 +35,7 @@ function check_cgroup_value() { @test "runc update --kernel-memory (initialized)" { # Add cgroup path - sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "runc-cgroups-integration-test",/' ${BUSYBOX_BUNDLE}/config.json + sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "\/runc-cgroups-integration-test",/' ${BUSYBOX_BUNDLE}/config.json # Set some initial known values DATA=$(cat <<-EOF @@ -62,7 +62,7 @@ EOF @test "runc update --kernel-memory (uninitialized)" { # Add cgroup path - sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "runc-cgroups-integration-test",/' ${BUSYBOX_BUNDLE}/config.json + sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "\/runc-cgroups-integration-test",/' ${BUSYBOX_BUNDLE}/config.json # run a detached busybox to work with runc run -d --console /dev/pts/ptmx test_cgroups_kmem diff --git a/tests/integration/update.bats b/tests/integration/update.bats index 2020127d..51b3f848 100644 --- a/tests/integration/update.bats +++ b/tests/integration/update.bats @@ -13,7 +13,7 @@ function setup() { setup_busybox # Add cgroup path - sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "runc-update-integration-test",/' ${BUSYBOX_BUNDLE}/config.json + sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "\/runc-update-integration-test",/' ${BUSYBOX_BUNDLE}/config.json # Set some initial known values DATA=$(cat <