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 <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2016-08-07 10:47:09 +08:00
parent 50f0a2b1e1
commit 75f765e961
2 changed files with 3 additions and 3 deletions

View File

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

View File

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