testsuite: cleanup /sys/module/ in modprobe tests
commit2a76c5e54629db5e095561d3dabd5428cc3a1ce9
authorAlan Jenkins <alan@alan-eeepc.jenkins>
Mon, 23 Feb 2009 10:22:48 +0000 (23 10:22 +0000)
committerAlan Jenkins <alan@alan-eeepc.jenkins>
Mon, 23 Feb 2009 12:10:32 +0000 (23 12:10 +0000)
tree59c68e2fa179474dcd6c9b3981d08f7b2c652d27
parentbd35b854f59a8d9cabf6b7fa698767e63e838007
testsuite: cleanup /sys/module/ in modprobe tests

1) If a test wants to create an "Empty sysfs", it needs to do
   "mkdir -p tests/sys/module".

   Without this, there is _no_ sysfs. This is treated as an undefined
   state. Both "modprobe *" and "modprobe -r *" will try to operate.
   Many tests do this deliberately to keep things simple, which is fine.
   But several tests want an empty sysfs, and we should do it properly.

2) "touch tests/sys/module/*/initstate" should be
   "echo live > tests/sys/module/*/initstate"

   An empty "initstate" file is pointless, because it's treated as an
   undefined state for that module. We should either define the state,
   or not create a fake sysfs at all, and leave everything undefined.

3) Remove vestigal references to /proc/modules.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
12 files changed:
tests/test-modprobe-indexed/03deps.sh
tests/test-modprobe/03deps.sh
tests/test-modprobe/03underscores.sh
tests/test-modprobe/04config.sh
tests/test-modprobe/12whitespace.sh
tests/test-modprobe/13dryrun.sh
tests/test-modprobe/16showdepends.sh
tests/test-modprobe/18multiremove.sh
tests/test-modprobe/19quiet.sh
tests/test-modprobe/22recursiveinstall.sh
tests/test-modprobe/24modprobe.conf-dir.sh
tests/test-modprobe/25locking.sh