blob: 3aef68329cc3268b1b7b4ff77b79bc5731210349 [file] [log] [blame]
Andrew Geissler5082cc72023-09-11 08:41:39 -04001It'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@@ -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