::2 can legitimately be part of an IPv6 address, causing the test to fail because the grep matches an unrelated part of the output. Be more explicit about what we're actually searching for (as the previous test already was) to avoid flakiness. --- tests/ifconfig.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
From 3f63e3d7aa233b70e41f0fa98af0da15187245f6 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <[email protected]> Date: Tue, 3 Dec 2019 09:00:31 -0800 Subject: [PATCH] ifconfig.test: deflake.
::2 can legitimately be part of an IPv6 address, causing the test to fail because the grep matches an unrelated part of the output. Be more explicit about what we're actually searching for (as the previous test already was) to avoid flakiness. --- tests/ifconfig.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ifconfig.test b/tests/ifconfig.test index c189ccaf..631e0888 100755 --- a/tests/ifconfig.test +++ b/tests/ifconfig.test @@ -104,14 +104,14 @@ testing "dummy0 mtu 2000" \ # Results Expected: after calling ifconfig dummy0, there is one line with the # selected ip address testing "dummy0 add ::2" \ -"ifconfig dummy0 add ::2/126 && ifconfig dummy0 | grep \:\:2\/126 | wc -l" \ +"ifconfig dummy0 add ::2/126 && ifconfig dummy0 | grep \:\:2/126 | wc -l" \ "1\n" "" "" # Test Description: Verify ifconfig del removes the selected ip6 address # Results Expected: after calling ifconfig dummy0, there are no lines with the # selected ip address testing "dummy0 del ::2" \ -"ifconfig dummy0 del ::2/126 && ifconfig dummy0 | grep \:\:2 | wc -l" \ +"ifconfig dummy0 del ::2/126 && ifconfig dummy0 | grep \:\:2/126 | wc -l" \ "0\n" "" "" # Test Description: Remove the noarp flag and bring the interface down in -- 2.24.0.393.g34dc348eaf-goog
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
