From 3e54c985a25719814c27912ee1c116ecfb5854c1 Mon Sep 17 00:00:00 2001 From: Jim Newsome Date: Thu, 14 Nov 2024 18:38:22 -0600 Subject: test-network: include IPv6 tests unconditionally Previously we would incorrectly detect that ipv6 isn't supported if the ping binary isn't present (as it may not be in a relatively stripped down container image), or if ICMP packets aren't permitted (as they often aren't in containers). We don't really have a need to run these network tests on non-IPv6 systems, so it makes more sense to just run them unconditionally. --- Makefile.am | 19 ++++++------------- changes/testing | 3 +++ 2 files changed, 9 insertions(+), 13 deletions(-) create mode 100644 changes/testing diff --git a/Makefile.am b/Makefile.am index 7567ca99c7..c475ee3a17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -380,10 +380,9 @@ test-network-clean: # # Run the IPv4 tests in $(ipv4_flavors), unconditionally # - tor relays and directory authorities require IPv4. -# Run the IPv6 tests in $(ipv6_flavors), if IPv6 is available -# - only run IPv6 tests if we can ping6 or ping -6 ::1 (localhost) -# we try the syntax for BSD ping6, Linux ping6, and Linux ping -6, -# because they're incompatible +# Run the IPv6 tests in $(ipv6_flavors), unconditionally +# - clients don't technically require IPv6, but it's not worth +# supporting running this test suite on such systems. # - some IPv6 tests may fail without an IPv6 DNS server # (see #16971 and #17011) # Run the mixed tests in $(mixed_flavors), if a tor-stable binary is available @@ -403,20 +402,14 @@ test-network-run: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/ test_network_ipv6=false; \ if test -n "$(ipv6_flavors)" || \ test -n "$(ipv6_mixed_flavors)"; then \ - if ping6 -q -c 1 -o ::1 >/dev/null 2>&1 || \ - ping6 -q -c 1 -W 1 ::1 >/dev/null 2>&1 || \ - ping -6 -c 1 -W 1 ::1 >/dev/null 2>&1; then \ - test_network_ipv6=true; \ - fi; \ + test_network_ipv6=true; \ fi; \ if test -n "$(ipv6_flavors)"; then \ if test "$$test_network_ipv6" = "true"; then \ - echo "ping6 ::1 or ping ::1 succeeded, running IPv6" \ - "flavors: $(ipv6_flavors)."; \ + echo "Running IPv6 flavors: $(ipv6_flavors)."; \ flavors="$$flavors $(ipv6_flavors)"; \ else \ - echo "ping6 ::1 and ping ::1 failed, skipping IPv6" \ - "flavors: $(ipv6_flavors)."; \ + echo "Skipping IPv6 flavors: $(ipv6_flavors)."; \ skip_flavors="$$skip_flavors $(ipv6_flavors)"; \ fi; \ fi; \ diff --git a/changes/testing b/changes/testing new file mode 100644 index 0000000000..744a7849d3 --- /dev/null +++ b/changes/testing @@ -0,0 +1,3 @@ + o Minor feature (testing): + - test-network now unconditionally includes IPv6 instead of trying to + detect IPv6 support. -- cgit v1.2.3-54-g00ecf From 08e872ef51be562dc5f7c59d6e46d7f6006b3dd7 Mon Sep 17 00:00:00 2001 From: Jim Newsome Date: Mon, 18 Nov 2024 10:26:26 -0600 Subject: test-network-run: refactor away test_network_ipv6 This should be a pure refactor to simplify the logic a bit now that we no longer probe for IPv6 support. --- Makefile.am | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index c475ee3a17..ed43ec72fc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -399,19 +399,9 @@ test-network-run: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/ echo "Running IPv4 flavors: $(ipv4_flavors)."; \ flavors="$$flavors $(ipv4_flavors)"; \ fi; \ - test_network_ipv6=false; \ - if test -n "$(ipv6_flavors)" || \ - test -n "$(ipv6_mixed_flavors)"; then \ - test_network_ipv6=true; \ - fi; \ if test -n "$(ipv6_flavors)"; then \ - if test "$$test_network_ipv6" = "true"; then \ - echo "Running IPv6 flavors: $(ipv6_flavors)."; \ - flavors="$$flavors $(ipv6_flavors)"; \ - else \ - echo "Skipping IPv6 flavors: $(ipv6_flavors)."; \ - skip_flavors="$$skip_flavors $(ipv6_flavors)"; \ - fi; \ + echo "Running IPv6 flavors: $(ipv6_flavors)."; \ + flavors="$$flavors $(ipv6_flavors)"; \ fi; \ test_network_mixed=false; \ if test -n "$(mixed_flavors)" || \ @@ -432,8 +422,7 @@ test-network-run: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/ fi; \ fi; \ if test -n "$(ipv6_mixed_flavors)"; then \ - if test "$$test_network_ipv6" = "true" && \ - test "$$test_network_mixed" = "true"; then \ + if test "$$test_network_mixed" = "true"; then \ echo "Running IPv6 mixed flavors:" \ "$(ipv6_mixed_flavors)."; \ flavors="$$flavors $(ipv6_mixed_flavors)"; \ -- cgit v1.2.3-54-g00ecf