From 898a25b85144d11b4e31109c35ecc51ea027791d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 22 Jan 2020 08:05:20 -0800 Subject: ifconfig.test: don't check for specific error message. A 5.4 kernel returns EINVAL rather than ENOBUFS when you try to configure an IPv6 address with the MTU set too small to support IPv6. Rather than check for both errors, just check for generic failure for now. --- tests/ifconfig.test | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/ifconfig.test b/tests/ifconfig.test index 631e0888..ca8ca89e 100755 --- a/tests/ifconfig.test +++ b/tests/ifconfig.test @@ -86,12 +86,11 @@ testing "dummy0 mtu 1269" \ "ifconfig dummy0 mtu 1269 && ifconfig dummy0 | grep 1269 | wc -l" \ "1\n" "" "" -# Test Description: Verify ifconfig add fails with such a small mtu -# Results Expected: There is one line of error message containing -# "No buffer space available" +# Test Description: ifconfig add for IPv6 fails with an mtu too small for IPv6. +# Results Expected: Failure. No check for the exact error because old kernels +# used ENOBUFS but 5.4 uses EINVAL. testing "dummy0 add ::2 -- too small mtu" \ -"ifconfig dummy0 add ::2 2>&1 | grep No\ buffer\ space\ available | wc -l" \ -"1\n" "" "" +"ifconfig dummy0 add ::2 2>/dev/null || echo expected" "expected\n" "" "" # Test Description: Change the Maximum transmission unit (MTU) of the interface # Results Expected: After calling ifconfig dummy0, there is one line with the -- cgit v1.2.3