[LTP] Question regarding background jobs in LTP

Elif Aslan elas@linux.vnet.ibm.com
Mon Mar 4 10:33:09 CET 2019


Hi, 
please find in attachment the script.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mon_fsstatd.sh
Type: application/octet-stream
Size: 3141 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190304/770f8257/attachment-0001.obj>
-------------- next part --------------


We've tried  "#/bin/sh -x" didn't changed the output
it hangs on the same command:

mon_fsstatd 1 TPASS: 'mon_procd --version' returned '0'
mon_fsstatd 1 TPASS: 'mon_procd -i 30' returned '0'
mon_fsstatd 1 TBROK: test killed, timeout!
the command which lead to the hang - is the same:

mon_fsstatd_run 0 "mon_procd -a &”

---
Elif Aslan

> On 1. Mar 2019, at 12:49, Cyril Hrubis <chrubis@suse.cz> wrote:
> 
> Hi!
>> We've found an issue when executing our testcase mon_fsstatd under LTP. 
>> The test logic assumes that we start some processes as shell jobs and then kill them, like in these commands
>> 
>>    mon_fsstatd_run 0 "mon_procd -a &"
>>    sleep 2
>>    mon_fsstatd_run 0 "killall mon_procd"
>> 
>> But so far we observe that the testcase being run as 
>> ./runltp -f s390x_tests
>> simply hangs at the point of starting background job, it simply runs in foreground, and then test finishes with error after timeout.
>> 
>> Is it possible to execute background jobs in LTP ?
> 
> It should be possible unless the command you are trying to run needs
> access to stdin since that could be done only by the process group
> leader which is always the ltp-pan binary.
> 
> From the snippet of code it's not 100% clear what the code does, can you
> share at least the code for mon_fsstad_run function? Also have you tried
> to change the shebang to #!/bin/sh -x to see where exactly it hangs?
> 
> -- 
> Cyril Hrubis
> chrubis@suse.cz
> 



More information about the ltp mailing list