* [LTP] Question regarding background jobs in LTP
@ 2019-02-28 14:42 Elif Aslan
2019-03-01 11:49 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Elif Aslan @ 2019-02-28 14:42 UTC (permalink / raw)
To: ltp
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 ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] Question regarding background jobs in LTP
2019-02-28 14:42 [LTP] Question regarding background jobs in LTP Elif Aslan
@ 2019-03-01 11:49 ` Cyril Hrubis
2019-03-04 9:33 ` Elif Aslan
0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2019-03-01 11:49 UTC (permalink / raw)
To: ltp
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] Question regarding background jobs in LTP
2019-03-01 11:49 ` Cyril Hrubis
@ 2019-03-04 9:33 ` Elif Aslan
2019-03-04 13:36 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Elif Aslan @ 2019-03-04 9:33 UTC (permalink / raw)
To: ltp
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1792 bytes --]
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] Question regarding background jobs in LTP
2019-03-04 9:33 ` Elif Aslan
@ 2019-03-04 13:36 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2019-03-04 13:36 UTC (permalink / raw)
To: ltp
Hi!
> 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 &???
Now I see the problem, you cannot pass a string to a function, execute
the variable holding the string, and expect bash to parse special
characters in the string, as it is the & is passed as a parameter to the
mon_procd instead because the string is not broken down.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-04 13:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28 14:42 [LTP] Question regarding background jobs in LTP Elif Aslan
2019-03-01 11:49 ` Cyril Hrubis
2019-03-04 9:33 ` Elif Aslan
2019-03-04 13:36 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox