diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-05-31 17:08:06 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-06-03 23:26:52 -0400 |
commit | 1a5853f87cfc0b16d992ed222bbb0ff6066b2617 (patch) | |
tree | 69f38ba542fd85dd9fe1e3067510aaadf7da8295 /recipes-containers/lxc/files/template-make-busybox-template-compatible-with-core-.patch | |
parent | b6bccf42d1042ee52800d307cffb39191b0f35f3 (diff) | |
download | meta-virtualization-1a5853f87cfc0b16d992ed222bbb0ff6066b2617.tar.gz |
lxc: use compiled tests instead of copying source building on target
The tests are already built when we do_compile so we only need to copy
them to the ptest path and create a wrapper script to run them. This
has the added benefit of reducing the size of the lxc package.
We have to manipulate the test sources some to remove gpg validation
and a few other minor changes, none of which actually change what is
being tested (notes are provided in the associated commit logs).
The following are the ptest results currently acheived:
### Starting LXC ptest ###
./tests/lxc-test-api-reboot FAIL
./tests/lxc-test-apparmor SKIPPED
./tests/lxc-test-attach PASS
./tests/lxc-test-automount PASS
./tests/lxc-test-autostart PASS
./tests/lxc-test-cgpath PASS
./tests/lxc-test-cloneconfig PASS
./tests/lxc-test-clonetest PASS
./tests/lxc-test-concurrent PASS
./tests/lxc-test-config-jump-table PASS
./tests/lxc-test-console PASS
./tests/lxc-test-console-log PASS
./tests/lxc-test-containertests PASS
./tests/lxc-test-createconfig PASS
./tests/lxc-test-createtest PASS
./tests/lxc-test-criu-check-feature PASS
./tests/lxc-test-destroytest PASS
./tests/lxc-test-device-add-remove PASS
./tests/lxc-test-get_item PASS
./tests/lxc-test-getkeys PASS
./tests/lxc-test-list PASS
./tests/lxc-test-locktests PASS
./tests/lxc-test-lxcpath PASS
./tests/lxc-test-may-control PASS
./tests/lxc-test-no-new-privs PASS
./tests/lxc-test-parse-config-file PASS
./tests/lxc-test-raw-clone PASS
./tests/lxc-test-reboot PASS
./tests/lxc-test-rootfs PASS
./tests/lxc-test-saveconfig PASS
./tests/lxc-test-share-ns PASS
./tests/lxc-test-shortlived PASS
./tests/lxc-test-shutdowntest SKIPPED
./tests/lxc-test-snapshot PASS
./tests/lxc-test-startone PASS
./tests/lxc-test-state-server SKIPPED
./tests/lxc-test-utils PASS
Results:
PASSED = 33
FAILED = 1
SKIPPED = 3
(for details check individual test log in ./logs directory)
### LXC ptest complete ###
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/lxc/files/template-make-busybox-template-compatible-with-core-.patch')
-rw-r--r-- | recipes-containers/lxc/files/template-make-busybox-template-compatible-with-core-.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/template-make-busybox-template-compatible-with-core-.patch b/recipes-containers/lxc/files/template-make-busybox-template-compatible-with-core-.patch new file mode 100644 index 00000000..1c6022b7 --- /dev/null +++ b/recipes-containers/lxc/files/template-make-busybox-template-compatible-with-core-.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 0990db9b9723589606104d42ac2cf865b78e50a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 31 May 2018 11:44:44 -0400 | ||
4 | Subject: [PATCH] template: make busybox template compatible with | ||
5 | core-image-minimal | ||
6 | |||
7 | The busybox template makes a lot of assumptions about how the busybox | ||
8 | binary found on the host was configured. Building core-image-minimal | ||
9 | "out of the box" does not configure busybox's 'passwd' or 'init' | ||
10 | applets so we need to work around this. | ||
11 | |||
12 | Chances are if you attempt to use the busybox template with a host | ||
13 | which is note core-image-minimal it will fail but we are making these | ||
14 | changes here to at least have the template work with | ||
15 | core-image-minimal to be able to demonstrate that it can work as well | ||
16 | as to have it available for the ptests. | ||
17 | |||
18 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
19 | --- | ||
20 | templates/lxc-busybox.in | 16 +++++++++++++--- | ||
21 | 1 file changed, 13 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in | ||
24 | index 7d00bf5..5a99103 100644 | ||
25 | --- a/templates/lxc-busybox.in | ||
26 | +++ b/templates/lxc-busybox.in | ||
27 | @@ -181,6 +181,19 @@ configure_busybox() | ||
28 | return 1 | ||
29 | fi | ||
30 | |||
31 | + # copy host passwd | ||
32 | + if ! cp "$(which passwd)" "${rootfs}/bin"; then | ||
33 | + echo "ERROR: Failed to copy passwd binary" | ||
34 | + return 1 | ||
35 | + fi | ||
36 | + | ||
37 | + # copy bash binary as the container init | ||
38 | + if ! cp "$(which bash)" "${rootfs}/sbin/init"; then | ||
39 | + echo "ERROR: Failed to copy bash binary" | ||
40 | + return 1 | ||
41 | + fi | ||
42 | + | ||
43 | + | ||
44 | # symlink busybox for the commands it supports | ||
45 | # it would be nice to just use "chroot $rootfs busybox --install -s /bin" | ||
46 | # but that only works right in a chroot with busybox >= 1.19.0 | ||
47 | @@ -191,9 +204,6 @@ configure_busybox() | ||
48 | xargs -n1 ln -s busybox | ||
49 | ) | ||
50 | |||
51 | - # relink /sbin/init | ||
52 | - ln "${rootfs}/bin/busybox" "${rootfs}/sbin/init" | ||
53 | - | ||
54 | # /etc/fstab must exist for "mount -a" | ||
55 | touch "${rootfs}/etc/fstab" | ||
56 | |||
57 | -- | ||
58 | 2.7.4 | ||
59 | |||