summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:19:54 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:19:54 +0200
commitc158582c0fc7f4bd73980fe9adad446855f4d61b (patch)
tree31b701a2367cb983e76e76cd7c2ba176ad33e5ac /recipes-containers/lxc/files/lxc-test-attach-replace-cmp-with-grep.patch
downloadmeta-vt-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
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.patch24
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 @@
1lxc: Update lxc-test-attach
2
3For Enea Linux, the SysV init file is different from busybox, causing cmp to
4return an error. In order to preserve the test's logic it was replaced with a
5command which succeeds in every situation:
6(e.g. search for root in /etc/passwd using grep).
7
8Upstream-Status: Pending
9
10Signed-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");