On 11/26/20 11:17 AM, Ilya Maximets wrote: > 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. > > CC: Ben Pfaff <b...@ovn.org> > Fixes: 0f03ae3754ec ("ovsdb: Improve timing in cluster torture test.") > Signed-off-by: Ilya Maximets <i.maxim...@ovn.org> > ---
It doesn't make much sense to have this change on branches 2.11 and 2.10, but to not have on later ones, so I cherry-picked this commit from 2.11 to all newer branches. Best regards, Ilya Maximets. > > GHA shell configuration: > https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell > > tests/ovsdb-cluster.at | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at > index e0758e954..92aa42709 100644 > --- a/tests/ovsdb-cluster.at > +++ b/tests/ovsdb-cluster.at > @@ -701,7 +701,7 @@ ovsdb|WARN|schema: changed 30 columns in 'Open_vSwitch' > 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 > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev