From bda3055055cc07c71dda21056eb4b42f8e2e5def Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Wed, 14 Sep 2016 21:55:41 +1000 Subject: [PATCH] *: update busybox test rootfs Switch to the actual source of the official Docker library of images, so that we have a proper source for the test filesystem. In addition, update to the latest released version (1.25.0 [2016-06-23]) so that we can use more up-to-date applets in our tests (such as stat(3)). This patch is part of the console rewrite patchset. Signed-off-by: Aleksa Sarai --- Dockerfile | 3 ++- libcontainer/integration/exec_test.go | 2 +- tests/integration/helpers.bash | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c3a23a4f..05687663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,8 @@ RUN mkdir -p /go/src/github.com/mvdan \ # setup a playground for us to spawn containers in ENV ROOTFS /busybox RUN mkdir -p ${ROOTFS} \ - && curl -o- -sSL 'https://github.com/jpetazzo/docker-busybox/raw/buildroot-2014.11/rootfs.tar' | tar -C ${ROOTFS} -xf - + && curl -o- -sSL 'https://github.com/docker-library/busybox/raw/a0558a9006ce0dd6f6ec5d56cfd3f32ebeeb815f/glibc/busybox.tar.xz' | tar xfJC - ${ROOTFS} + COPY script/tmpmount / WORKDIR /go/src/github.com/opencontainers/runc diff --git a/libcontainer/integration/exec_test.go b/libcontainer/integration/exec_test.go index 2ba98d64..7e5d9e1e 100644 --- a/libcontainer/integration/exec_test.go +++ b/libcontainer/integration/exec_test.go @@ -43,7 +43,7 @@ func testExecPS(t *testing.T, userns bool) { config.Namespaces = append(config.Namespaces, configs.Namespace{Type: configs.NEWUSER}) } - buffers, exitCode, err := runContainer(config, "", "ps") + buffers, exitCode, err := runContainer(config, "", "ps", "-o", "pid,user,comm") if err != nil { t.Fatalf("%s: %s", buffers, err) } diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index b5b83298..9e16f7f8 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -149,7 +149,7 @@ function setup_busybox() { BUSYBOX_IMAGE="/testdata/busybox.tar" fi if [ ! -e $BUSYBOX_IMAGE ]; then - curl -o $BUSYBOX_IMAGE -sSL 'https://github.com/jpetazzo/docker-busybox/raw/buildroot-2014.11/rootfs.tar' + curl -o $BUSYBOX_IMAGE -sSL 'https://github.com/docker-library/busybox/raw/a0558a9006ce0dd6f6ec5d56cfd3f32ebeeb815f/glibc/busybox.tar.xz' fi tar -C "$BUSYBOX_BUNDLE"/rootfs -xf "$BUSYBOX_IMAGE" cd "$BUSYBOX_BUNDLE"