From 9f7f62615f3963591af33fcc7582867f7063efd2 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sat, 6 Feb 2021 13:05:45 -0800 Subject: netcat.test: reduce flake. Starting two netcats at the same time and expecting them to be able to talk to each is a little optimistic. I don't know whether `sleep .1` will be sufficient, but wanted to try that before going to `sleep 1` since neither the toybox nor the github nor the Android infrastructure is running these tests in parallel, those seconds add up. Right now this has a ~20% flake rate on the Android infrastructure. I was able to reproduce the flake locally with `while true ; do make test_netcat ; done` on my desktop before this patch, but not after. (Though my desktop is way overpowered for just running that, whereas the build servers tend to be pretty busy, which is why I reserve the right to return later with a longer delay.) --- tests/netcat.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/netcat.test b/tests/netcat.test index 40b51d40..81e6ec7d 100755 --- a/tests/netcat.test +++ b/tests/netcat.test @@ -6,6 +6,6 @@ { dd if=/dev/zero bs=4k count=1 2>/dev/null | tr '\0' a; echo b; } > testfile testing "more than buffer bytes left at end" \ - "netcat -lp 1234 wc -c & cat testfile | netcat 127.0.0.1 1234" \ + "netcat -lp 1234 wc -c & sleep .1 && cat testfile | netcat 127.0.0.1 1234" \ "4098\n" "" "" rm -f testfile -- cgit v1.2.3