diff options
author | Rob Landley <rob@landley.net> | 2017-10-22 13:36:02 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2017-10-22 13:36:02 -0500 |
commit | afde1dbae1d2771f097e2930ba23df88b90f1297 (patch) | |
tree | 57038acb37436e6f814f9ef9bb82211c71d88fb6 /tests | |
parent | ba185f69851364be6882ff931193f4c5f274019f (diff) | |
download | toybox-afde1dbae1d2771f097e2930ba23df88b90f1297.tar.gz |
Insmod dummy for ifconfig tests, and "pointopoint" only has two t's.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/ifconfig.test | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/ifconfig.test b/tests/ifconfig.test index 34fcde0a..d82cd4af 100755 --- a/tests/ifconfig.test +++ b/tests/ifconfig.test @@ -31,12 +31,16 @@ fi #testing "name" "command" "result" "infile" "stdin" # Add a dummy interface to test with -ifconfig dummy0 up +modprobe dummy 2>/dev/null +if ! ifconfig dummy0 up 2>/dev/null +then + echo "$SHOWSKIP: ifconfig dummy0 up failed" +fi # Test Description: Disable the dummy0 interface # Results Expected: After calling ifconfig, no lines with dummy0 are displayed testing "dummy0 down and if config /-only" \ -"ifconfig dummy0 down && ifconfig dummy0 | grep dummy | wc -l" \ +"ifconfig dummy0 down && ifconfig | grep dummy | wc -l" \ "0\n" "" "" # Test Description: Enable the dummy0 interface @@ -116,18 +120,18 @@ testing "dummy0 arp down" \ "ifconfig dummy0 arp down && ifconfig dummy0 | grep -i NOARP | wc -l" \ "0\n" "" "" -# Test Description: Call the pointtopoint option with no argument +# Test Description: Call the pointopoint option with no argument # Results Expected: After calling ifconfig dummy0, there is one line with the # NOARP and UP flags -testing "dummy0 pointtopoint" \ -"ifconfig dummy0 pointtopoint && ifconfig dummy0 | grep -i NOARP | grep -i UP | wc -l" \ +testing "dummy0 pointopoint" \ +"ifconfig dummy0 pointopoint && ifconfig dummy0 | grep -i NOARP | grep -i UP | wc -l" \ "1\n" "" "" -# Test Description: Test the pointtopoint option and set the ipaddress +# Test Description: Test the pointopoint option and set the ipaddress # Results Expected: After calling ifconfig dummy0, there is one line with the # word inet and the selected ip address -testing "dummy0 pointtopoint 127.0.0.2" \ -"ifconfig dummy0 pointtopoint 127.0.0.2 && ifconfig dummy0 | grep -i inet | grep -i 127\.0\.0\.2 | wc -l" \ +testing "dummy0 pointopoint 127.0.0.2" \ +"ifconfig dummy0 pointopoint 127.0.0.2 && ifconfig dummy0 | grep -i inet | grep -i 127\.0\.0\.2 | wc -l" \ "1\n" "" "" ####### Flags you can set on an interface (or -remove by prefixing with -): ############### |