testsuite/pidof.tests: fix false positive take 2
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 27 Jun 2018 12:50:00 +0000 (14:50 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 27 Jun 2018 12:50:00 +0000 (14:50 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
testsuite/pidof.tests

index b360a127b2915815c722f8080c2865aef0179191..cd10de4e06b3803b46467130ee2ff94da9caa6a1 100755 (executable)
@@ -24,11 +24,16 @@ testing "pidof -s" "pidof -s init" "1\n" "" ""
 SKIP=
 }
 
+test x"`cat /proc/1/comm`" = x"init" && {
 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" "" ""
+SKIP=
+}
+
+optional FEATURE_PIDOF_OMIT
 testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" ""
 SKIP=