diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:01:33 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:01:33 +0000 |
commit | d66904d1207433ed76fe993ad1fe6b0c264eae9e (patch) | |
tree | 5dbbb5fd7edc0e5025ee19f52aea2a52fee72b1c /tests/ifconfig.test | |
parent | f38b20b7fe6969ccaaee5c97bea90ad52d01f172 (diff) | |
parent | 9323773b0b13f0b51f0874572a4a87ce40855934 (diff) | |
download | toybox-android14-mainline-mediaprovider-release.tar.gz |
Snap for 10453563 from 9323773b0b13f0b51f0874572a4a87ce40855934 to mainline-mediaprovider-releaseaml_mpr_341713020aml_mpr_341614010aml_mpr_341511070aml_mpr_341411070aml_mpr_341313030aml_mpr_341111030aml_mpr_341111020aml_mpr_341015090aml_mpr_341015030aml_mpr_340919000android14-mainline-mediaprovider-release
Change-Id: I19f9284aa5bfe34d330c4bdeef51e90029d3f267
Diffstat (limited to 'tests/ifconfig.test')
-rwxr-xr-x | tests/ifconfig.test | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/tests/ifconfig.test b/tests/ifconfig.test index ca8ca89e..dcecc16f 100755 --- a/tests/ifconfig.test +++ b/tests/ifconfig.test @@ -19,6 +19,8 @@ # outfill|keepalive INTEGER - SLIP analog dialup line quality monitoring # metric INTEGER - added to Linux 0.9.10 with comment "never used", still true +#testing "name" "command" "result" "infile" "stdin" + [ -f testing.sh ] && . testing.sh if [ "$(id -u)" -ne 0 ] @@ -28,10 +30,8 @@ then exit fi -#testing "name" "command" "result" "infile" "stdin" - # Add a dummy interface to test with -modprobe dummy 2>/dev/null +modprobe dummy >/dev/null 2>&1 if ! ifconfig dummy0 up 2>/dev/null then echo "$SHOWSKIP: ifconfig dummy0 up failed" @@ -39,38 +39,31 @@ then exit 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 | grep dummy | wc -l" \ -"0\n" "" "" +testing "Disable the dummy0 interface" \ + "ifconfig dummy0 down && ifconfig | grep dummy | wc -l" "0\n" "" "" -# Test Description: Enable the dummy0 interface # Results Expected: After calling ifconfig, one line with dummy0 is displayed -testing "dummy0 up" \ -"ifconfig dummy0 up && ifconfig dummy0 | grep dummy | wc -l" \ -"1\n" "" "" +testing "Enable the dummy0 interface" \ + "ifconfig dummy0 up && ifconfig dummy0 | grep dummy | wc -l" "1\n" "" "" -# Test Description: Set the ip address of the dummy0 interface # Results Expected: After calling ifconfig dummy0, one line displays the ip # address selected -testing "dummy0 10.240.240.240" \ -"ifconfig dummy0 10.240.240.240 && ifconfig dummy0 | grep 10\.240\.240\.240 | wc -l" \ -"1\n" "" "" +testing "Set the ip address of the dummy0 interface" \ + "ifconfig dummy0 10.240.240.240 && ifconfig dummy0 | grep 10\.240\.240\.240 | wc -l" \ + "1\n" "" "" -# Test Description: Change the netmask to the interface # Results Expected: After calling ifconfig dummy0, one line displays the # netmask selected -testing "dummy0 netmask 255.255.240.0" \ -"ifconfig dummy0 netmask 255.255.240.0 && ifconfig dummy0 | grep 255\.255\.240\.0 | wc -l" \ -"1\n" "" "" +testing "Change the netmask to the interface" \ + "ifconfig dummy0 netmask 255.255.240.0 && ifconfig dummy0 | grep 255\.255\.240\.0 | wc -l" \ + "1\n" "" "" -# Test Description: Change the broadcast address to the interface # Results Expected: After calling ifconfig dummy0, one line displays the # broadcast address selected -testing "dummy0 broadcast 10.240.240.255" \ -"ifconfig dummy0 broadcast 10.240.240.255 && ifconfig dummy0 | grep 10\.240\.240\.255 | wc -l" \ -"1\n" "" "" +testing "Change the broadcast address to the interface" \ + "ifconfig dummy0 broadcast 10.240.240.255 && ifconfig dummy0 | grep 10\.240\.240\.255 | wc -l" \ + "1\n" "" "" # Test Description: Revert to the default ip address # Results Expected: After calling ifconfig dummy0, there are no lines |