Skip to content

Commit f5e8bcf

Browse files
author
MarcoFalke
committed
Merge #21689: test: Remove intermittently failing and not very meaningful BOOST_CHECK in cnetaddr_basic
63631be test: Remove intermittently failing and not very meaningful `BOOST_CHECK` in `cnetaddr_basic` (practicalswift) Pull request description: Remove intermittently failing and not very meaningful `BOOST_CHECK` in `cnetaddr_basic`. Fixes #21682. Rationale from bitcoin/bitcoin#21682 (comment): > I've looked at that test before and I don't think that specific `BOOST_CHECK` makes much sense TBH :) > > 1.) I don't understand why we test if `ToString()` output includes `%zone_index`: it clearly doesn't on some platforms, so we cannot rely on it anyways. Then why test it? > > 2.) And perhaps more fundamentally: why would we even _want_ to have `%zone_index` in our textual `ToString()` output? I think the expectation is to get say `fe80::1ff:fe23:4567:890a` (without zone index) and not say `fe80::1ff:fe23:4567:890a%eth2 ` or `fe80::1ff:fe23:4567:890a%3 `when doing `ipv6_addr.ToString()` :) ACKs for top commit: MarcoFalke: review ACK 63631be Tree-SHA512: 06863d1edfb9ad1ca9bcae09cf3f0f47b58bb29d222b70799c3dc059b96452889026e4b99b132782846d9896e3e798d17c7f9406e0e6a0bec1bffc6edb54e9df
2 parents 8e69370 + 63631be commit f5e8bcf

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/test/net_tests.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,6 @@ BOOST_AUTO_TEST_CASE(cnetaddr_basic)
307307
BOOST_REQUIRE(addr.IsValid());
308308
BOOST_REQUIRE(addr.IsIPv6());
309309
BOOST_CHECK(!addr.IsBindAny());
310-
const std::string addr_str{addr.ToString()};
311-
BOOST_CHECK(addr_str == scoped_addr || addr_str == "fe80:0:0:0:0:0:0:1");
312-
// The fallback case "fe80:0:0:0:0:0:0:1" is needed for macOS 10.14/10.15 and (probably) later.
313310
// Test that the delimiter "%" and default zone id of 0 can be omitted for the default scope.
314311
BOOST_REQUIRE(LookupHost(link_local + "%0", addr, false));
315312
BOOST_REQUIRE(addr.IsValid());

0 commit comments

Comments
 (0)