1It's known that the final start-stop-daemon test fails if /bin/false is
2actually a busybox symlink.  Instead of failing, check if false is
3busybox and adapt the expected output to match.
4
5Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2023-August/090416.html]
6Signed-off-by: Ross Burton <ross.burton@arm.com>
7
8diff --git a/testsuite/start-stop-daemon.tests b/testsuite/start-stop-daemon.tests
9index 0757b1288..aa6e9cc41 100755
10--- a/testsuite/start-stop-daemon.tests
11+++ b/testsuite/start-stop-daemon.tests
12@@ -50,11 +50,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-test ! -L /bin/false && \
18-testing "start-stop-daemon with both -x and -a" \
19-	'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \
20-	"1\n" \
21-	"" ""
22+# busybox looks at argv[0] and says "qwerty: applet not found", so
23+# skip the test if false is busybox.
24+case $(readlink /bin/false) in
25+	*busybox*)
26+		echo "SKIPPED: start-stop-daemon with both -x and -a (need non-busybox false)"
27+		;;
28+	*)
29+		testing "start-stop-daemon with both -x and -a" \
30+			'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \
31+			"1\n" \
32+			"" ""
33+		;;
34+esac
35
36 exit $FAILCOUNT
37