Tests OVS datapath key parsing and formatting - valid forms OVS datapath actions parsing and formatting - userdata overflow sometimes failed with stderr output: "sed: couldn't write X items to stdout: Broken pipe" and "cat: actions.txt: EPIPE: Broken pipe".
This occurred due to a race condition where the python test script (test-dpparse.py) would finish processing and close its stdin before the pipeline (cat | sed | sed) completed writing all its output. When this happened, both cat and sed received SIGPIPE and wrote error messages to stderr, causing the AT_CHECK macro to fail the test. The issue was more likely to manifest in build environments with restricted resources. Fixed by redirecting sed and cat stderr to /dev/null in both tests, suppressing the harmless SIGPIPE error messages. The Python script still validates all the data it needs, so no test coverage is lost. Signed-off-by: Matteo Perin <[email protected]> --- tests/odp.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/odp.at b/tests/odp.at index 402b2386d..fac5d5860 100644 --- a/tests/odp.at +++ b/tests/odp.at @@ -102,7 +102,7 @@ sed -i'back' 's/\(ct_label([[^)]]*)\),\(eth\)/\1,packet_type(ns=0,id=0),\2/' odp AT_CHECK_UNQUOTED([ovstest test-odp parse-keys < odp-in.txt], [0], [`cat odp-out.txt` ]) -AT_CHECK_UNQUOTED([cat odp-in.txt | sed 's/^#.*//' | sed 's/$/ actions:drop/' | test-dpparse.py]) +AT_CHECK_UNQUOTED([cat odp-in.txt 2>/dev/null | sed 's/^#.*//' 2>/dev/null | sed 's/$/ actions:drop/' 2>/dev/null | test-dpparse.py]) AT_CLEANUP AT_SETUP([OVS datapath wildcarded key parsing and formatting - valid forms]) @@ -465,7 +465,7 @@ odp_actions_from_string: error `cat actions.txt | head -3 | tail -1` odp_actions_from_string: error ]) -AT_CHECK_UNQUOTED([cat actions.txt | sed 's/^/actions:/' | test-dpparse.py]) +AT_CHECK_UNQUOTED([cat actions.txt 2>/dev/null | sed 's/^/actions:/' 2>/dev/null | test-dpparse.py]) AT_CLEANUP AT_SETUP([OVS datapath actions parsing and formatting - actions too long]) -- 2.43.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
