diff options
author | Rob Landley <rob@landley.net> | 2014-09-20 13:09:14 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-09-20 13:09:14 -0500 |
commit | 387edf547eb09b27ca6d49772eb048d729f09cf4 (patch) | |
tree | 59d482f33735690cab6d90723393afa1e2c8dce5 /scripts/test/modinfo.test | |
parent | d3df423a6cde0c6282658ff628574771d3824d71 (diff) | |
download | toybox-387edf547eb09b27ca6d49772eb048d729f09cf4.tar.gz |
Move testsuite out of scripts/test into its own top level tests directory, and make ctrl-c kill "make test" more reliably.
Diffstat (limited to 'scripts/test/modinfo.test')
-rwxr-xr-x | scripts/test/modinfo.test | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/scripts/test/modinfo.test b/scripts/test/modinfo.test deleted file mode 100755 index ac94ce0f..00000000 --- a/scripts/test/modinfo.test +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -[ -f testing.sh ] && . testing.sh - -#testing "name" "command" "result" "infile" "stdin" - -[ -e /proc/modules ] || { echo "Skipping test because modules are not supported"; exit 1; } - -# modinfo does not need to output fields in a specified order. -# Instead, there are labelled fields. We can use sort to make up for this. -# Other issues to beware of are the volatile nature of srcversion and vermagic, -# which change from kernel to kernel and can be disabled. -# We grep to remove these. - -#We expect they have ne2k-pci as a module. - -testing "modinfo gets right number of fields" "modinfo ne2k-pci |cut -d: -f1 |grep -v ver|sort" "alias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nauthor\ndepends\ndescription\nfilename\nlicense\nparm\nparm\nparm\n" "" "" -testing "modinfo treats - and _ as equivalent" "modinfo ne2k_pci |cut -d: -f1 |grep -v ver|sort" "alias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nauthor\ndepends\ndescription\nfilename\nlicense\nparm\nparm\nparm\n" "" "" - -# Output of -F filename should be an absolute path to the module. -# Otherwise, initrd generating scripts will break. - -testing "modinfo -F filename gets absolute path" "[ -e `modinfo -F filename ne2k-pci` ] && echo ne2k-pci " "ne2k-pci\n" "" "" - -testing "modinfo supports multiple modules" "modinfo -F filename ne2k-pci 8390 | wc -l" "2\n" "" "" - -testing "modinfo does not output filename for bad module" "modinfo -F filename zxcvbnm__9753" "" "" "" - - - |