summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/start-stop-false.patch
blob: 3aef68329cc3268b1b7b4ff77b79bc5731210349 (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
25
26
27
28
29
30
31
32
33
34
35
It's known that the final start-stop-daemon test fails if /bin/false is
actually a busybox symlink.  Instead of failing, check if false is
busybox and adapt the expected output to match.

Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2023-August/090416.html]
Signed-off-by: Ross Burton <ross.burton@arm.com>

diff --git a/testsuite/start-stop-daemon.tests b/testsuite/start-stop-daemon.tests
index 0757b1288..aa6e9cc41 100755
--- a/testsuite/start-stop-daemon.tests
+++ b/testsuite/start-stop-daemon.tests
@@ -27,10 +27,18 @@ testing "start-stop-daemon without -x and -a" \
 # but at least it checks that pathname to exec() is correct
 #
 # NB: this fails if /bin/false is a busybox symlink:
-# busybox looks at argv[0] and says "qwerty: applet not found"
-testing "start-stop-daemon with both -x and -a" \
-	'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \
-	"1\n" \
-	"" ""
+# busybox looks at argv[0] and says "qwerty: applet not found", so
+# skip the test if false is busybox.
+case $(readlink /bin/false) in
+    *busybox*)
+        echo "SKIPPED: start-stop-daemon with both -x and -a (need non-busybox false)"
+        ;;
+    *)
+		testing "start-stop-daemon with both -x and -a" \
+			'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \
+			"1\n" \
+			"" ""
+        ;;
+esac
 
 exit $FAILCOUNT