BusyBox pTest failure
Hi,
We are executing busybox pTests and we see that the test case execution
stops at md5sum test case.
We analyzed and see that the execution gets stuck here
<https://github.com/sailfishos-mirror/busybox/blob/master/testsuite/md5sum.t
ests#L29> at Line no 29.
Below are the relevant code lines:
Line no. 28: text="The quick brown fox jumps over the lazy dog"
Line no. 29: text=yes "$text" | head -c 9999
I executed above two lines on my host machine and the I get the shell prompt back but when executed on target machine, I'm not getting the shell prompt, it gets stuck.
/usr/lib/busybox/ptest # text="The quick brown fox jumps over the lazy dog"
/usr/lib/busybox/ptest # text=yes "$text" | head -c 9999
<<get stuck here indefinitely and I don't get the shell prompt>>
I modified Line no. 29 as below (removed " around $text) and the test case execution proceeds further with "yes: Broken Pipe" error. With the same modification, I don't see this error on my host machine though.
Line no. 29: text=yes $text | head -c 9999
/usr/lib/busybox/ptest # text="The quick brown fox jumps over the lazy dog"
/usr/lib/busybox/ptest # text=yes $text | head -c 9999
yes: Broken pipe
My host machine uses Bash as my default shell where as my target uses busybox sh as my default shell. Does this make any difference?
Any pointers on this will be appreciated.
Thanks,
Ravi
Quoted 46 lines · Richard Purdie
Quoted 2 lines · On Wed, 2021-10-27 at 16:22 +0530, [email protected] wrote:
Hi,
We are executing busybox pTests and we see that the test caseexecution
Quoted 8 lines
stops at md5sum test case.
We analyzed and see that the execution gets stuck here at Line no 29.Below are the relevant code lines:
Line no. 28: text="The quick brown fox jumps over the lazy dog" Line no. 29: text=yes "$text" | head -c 9999I executed above two lines on my host machine and the I get the shell
prompt
Quoted 1 line
back but when executed on target machine, I’m not getting the shell
prompt, it
Quoted 2 lines
gets stuck.
/usr/lib/busybox/ptest# text="The quick brown fox jumps over the lazydog"
Quoted 4 lines
/usr/lib/busybox/ptest# text=yes “$text” | head -c 9999<<get stuck here indefinitely and I don’t get the shell prompt>>I modified Line no. 29 as below (removed “ around $text) and the test
case
Quoted 5 lines
execution proceeds further with “yes: Broken Pipe” error. With the same modification, I don’t see this error on my host machine though. Line no. 29: text=
yes $text | head -c 9999
/usr/lib/busybox/ptest# text="The quick brown fox jumps over the lazydog"
Quoted 4 lines
/usr/lib/busybox/ptest# text=yes $text | head -c 9999
yes: Broken pipeMy host machine uses Bash as my default shell where as my target uses
busybox
Quoted 3 lines
sh as my default shell. Does this make any difference? Any pointers on this will be appreciated.
The shell the test is run under could make a difference, it is probably supposed
to be running under busybox's own sh. I think we put the busybox utils into PATH
in the ptest to try and ensure this is the case but you'd have to double check
that.
Quoted 3 lines
It seems odd you're hitting that as I'd assume we run the busybox ptests ourselves and don't see a hang...
It’s also good to post your build configuration that bitbake prints at the beginning of build this could also be other policies like default libc being musl vs glibc is in play etc
Quoted 17 lines
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#971):
https://lists.yoctoproject.org/g/automated-testing/message/971
Mute This Topic: https://lists.yoctoproject.org/mt/86624536/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/automated-testing/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-