From 21baad0a8f9d7f8f68128082c6e400957b6b7cdd Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 23 Sep 2024 14:56:54 +1000 Subject: [PATCH] Check read value in upforwd/ans4 The ans4 server wasn't shutting down cleanly sometimes. Check that read returns the expected value for the message length or exit read loop. --- bin/tests/system/upforwd/ans4/ans.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/tests/system/upforwd/ans4/ans.pl b/bin/tests/system/upforwd/ans4/ans.pl index 000be5636c..20392a4c11 100644 --- a/bin/tests/system/upforwd/ans4/ans.pl +++ b/bin/tests/system/upforwd/ans4/ans.pl @@ -357,7 +357,9 @@ for (;;) { last unless $n == 2; my $len = unpack("n", $lenbuf); $n = $conn->sysread($buf, $len); + last unless $n == $len; } sleep(1); + $conn->close; } }