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/tests-our-init-is-not-busybox.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/tests-our-init-is-not-busybox.patch')
-rw-r--r-- | recipes-containers/lxc/files/tests-our-init-is-not-busybox.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/tests-our-init-is-not-busybox.patch b/recipes-containers/lxc/files/tests-our-init-is-not-busybox.patch new file mode 100644 index 00000000..4c9bf652 --- /dev/null +++ b/recipes-containers/lxc/files/tests-our-init-is-not-busybox.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From b53169dc4c53f9ef64f8cb06dd9af97182577698 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 31 May 2018 15:00:34 -0400 | ||
4 | Subject: [PATCH] tests: our init is not busybox | ||
5 | |||
6 | Since we are using 'bash' as the init (see our updates to the busybox | ||
7 | template) we can't compare '/sbin/init' and 'busybox'. Actually we are | ||
8 | really only interested in the fact 'cmp' is being run and not the | ||
9 | result, so simplify by comparing '/sbin/init' to itself. | ||
10 | |||
11 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
12 | --- | ||
13 | src/tests/attach.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/tests/attach.c b/src/tests/attach.c | ||
17 | index 2c77127..1c182d6 100644 | ||
18 | --- a/src/tests/attach.c | ||
19 | +++ b/src/tests/attach.c | ||
20 | @@ -251,7 +251,7 @@ static int test_attach_cmd(struct lxc_container *ct) | ||
21 | { | ||
22 | int ret; | ||
23 | pid_t pid; | ||
24 | - char *argv[] = {"cmp", "-s", "/sbin/init", "/bin/busybox", NULL}; | ||
25 | + char *argv[] = {"cmp", "-s", "/sbin/init", "/sbin/init", NULL}; | ||
26 | lxc_attach_command_t command = {"cmp", argv}; | ||
27 | lxc_attach_options_t attach_options = LXC_ATTACH_OPTIONS_DEFAULT; | ||
28 | |||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||