summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch
blob: 88d24504b7a7e0c3bd5c035e2679de7cfba2f6d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
lxc: Update lxc-test-attach

For Enea Linux, the SysV init file is different from busybox, causing cmp  to 
return an error. In order to preserve the test's logic it was replaced with a
command which succeeds  in every situation: 
(e.g. search for  root in /etc/passwd using grep).

Upstream-Status: Pending

Signed-off-by: Petre Pircalabu <petre.pircalabu@enea.com>

--- a/src/tests/attach.c
+++ b/src/tests/attach.c
@@ -237,8 +237,8 @@ static int test_attach_cmd(struct lxc_co
 {
 	int ret;
 	pid_t pid;
-	char *argv[] = {"cmp", "-s", "/sbin/init", "/bin/busybox", NULL};
-	lxc_attach_command_t command = {"cmp", argv};
+	char *argv[] = {"grep", "-q", "root", "/etc/passwd", NULL};
+	lxc_attach_command_t command = {"grep", argv};
 	lxc_attach_options_t attach_options = LXC_ATTACH_OPTIONS_DEFAULT;
 
 	TSTOUT("Testing attach with success command...\n");