From 53ea70ea462c39008901d2d29e294db4f7859406 Mon Sep 17 00:00:00 2001 From: Albin Kerouanton Date: Thu, 13 Nov 2025 17:06:03 +0100 Subject: [PATCH] inte/networking: TestDisableIPv6OnInterface: add '-c1' to ping If the DNS name still resolves to an IP address, and that address is assigned to a running container, the ping command will run indefinitely and the test suite will time out for 10 mins. This is confusing, as it looks like a daemon hang, or a test suite hang, whereas it's just a test failure. Add '-c1' to ping to make it return immediately. Signed-off-by: Albin Kerouanton --- integration/networking/bridge_linux_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/networking/bridge_linux_test.go b/integration/networking/bridge_linux_test.go index 09e9424ea4..926b2bf9d7 100644 --- a/integration/networking/bridge_linux_test.go +++ b/integration/networking/bridge_linux_test.go @@ -1092,7 +1092,7 @@ func TestDisableIPv6OnInterface(t *testing.T) { // There should not be an IPv6 DNS or /etc/hosts entry. runRes := container.RunAttach(ctx, t, c, container.WithNetworkMode(tc.netName), - container.WithCmd("ping", "-6", ctrName), + container.WithCmd("ping", "-6", "-c1", ctrName), ) assert.Check(t, is.Equal(runRes.ExitCode, 1)) assert.Check(t, is.Contains(runRes.Stderr.String(), "bad address"))