void-packages/srcpkgs/busybox/patches/testsuite-fix-pidof.patch
2017-11-18 13:08:42 +01:00

24 lines
1.1 KiB
Diff

The test assumes the system runs a binary called init as pid1 but Void Linux runs runit
which does not call itself init, so we adjust this test.
--- testsuite/pidof.tests
+++ testsuite/pidof.tests
@@ -19,15 +19,15 @@ testing "pidof (exit with success)" "pidof pidof > /dev/null; echo \$?" \
testing "pidof this" "pidof pidof.tests | grep -o -w $$" "$$\n" "" ""
optional FEATURE_PIDOF_SINGLE
-testing "pidof -s" "pidof -s init" "1\n" "" ""
+testing "pidof -s" "pidof -s runit" "1\n" "" ""
SKIP=
optional FEATURE_PIDOF_OMIT FEATURE_PIDOF_SINGLE
# This test fails now because process name matching logic has changed,
# but new logic is not "wrong" either... see find_pid_by_name.c comments
#testing "pidof -o %PPID" "pidof -o %PPID pidof.tests | grep -o -w $$" "" "" ""
-testing "pidof -o %PPID NOP" "pidof -o %PPID -s init" "1\n" "" ""
-testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" ""
+testing "pidof -o %PPID NOP" "pidof -o %PPID -s runit" "1\n" "" ""
+testing "pidof -o runit" "pidof -o 1 runit | grep -o -w 1" "" "" ""
SKIP=
exit $FAILCOUNT