diff options
Diffstat (limited to 'recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch')
-rw-r--r-- | recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch b/recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch new file mode 100644 index 0000000..88d2450 --- /dev/null +++ b/recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | lxc: Update lxc-test-attach | ||
2 | |||
3 | For Enea Linux, the SysV init file is different from busybox, causing cmp to | ||
4 | return an error. In order to preserve the test's logic it was replaced with a | ||
5 | command which succeeds in every situation: | ||
6 | (e.g. search for root in /etc/passwd using grep). | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Petre Pircalabu <petre.pircalabu@enea.com> | ||
11 | |||
12 | --- a/src/tests/attach.c | ||
13 | +++ b/src/tests/attach.c | ||
14 | @@ -237,8 +237,8 @@ static int test_attach_cmd(struct lxc_co | ||
15 | { | ||
16 | int ret; | ||
17 | pid_t pid; | ||
18 | - char *argv[] = {"cmp", "-s", "/sbin/init", "/bin/busybox", NULL}; | ||
19 | - lxc_attach_command_t command = {"cmp", argv}; | ||
20 | + char *argv[] = {"grep", "-q", "root", "/etc/passwd", NULL}; | ||
21 | + lxc_attach_command_t command = {"grep", argv}; | ||
22 | lxc_attach_options_t attach_options = LXC_ATTACH_OPTIONS_DEFAULT; | ||
23 | |||
24 | TSTOUT("Testing attach with success command...\n"); | ||