Skip to content

Commit

Permalink
ovsdb-cluster.at: Fix infinite loop in torture tests.
Browse files Browse the repository at this point in the history
For some reason, while running cluster torture tests in GitHub Actions
workflow, failure of 'echo' command doesn't fail the loop and subshell
never exits, but keeps infinitely printing errors after breaking from
the loop on the right side of the pipeline:

  testsuite: line 8591: echo: write error: Broken pipe

Presumably, that is caused by some shell configuration option, but
I have no idea which one and I'm not able to reproduce locally with
shell configuration options provided in GitHub documentation.
Let's just add an explicit 'exit' on 'echo' failure.  This will
guarantee exit from the loop and the subshell regardless of
configuration.

Fixes: 0f03ae3 ("ovsdb: Improve timing in cluster torture test.")
Acked-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
  • Loading branch information
igsilya committed Dec 4, 2020
1 parent 292333b commit 05c250a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ovsdb-cluster.at
Expand Up @@ -702,7 +702,7 @@ ovsdb|WARN|schema: changed 2 columns in 'OVN_Southbound' database from ephemeral
# Use file instead of var because code inside "while" runs in a subshell.
echo 0 > phase
i=0
(while :; do echo; sleep 0.1; done) | while read REPLY; do
(while :; do echo || exit 0; sleep 0.1; done) | while read REPLY; do
printf "t=%2d s:" $i
done=0
for j in $(seq 0 $(expr $n1 - 1)); do
Expand Down

0 comments on commit 05c250a

Please sign in to comment.