Skip to content

Commit 007d6f0

Browse files
committed
test: fix AddNode unit test failure on OpenBSD
1 parent 0aa014d commit 007d6f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/net_peer_connection_tests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ BOOST_AUTO_TEST_CASE(test_addnode_getaddednodeinfo_and_connection_detection)
116116

117117
BOOST_TEST_MESSAGE("\nCall AddNode() with 2 addrs resolving to existing localhost addnode entry; neither should be added");
118118
BOOST_CHECK(!connman->AddNode({/*m_added_node=*/"127.0.0.1", /*m_use_v2transport=*/true}));
119+
// OpenBSD doesn't support the IPv4 shorthand notation with omitted zero-bytes.
120+
#if !defined(__OpenBSD__)
119121
BOOST_CHECK(!connman->AddNode({/*m_added_node=*/"127.1", /*m_use_v2transport=*/true}));
122+
#endif
120123

121124
BOOST_TEST_MESSAGE("\nExpect GetAddedNodeInfo to return expected number of peers with `include_connected` true/false");
122125
BOOST_CHECK_EQUAL(connman->GetAddedNodeInfo(/*include_connected=*/true).size(), nodes.size());

0 commit comments

Comments
 (0)