This test was building all the supported output formats and so was taking
orders of magnitude longer than every other test. It was also obscuring which
output formats were slow and/or broken.
The vhd test remains skipped.
Signed-off-by: Ian Campbell <ijc@docker.com>
pull in newer containerd v1.0.0-alpha0 via updated alpine base, update runc to
429a5387123625040bacfbb60d96b1cbd02293ab which is vendored by that version of
containerd (and also update alpine base for runc)
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
These are not needed, but we are inconsistent. Been waiting for a
quiet moment to fix this since I noticed while doing a presentation...
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
These test specific combinations of TCP/UDP/IPv4/IPv6/veth/loopback
for all the kernels.
Tests take quite a while to run so there are two new labels:
'kernel' and 'kernel-extra'. 'kernel' runs the more important
tests for the two kernels we care most about. 'kernel-extra'
are additional tests for completeness.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- Use the new style kernel tags with the full kernel version
- Update packages with new alpine base and new/simplified Makefiles.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This is based on examples/getty.yml modified to drop console=tty0 from the
command line since we will be capturing/logging only the serial so want
everything to go there.
Also updates the getty example to pickup the latest containerd and
ca-certificates as used in the top level linuxkit.yml.
Fix a typo in the containerd test too.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
See #1872 this is very flaky and without a controlled known
working environment this is not helpful.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
The previous commit moved some filesystems to kernel modules.
modprobe them before checking if they are enabled.
Also update the YAML files for the tests.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Adds a new test group "linuxkit.build.blueprints" and a test for
building blueprints/docker-for-mac.yml.
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
This includes https://github.com/containerd/containerd/pull/994 and hence
requires updating the various instances of `/etc/containerd/config.toml`.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Currently it supports only `service start <SERVICE>`, but it could grow e.g.
`stop`, `exec` etc in the future (although you can still use `ctr` for those).
In order to be able to use go-compile.sh the containerd build needs to move
from /root/go to /go as the GOPATH.
The vendoring situation is not ideal, but since this tool wants to be an exact
match for the containerd it seems tollerable to reuse its vendoring.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
The new init adds the usermode helper which is needed with
the soon to be pushed new 4.11 kernel update.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Without `-depth` find will first `rm -rf foo` and then try to recurse into
`foo` resulting in `No such file or directory`.
With this the various `|| true` suffixes should no longer be required.
Lastly, in test/cases/040_packages/013_mkimage/test.sh cleanup any
`disk.qcow2*` detritus as well as the image itself.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Make sure we do not remove filesystems we expect to have.
Fix the failure cases for the kernel tests which were not working properly
due to shell code.
Fix some 4.11 kernel changes in config that show up once tests are fixed.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
If you also use console=tty0 you lose the output of commands running from
the system, as they run on the second console which is discarded.
Also drop page-poison as not relevant for tests.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
With the updated HyperKit go bindings we can redirect the VM output
and check for test results. Use this for all kernel tests as this
speeds up running the tests on OSX.
Also use 'set -x' instead of 'set -v' for consistency and don't fail
when the clean up code fails.
The mkimage package test currently doesn't work on HyperKit as it
requires support for multiple disks to be added.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
With the updated HyperKit go bindings we can redirect the VM output
and check for test results. Use this for all kernel tests as this
speeds up running the tests on OSX.
Also enable 'set -x' so we see the commands being executed and don't
fail the test if the cleanup failed.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
0eb21735ae accidentally broke some package
builds by switching linuxkit/alpine to linuxkit/containerd. Let's revert
the ones that shouldn't be there.
Closes#1991
Signed-off-by: Tycho Andersen <tycho@docker.com>
- rename img→raw and gcp-img→gcp
- support creating `docker` outputs, see https://github.com/moby/tool/tree/master/examples
- less memory usage via streaming outputs
- allow specification of multiple yaml files in a single command line, improves modularity
- notary fixes and local cache, so does not pull as much
- you now have to specify the full filename of the yaml file, you cannot omit the suffix
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Note that this is not the latest (which was 95efd45db073 at time of writing)
but the next commit 6428b4bad0c2 merges "Port ctr to use client package" breaks
the use of `ctr run --runtime-config` (by removing that option).
This contains https://github.com/containerd/containerd/pull/954 which was
causing some services to fail to start.
All previous uses of 15541037b9 are updated to
5749f2e9e6.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
- no longer uses several of the `mkimage-*` tools in favour of dogfooding
with `linuxkit` and using the `mkimage` package.
- fix the qemu docker container fallbacks to work better when multiple
paths are used for disks and the image.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This changes the CLI specification for disks, as it needs to be able to
be repeated.
```
linuxkit run qemu -disk name,size=1G,format=qcow2 ...
```
Options may be omitted.
Currently other local backends may not support multiple disks, but this
can be added in future. Code for cloud backends has not changed as the
disk support is specific to the platform.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Update everything including the current
linuxkit/containerd:b1766e4c4c09f63ac4925a6e4612852a93f7e73b to the new
linuxkit/containerd:deaf5bf838bf7f131c2287ecff3ed9835b0497e2.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This test check that the link is up, that we got a IP address
and the output of the dhcpcd daemon.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Don't rely on systctl test package. Instead, add the check shell
script to the image and execute it with a standard Alpine image.
While at it, make the test more verbose.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Use the index in the alphabet (a=1...) to group the tests
a little bit. The actual order does not matter.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- Update to packages using the Alpine 3.6 base image
- Remove config for packages which now supply it
- Update/add trust section
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The remaining packages will be updated with subsequent commits
to also include the config label.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The latest version of the `moby` tool now requires that the output formats
be specified in the CLI not in the yaml file.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This goes against collective responsibility for code. If you want to know the
author use git.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
For all output formats except kernel+initrd, you must use the full path of
the file they want to run. Make the options auto detect.
Split the uefi option to mean "use uefi firmware" not be ISO specific.
Allow specifying a bootable disk image, so we can test disk image output
formats with qemu too.
Add a test case for qcow2 boot under qemu.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This uses 'expect' instead of 'grep' because hyperkit is
a bit finicky with re-directing the output (it expects a
tty). 'expect' handles this and is installed on macOS by
default.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- Add a test for the kernel config for each supported kernel
- simplify YAML files: no need for ca certificates nor DHCP
- Explicitly state that the kernel module tests are for
the 4.9 kernel.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The qemu backend defaults to running against a locally installed
qemu but falls back to running in a container if qemu is not
installed. This test explicitly tests that the containerised
qemu backend works only if there is a locally installed qemu.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The detailed logs should be gathered by linuxkit-ci
and having the default output makes it easier to spot
which test failed.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
These tests should be run via rtf but currently are
run via linuxkit-ci. This is a hack and hopefully is now
marked more clearly as such.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This was a hack in the first place and will be replaced by
another, more obvious hack in the next commit.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This should be replaced with more comprehensive documentation in
./doc/testing.md once the CI is fixed
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
There is no need to split the build from run as we have separate build tests
Also shuffle the order around a little. Double digit numbers are for local hypervisor
tests and tripple digit tests are for cloud.
Removed GCP test as they weren't run.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- Add a tests which generates all supported outputs
- move the examples build tests to the new group
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This adds a test suite to be executed using `linuxkit/rtf`.
This is installed in the top-level Makefile
The tests are written in shell script and cover the following cases:
- Kernel Config is OK!
- Kernel Modules can be built and loaded
- QEMU can build and run kernel+initrd, iso-bios and iso-uefi
- That we can build for all other supported output formats
- That all of the examples in `./examples` can be built
- The LTP tests can be run (if `-l slow` is provided)
The virtsock and docker-bench tests were migrated but no test has been
written as yet as AFAICT they are still a WIP
Signed-off-by: Dave Tucker <dt@docker.com>
Works around https://github.com/moby/moby/issues/33176 and fixes#1807.
Updated al users of linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38 to
this new build.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Pick up the new versin of the virtsock test package
Also remove the iso-ios output and adjust the choice of Linux kernels.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The new version has improvements to the Windows code as well
as initial support for the VMware/virtio based Hyper-V socket
interface.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
this removes all test targets from the top level makefile with the
exception of `make test` that now calls `$(MAKE) -C test`.
all tests now use `moby run` by instead of the older `./scripts`.
this removes the need for dedicated qemu/hyperkit test targets.
Signed-off-by: Dave Tucker <dt@docker.com>
The test is currently not hooked up, but it pulls the latest 4.9.x
kernel image, builds a simple kernel module against it and then creates
a test package containing the kernel module and a shell script.
The shell script prints out the 'modinfo' and then tries to 'insmod'
the module. It checks the output of 'dmesg' of the load succeeded.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
We were using Debian but Alpine more consistent. Use nested build.
Currently extract the hash in a nasty way but this can be fixed later
when we switch over hashing method.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Previously the "tini" contained the entire build. Using the
multi-stage build creates a new "tini" base image, which only
contains the "/bin/tini". This image can be used as the base
image for packages requiring "tini".
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Previously only `/var` was `rshared` but some people need to share
mounts in `/opt` etc so let us make everything `rshared` for now.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
The sha1 tag should be sufficient to uniquely identify the image
and the sha256 versions are just very long...
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- grant all capabilities
- generate human readable output
- add a check.sh script to see if the tests passed/failed
- add a poweroff image to handle powering off the vm
Signed-off-by: Dave Tucker <dt@docker.com>
This is needed for cloud environments that want to get their metadata in
the onboot phase over the network.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Instead of mounting a new filesystem, revert to doing a `rw` bind.
However do not make `/` `rshared`, just `/var` as that is where we expect
filesystems to be mounted for persistence. Also only make the actual
container rootfs writeable, not the whole directory.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
A few YAML files include the binfmt container, where it's not really
needed. Remove it to make the samples simpler.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
As suggested by @shykes these are clearer
- onboot for things that are run at boot time to completion
- services for persistent services
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Also add ca-certificates to base, needed to use `dist` to pull.
Make two stage builds for `containerd` and `runc` so they have a
from `scratch` second stage.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
It is not necessary to bring up `eth0`, the program does it fine.
This means we can remove shell script, clean up build.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit implements `moby run gcp` which allows for testing of moby
images on the Google Cloud Platform
This backend attaches (via SSH) to the serial console.
It generates instance-only SSH keys and adds the public key to the
image metadata. These are used by the `moby` tool only.
It will also automatically upload a file and creates an image if the prefix
given to `moby run` is a filename
Signed-off-by: Dave Tucker <dt@docker.com>
In the riddler change I changed "command" in the yaml to "args"
but did not change the files. In fact we basically used the
default command everywhere so this did not actually break.
Remove the unnecessary "command" lines to simplify yaml.
Revert the command to args change for now as I think I prefer
command, but its easier to switch now. Need to think if the
entrypoint/command distinction matters before finalizing.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Generated largely from the specified config; small parts taken from `docker image inspect`,
such as the command line.
Renamed some of the yaml keys to match the OCI spec rather than Docker Compose as
we decided they are more readable, no more underscores.
Add some extra functionality
- tmpfs specification
- fully general mount specification
- no new privileges can be specified now
For nostalgic reasons, using engine-api to talk to the docker cli as
we only need an old API version, and it is nice and easy to vendor...
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This is compatible with containerd 8353da59c6ae7e1933aac2228df23541ef8b163f
which was picked up by d2caae4c1a.
This required jiggering with riddler output some more to update to new OCI
config.json format for capabilities.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
docker-compose and other utilities use the .yml extension.
For consistency rename all .yaml to .yml
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- now supports image pull and run end to end
- update runc to last version before spec update fix#1302
- remove ext2 utils from init
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Containerise the stress tests for virtio and Hyper-V
sockets from https://github.com/rneugeba/virtsock
See README.md for more details
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Previously, this was disabled because the fixed sized FAT
partition was too small. With d8d6a85 the FAT partition is
dynamically sized and the ISO can be build.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This does not yet move the `make test` options in the Makefile, will
probably move those too later.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This is temporary, it should be under `containers/` just as soon
as we have a manifest setup.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>