From c32cfb1d019cd5e941604e7d7e87913c474e3c4d Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 6 Sep 2023 06:08:59 -0600 Subject: [PATCH] systests: random_free_port: fix EADDRINUSE flake Fixes infrequent but annoying flake in which system tests call random_free_port(), get a nice-looking port, then fail with "bind: address already in use". Signed-off-by: Ed Santiago --- test/system/helpers.network.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/test/system/helpers.network.bash b/test/system/helpers.network.bash index ebf218bd2a..0a90ddfc43 100644 --- a/test/system/helpers.network.bash +++ b/test/system/helpers.network.bash @@ -251,6 +251,7 @@ function port_is_bound() { *"."*) grep -e "^[^:]*: $(ipv4_to_procfs "${address}"):${port}" \ -e "^[^:]*: $(ipv4_to_procfs "0.0.0.0"):${port}" \ + -e "^[^:]*: $(ipv4_to_procfs "127.0.0.1"):${port}" \ -q "/proc/net/${proto}" ;; *)