summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pattrick <mkp@redhat.com>2022-09-27 12:04:53 -0400
committerIlya Maximets <i.maximets@ovn.org>2022-10-06 22:05:00 +0200
commit4c26aab8df884ac8a3e4bb242aec69113e416800 (patch)
tree0e3eaa1b1576ebcbe019b13a7fadba249d228788
parentcd47660b9b567cf01c304e004a73148f423c6fe5 (diff)
downloadopenvswitch-4c26aab8df884ac8a3e4bb242aec69113e416800.tar.gz
vconn: Allow ECONNREFUSED in refuse connection test.
The "tcp vconn - refuse connection" test may fail due to a Connection Refused error. The network stack returns ECONNREFUSED on a reset connection in SYN_SENT state and EPIPE or ECONNRESET in all other cases. 2022-09-19T17:45:48Z|00001|socket_util|INFO|0:127.0.0.1: listening on port 34189 2022-09-19T17:45:48Z|00002|poll_loop|DBG|wakeup due to [POLLOUT][ POLLERR][POLLHUP] on fd 4 (127.0.0.1:47140<->) at ../lib/stream-fd. c:153 test-vconn: unexpected vconn_connect() return value 111 (Connection refused) ../../tests/vconn.at:21: exit code was 1, expected 0 530. vconn.at:21: 530. tcp vconn - refuse connection (vconn.at:21): FAILED (vconn.at:21) This was observed from a CI system, and isn't a common case. Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Mike Pattrick <mkp@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--tests/test-vconn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test-vconn.c b/tests/test-vconn.c
index fc8ce4a2c..96c89bd4e 100644
--- a/tests/test-vconn.c
+++ b/tests/test-vconn.c
@@ -157,6 +157,7 @@ test_refuse_connection(struct ovs_cmdl_context *ctx)
error = vconn_connect_block(vconn, (TIMEOUT - 2) * 1000);
if (!strcmp(type, "tcp")) {
if (error != ECONNRESET && error != EPIPE && error != ETIMEDOUT
+ && error != ECONNREFUSED
#ifdef _WIN32
&& error != WSAECONNRESET
#endif