Merge pull request #1635 from rneugeba/test-up

Make ./test a moby free zone
This commit is contained in:
Justin Cormack 2017-04-14 19:05:11 -05:00 committed by GitHub
commit a552bb6abf
14 changed files with 65 additions and 66 deletions

View File

@ -52,7 +52,7 @@ install:
cp -R ./bin/* $(PREFIX)/bin cp -R ./bin/* $(PREFIX)/bin
define check_test_log define check_test_log
@cat $1 |grep -q 'Moby test suite PASSED' @cat $1 |grep -q 'Kernel config test suite PASSED'
endef endef
.PHONY: test-hyperkit .PHONY: test-hyperkit

View File

@ -5,21 +5,21 @@ IMAGE=check
default: push default: push
hash: Dockerfile check.sh check-kernel-config.sh etc/moby hash: Dockerfile check.sh check-kernel-config.sh etc/linuxkit
DOCKER_CONTENT_TRUST=1 docker pull $(BASE) DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
tar cf - $^ | docker build --no-cache -t $(IMAGE):build - tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > hash docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > hash
push: hash push: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \ (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):$(shell cat hash)) docker push linuxkit/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash
tag: hash tag: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash

View File

@ -4,7 +4,7 @@ set -e
echo "starting kernel config sanity test with /proc/config.gz" echo "starting kernel config sanity test with /proc/config.gz"
# decompress /proc/config.gz from the Moby host # decompress /proc/config.gz from the host
UNZIPPED_CONFIG=$(zcat /proc/config.gz) UNZIPPED_CONFIG=$(zcat /proc/config.gz)
kernelVersion="$(uname -r)" kernelVersion="$(uname -r)"

View File

@ -1,15 +1,15 @@
#!/bin/sh #!/bin/sh
function failed { function failed {
printf "Moby test suite FAILED\n" printf "Kernel config test suite FAILED\n"
/sbin/poweroff -f /sbin/poweroff -f
} }
/check-kernel-config.sh || failed /check-kernel-config.sh || failed
bash /check-config.sh || failed bash /check-config.sh || failed
printf "Moby test suite PASSED\n" printf "Kernel config test suite PASSED\n"
cat /etc/moby cat /etc/linuxkit
/sbin/poweroff -f /sbin/poweroff -f

View File

@ -7,4 +7,3 @@
\______ o __/ \______ o __/
\ \ __/ \ \ __/
\____\_______/ \____\_______/

View File

@ -11,15 +11,15 @@ hash: Dockerfile bench_runner.sh
docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > hash docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > hash
push: hash push: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \ (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):$(shell cat hash)) docker push linuxkit/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash
tag: hash tag: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash

View File

@ -1,11 +1,11 @@
kernel: kernel:
image: "mobylinux/kernel:4.9.x" image: "linuxkit/kernel:4.9.x"
cmdline: "console=ttyS0 console=tty0 page_poison=1" cmdline: "console=ttyS0 console=tty0 page_poison=1"
init: init:
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b - linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
- mobylinux/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9 - linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
- mobylinux/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b - linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
- mobylinux/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935 - linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
onboot: onboot:
- name: sysctl - name: sysctl
image: "linuxkit/sysctl:1f5ec5d5e6f7a7a1b3d2ff9dd9e36fd6fb14756a" image: "linuxkit/sysctl:1f5ec5d5e6f7a7a1b3d2ff9dd9e36fd6fb14756a"
@ -16,21 +16,21 @@ onboot:
- CAP_SYS_ADMIN - CAP_SYS_ADMIN
readonly: true readonly: true
- name: sysfs - name: sysfs
image: mobylinux/sysfs:6c1d06f28ddd9681799d3950cddf044b930b221c image: "linuxkit/sysfs:6c1d06f28ddd9681799d3950cddf044b930b221c"
- name: binfmt - name: binfmt
image: "linuxkit/binfmt:8881283ac627be1542811bd25c85e7782aebc692" image: "linuxkit/binfmt:8881283ac627be1542811bd25c85e7782aebc692"
binds: binds:
- /proc/sys/fs/binfmt_misc:/binfmt_misc - /proc/sys/fs/binfmt_misc:/binfmt_misc
readonly: true readonly: true
- name: format - name: format
image: "mobylinux/format:53748000acf515549d398e6ae68545c26c0f3a2e" image: "linuxkit/format:53748000acf515549d398e6ae68545c26c0f3a2e"
binds: binds:
- /dev:/dev - /dev:/dev
capabilities: capabilities:
- CAP_SYS_ADMIN - CAP_SYS_ADMIN
- CAP_MKNOD - CAP_MKNOD
- name: mount - name: mount
image: "mobylinux/mount:d2669e7c8ddda99fa0618a414d44261eba6e299a" image: "linuxkit/mount:d2669e7c8ddda99fa0618a414d44261eba6e299a"
binds: binds:
- /dev:/dev - /dev:/dev
- /var:/var:rshared,rbind - /var:/var:rshared,rbind
@ -40,13 +40,13 @@ onboot:
command: ["/mount.sh", "/var/lib/docker"] command: ["/mount.sh", "/var/lib/docker"]
services: services:
- name: rngd - name: rngd
image: "mobylinux/rngd:3dad6dd43270fa632ac031e99d1947f20b22eec9" image: "linuxkit/rngd:f5e5be43e730ea819c3293d5c6dcbfa7f4c5c314"
capabilities: capabilities:
- CAP_SYS_ADMIN - CAP_SYS_ADMIN
oomScoreAdj: -800 oomScoreAdj: -800
readonly: true readonly: true
- name: dhcpcd - name: dhcpcd
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703" image: "linuxkit/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
binds: binds:
- /var:/var - /var:/var
- /tmp/etc:/etc - /tmp/etc:/etc
@ -57,7 +57,7 @@ services:
net: host net: host
oomScoreAdj: -800 oomScoreAdj: -800
- name: docker - name: docker
image: "mobylinux/docker-ce:741bf21513328f674e0cdcaa55492b0b75974e08" image: "linuxkit/docker-ce:741bf21513328f674e0cdcaa55492b0b75974e08"
capabilities: capabilities:
- all - all
net: host net: host
@ -69,7 +69,7 @@ services:
- /lib/modules:/lib/modules - /lib/modules:/lib/modules
- /run:/var/run - /run:/var/run
- name: test-docker-bench - name: test-docker-bench
image: "mobylinux/test-docker-bench:2f941429d874c5dcf05e38005affb4f10192e1a8" image: "linuxkit/test-docker-bench:2f941429d874c5dcf05e38005affb4f10192e1a8"
ipc: host ipc: host
pid: host pid: host
net: host net: host
@ -79,6 +79,6 @@ services:
- all - all
trust: trust:
image: image:
- mobylinux/kernel - linuxkit/kernel
outputs: outputs:
- format: kernel+initrd - format: kernel+initrd

View File

@ -1,4 +1,4 @@
FROM debian:jessie-slim@sha256:2a14128195ab26b1c56c5773dda9def9b909c2e01596ef9108e2295d418210a3 FROM debian:jessie-slim@sha256:fb22c1cef74071a6cd0145c1f91ca85ba9bd3f8b4d6db8560fe69eb36a175ca3
ADD . / ADD . /
WORKDIR /opt/ltp WORKDIR /opt/ltp
ENTRYPOINT ["/bin/sh", "/check.sh"] ENTRYPOINT ["/bin/sh", "/check.sh"]

View File

@ -23,15 +23,15 @@ hash: Dockerfile.pkg ltp.tar check.sh $(DEPS)
cat Dockerfile.pkg check.sh $(DEPS) | DOCKER_CONTENT_TRUST=1 docker run --rm -i $(SHASUM) sha1sum | sed 's/ .*//' > $@ cat Dockerfile.pkg check.sh $(DEPS) | DOCKER_CONTENT_TRUST=1 docker run --rm -i $(SHASUM) sha1sum | sed 's/ .*//' > $@
push: hash push: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \ (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):$(shell cat hash)) docker push linuxkit/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash
tag: hash tag: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash

View File

@ -1,14 +1,14 @@
kernel: kernel:
image: "mobylinux/kernel:4.9.x" image: "linuxkit/kernel:4.9.x"
cmdline: "console=ttyS0" cmdline: "console=ttyS0"
init: init:
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b - linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
- mobylinux/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9 - linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
- mobylinux/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b - linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
- mobylinux/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935 - linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
onboot: onboot:
- name: ltp - name: ltp
image: "mobylinux/test-ltp-20170116:d4722477c11e0006d6e5529efe241b6ae70ff3a9" image: "linuxkit/test-ltp-20170116:81229df2d25065b06f0a3071faaace8d66c87e67"
net: host net: host
pid: host pid: host
binds: binds:
@ -17,7 +17,7 @@ onboot:
- all - all
services: services:
- name: poweroff - name: poweroff
image: "mobylinux/poweroff:961412b8ef5c5285de0d40ec076701d955eaa084" image: "linuxkit/poweroff:961412b8ef5c5285de0d40ec076701d955eaa084"
pid: host pid: host
capabilities: capabilities:
- CAP_SYS_BOOT - CAP_SYS_BOOT

View File

@ -11,15 +11,15 @@ hash: Dockerfile poweroff.sh
docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > hash docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > hash
push: hash push: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \ (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):$(shell cat hash)) docker push linuxkit/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash
tag: hash tag: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash

View File

@ -1,11 +1,11 @@
kernel: kernel:
image: "mobylinux/kernel:4.9.x" image: "linuxkit/kernel:4.9.x"
cmdline: "console=ttyS0" cmdline: "console=ttyS0"
init: init:
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b - linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
- mobylinux/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9 - linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
- mobylinux/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b - linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
- mobylinux/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935 - linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
onboot: onboot:
- name: dhcpcd - name: dhcpcd
image: "linuxkit/dhcpcd:48e249ebef6a521eed886b3bce032db69fbb4afa" image: "linuxkit/dhcpcd:48e249ebef6a521eed886b3bce032db69fbb4afa"
@ -19,7 +19,7 @@ onboot:
net: host net: host
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: check - name: check
image: "mobylinux/check:c9e41ab96b3ea6a3ced97634751e20d12a5bf52f" image: "linuxkit/check:43c4147dda4e02d066ef158cd81718dbff8c8bd0"
pid: host pid: host
capabilities: capabilities:
- CAP_SYS_BOOT - CAP_SYS_BOOT

View File

@ -28,15 +28,15 @@ hash: Dockerfile.pkg $(DEPS)
find $^ -type f | xargs cat | DOCKER_CONTENT_TRUST=1 docker run --rm -i $(SHASUM) sha1sum | sed 's/ .*//' > $@ find $^ -type f | xargs cat | DOCKER_CONTENT_TRUST=1 docker run --rm -i $(SHASUM) sha1sum | sed 's/ .*//' > $@
push: hash container push: hash container
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \ (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):$(shell cat hash)) docker push linuxkit/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash
tag: hash container tag: hash container
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build docker rmi $(IMAGE):build
rm -f hash rm -f hash

View File

@ -1,18 +1,18 @@
kernel: kernel:
# Alternatively: # Alternatively:
# image: "mobylinux/kernel:4.10.4-0" # image: "linuxkit/kernel:4.10.4-0"
# image: "mobylinux/kernel:4.9.16-1" # image: "linuxkit/kernel:4.9.16-1"
# image: "mobylinux/kernel:4.9.14-0" # image: "linuxkit/kernel:4.9.14-0"
image: "mobylinux/kernel:4.9.x" image: "linuxkit/kernel:4.9.x"
cmdline: "console=ttyS0 page_poison=1" cmdline: "console=ttyS0 page_poison=1"
init: init:
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b - linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
- mobylinux/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9 - linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
- mobylinux/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b - linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
- mobylinux/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935 - linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
onboot: onboot:
- name: sysctl - name: sysctl
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c" image: "linuxkit/sysctl:1f5ec5d5e6f7a7a1b3d2ff9dd9e36fd6fb14756a"
net: host net: host
pid: host pid: host
ipc: host ipc: host
@ -21,7 +21,7 @@ onboot:
readonly: true readonly: true
services: services:
- name: rngd - name: rngd
image: "mobylinux/rngd:3dad6dd43270fa632ac031e99d1947f20b22eec9" image: "linuxkit/rngd:f5e5be43e730ea819c3293d5c6dcbfa7f4c5c314"
capabilities: capabilities:
- CAP_SYS_ADMIN - CAP_SYS_ADMIN
oomScoreAdj: -800 oomScoreAdj: -800
@ -38,7 +38,7 @@ services:
net: host net: host
oomScoreAdj: -800 oomScoreAdj: -800
- name: virtsock-server - name: virtsock-server
image: "mobylinux/test-virtsock:35fea96fd01f6edb67021c494ddf098fdb8bbca0" image: "linuxkit/test-virtsock:cd2135acdc225f3bd0503678bb50bbd3e0b194b2"
readonly: true readonly: true
outputs: outputs:
- format: kernel+initrd - format: kernel+initrd