lava-test-runner shell script assumes 'read -t'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LAVA Dispatcher |
Fix Released
|
Medium
|
Antonio Terceiro |
Bug Description
When we call a test case via lava-test-shell and inside the test definition if we have a step which makes use of 'lava-test-case' then the lava-test-runner script assumes the current shell has 'read -t' command. This happens for tests run in android where we do not have 'read -t' option. An extract from the log is shown below:
<snip>
<LAVA_TEST_RUNNER>: running 0_busybox under lava-test-shell...
<LAVA_SIGNAL_
echo LAVA_ACK > /lava_ack.fifo
root@linaro# /data/lava/
<LAVA_TEST_RUNNER>: 0_busybox exited with: 2
0_busybox-
hwcontext
swcontext
<LAVA_TEST_RUNNER>: calling sync
</snip>
The complete log is available here - https:/
Sample test definition for android is available here - http://
Related branches
- Michael Hudson-Doyle (community): Approve
-
Diff: 418 lines (+50/-134)9 files modifiedlava_dispatcher/actions/lava_test_shell.py (+11/-48)
lava_test_shell/lava-test-case (+4/-4)
lava_test_shell/lava-test-case-attach (+8/-7)
lava_test_shell/lava-test-run-attach (+9/-8)
lava_test_shell/lava-test-runner-android (+12/-19)
lava_test_shell/lava-test-runner-ubuntu (+2/-6)
lava_test_shell/lava-test-runner.conf (+0/-12)
lava_test_shell/lava-test-runner.init.d (+0/-29)
lava_test_shell/lava-test-shell (+4/-1)
Changed in lava-dispatcher: | |
status: | Confirmed → Fix Committed |
Changed in lava-dispatcher: | |
status: | Fix Committed → Fix Released |
BTW I discovered yesterday that when reading stdin from a fifo, `read
-t` does not work at all, i.e. the timeout never happens.
`read -t 1 < /tmp/fifo` will block until there is something to be read
in the fifo.
This behaviour is consistent across busybox sh, bash and dash.
I am dropping the `-t N` in my branches.