diff options
author | Ross Burton <ross.burton@arm.com> | 2023-09-05 17:40:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-07 14:42:37 +0100 |
commit | c8ba5f07719a89bbef24b58a797c1c7a154e1462 (patch) | |
tree | 1a4a7ea9ff6e4a5a0c71b8cfae1daa98b496fc95 /meta/recipes-core | |
parent | d2b17a0db77c5b972a6395a058346731b3301172 (diff) | |
download | poky-c8ba5f07719a89bbef24b58a797c1c7a154e1462.tar.gz |
busybox: remove coreutils dependency in busybox-ptest
A dependency on coreutils was added to busybox-ptest in oe-core 658c5ed
to fix a test failure.
The failure is because one of the start-stop-daemon tests is known to
fail if /bin/false is busybox. Instead of failing, we can check if
/bin/false is a symlink to busybox and skip the test if so.
[ YOCTO #15068 ]
(From OE-Core rev: 37482e404cf4dcf9360c29986ced8db78baf249b)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 2 | ||||
-rw-r--r-- | meta/recipes-core/busybox/busybox/start-stop-false.patch | 35 | ||||
-rw-r--r-- | meta/recipes-core/busybox/busybox_1.36.1.bb | 1 |
3 files changed, 37 insertions, 1 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 582d87949e..f5d7c3f9c8 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc | |||
@@ -56,7 +56,7 @@ RDEPENDS:${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_man | |||
56 | inherit cml1 systemd update-rc.d ptest | 56 | inherit cml1 systemd update-rc.d ptest |
57 | 57 | ||
58 | # busybox's unzip test case needs zip command, which busybox itself does not provide | 58 | # busybox's unzip test case needs zip command, which busybox itself does not provide |
59 | RDEPENDS:${PN}-ptest = "zip coreutils" | 59 | RDEPENDS:${PN}-ptest = "zip" |
60 | 60 | ||
61 | # internal helper | 61 | # internal helper |
62 | def busybox_cfg(feature, tokens, cnf, rem): | 62 | def busybox_cfg(feature, tokens, cnf, rem): |
diff --git a/meta/recipes-core/busybox/busybox/start-stop-false.patch b/meta/recipes-core/busybox/busybox/start-stop-false.patch new file mode 100644 index 0000000000..3aef68329c --- /dev/null +++ b/meta/recipes-core/busybox/busybox/start-stop-false.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | It's known that the final start-stop-daemon test fails if /bin/false is | ||
2 | actually a busybox symlink. Instead of failing, check if false is | ||
3 | busybox and adapt the expected output to match. | ||
4 | |||
5 | Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2023-August/090416.html] | ||
6 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
7 | |||
8 | diff --git a/testsuite/start-stop-daemon.tests b/testsuite/start-stop-daemon.tests | ||
9 | index 0757b1288..aa6e9cc41 100755 | ||
10 | --- a/testsuite/start-stop-daemon.tests | ||
11 | +++ b/testsuite/start-stop-daemon.tests | ||
12 | @@ -27,10 +27,18 @@ testing "start-stop-daemon without -x and -a" \ | ||
13 | # but at least it checks that pathname to exec() is correct | ||
14 | # | ||
15 | # NB: this fails if /bin/false is a busybox symlink: | ||
16 | -# busybox looks at argv[0] and says "qwerty: applet not found" | ||
17 | -testing "start-stop-daemon with both -x and -a" \ | ||
18 | - 'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \ | ||
19 | - "1\n" \ | ||
20 | - "" "" | ||
21 | +# busybox looks at argv[0] and says "qwerty: applet not found", so | ||
22 | +# skip the test if false is busybox. | ||
23 | +case $(readlink /bin/false) in | ||
24 | + *busybox*) | ||
25 | + echo "SKIPPED: start-stop-daemon with both -x and -a (need non-busybox false)" | ||
26 | + ;; | ||
27 | + *) | ||
28 | + testing "start-stop-daemon with both -x and -a" \ | ||
29 | + 'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \ | ||
30 | + "1\n" \ | ||
31 | + "" "" | ||
32 | + ;; | ||
33 | +esac | ||
34 | |||
35 | exit $FAILCOUNT | ||
diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb b/meta/recipes-core/busybox/busybox_1.36.1.bb index 968dce65e4..06eb9eb999 100644 --- a/meta/recipes-core/busybox/busybox_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox_1.36.1.bb | |||
@@ -49,6 +49,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
49 | file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ | 49 | file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ |
50 | file://0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch \ | 50 | file://0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch \ |
51 | file://0002-nslookup-sanitize-all-printed-strings-with-printable.patch \ | 51 | file://0002-nslookup-sanitize-all-printed-strings-with-printable.patch \ |
52 | file://start-stop-false.patch \ | ||
52 | " | 53 | " |
53 | SRC_URI:append:libc-musl = " file://musl.cfg " | 54 | SRC_URI:append:libc-musl = " file://musl.cfg " |
54 | # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html | 55 | # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html |