Bug 13521 - start-stop-daemon: test failed with -a option
Summary: start-stop-daemon: test failed with -a option
Status: ASSIGNED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.31.x
Hardware: All Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-05 17:04 UTC by dharan
Modified: 2021-03-10 10:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
busybox-1.32.1-config-file (30.54 KB, application/octet-stream)
2021-02-05 17:04 UTC, dharan
Details
Strace log (25.53 KB, text/x-log)
2021-02-10 11:04 UTC, dharan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dharan 2021-02-05 17:04:37 UTC
Created attachment 8756 [details]
busybox-1.32.1-config-file

When running testsuite, one of the "start-stop-daemon" testcases fails:

# ./runtest  -v start-stop-daemon
======================
echo -ne '' >input
echo -ne '' | start-stop-daemon -S -x true 2>&1; echo $?
PASS: start-stop-daemon -x without -a
======================
echo -ne '' >input
echo -ne '' | start-stop-daemon -S -a false 2>&1; echo $?
PASS: start-stop-daemon -a without -x
======================
echo -ne '' >input
echo -ne '' | start-stop-daemon -S false 2>&1; echo $?
PASS: start-stop-daemon without -x and -a
======================
echo -ne '' >input
echo -ne '' | start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?
FAIL: start-stop-daemon with both -x and -a
--- expected
+++ actual
@@ -1 +1,2 @@
-1
+qwerty: applet not found
+127
#
Comment 1 dharan 2021-02-09 05:13:07 UTC
Hi Team,

   Can you please share update on requested failed case. 

Regards,
-Dharan
Comment 2 dharan 2021-02-10 11:04:50 UTC
Created attachment 8761 [details]
Strace log
Comment 3 Denys Vlasenko 2021-03-09 00:11:59 UTC
your /bin/false is a symplink to busybox?

Then the failure is expected: busybox looks at argv[0] to determine what to do.
Comment 4 dharan 2021-03-10 05:55:41 UTC
Hi Denys,

> your /bin/false is a symplink to busybox?

Yes, the /bin/false command is symbolic link to /bin/busybox.

> Then the failure is expected: busybox looks at argv[0] to determine what to do.

In this case, the test case output should be PASS right instead of FAIL?

----------------------------------
echo -ne '' | start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?
FAIL: start-stop-daemon with both -x and -a
--- expected
+++ actual
@@ -1 +1,2 @@
-1
+qwerty: applet not found
+127
----------------------------------

Regards,
-Dharan
Comment 5 Denys Vlasenko 2021-03-10 10:47:19 UTC
>Yes, the /bin/false command is symbolic link to /bin/busybox.
>
>> Then the failure is expected: busybox looks at argv[0] to determine what to do.
>
>In this case, the test case output should be PASS right instead of FAIL?

No, it'll fail. busybox looks at argv[0] to determine what to do. In this case, it sees "qwerty" in argv[0] and acts accordingly: says "qwerty: applet not found".