aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-01-22 08:05:20 -0800
committerRob Landley <rob@landley.net>2020-01-22 18:13:36 -0600
commit898a25b85144d11b4e31109c35ecc51ea027791d (patch)
tree3a24b67455519a38749d37cf03ea8cea0e4e1753 /tests
parenta7dcebe4d489e368eff1f0bec044fe6238a49619 (diff)
downloadtoybox-898a25b85144d11b4e31109c35ecc51ea027791d.tar.gz
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.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ifconfig.test9
1 files 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