Red Hat Bugzilla – Bug 983975
Not all tests call 'cleanup' in the end, causing difficulties with single test runs
Last modified: 2013-09-05 08:12:30 EDT
Description of problem:
I run the following script to verify the correct unloading of the 'fuse'
module for some testing. During these tests, I have noticed that not all
test-scripts call 'cleanup' in the end. This causes the unloading of the
'fuse' module to fail as there is (often) still a glusterfs mountpoint active.
for BUG in $PWD/tests/bugs/*
# skip non directories or non .t files
if [ -d $BUG -o "$BNAME" != "$(basename $BNAME .t)" ]
echo "Skipping $BNAME"
logger -s -t prove -- "starting test(s) for $BNAME"
sleep 1 ; sync
prove -rf --timer $BUG
dmesg -c > $BNAME.dmesg
lsmod | grep fuse > $BNAME.lsmod
if ( lsmod | grep -q fuse ) && ! rmmod fuse
echo "Failed to rmmod fuse" >/dev/stderr
Version-Release number of selected component (if applicable):
current master branch
Steps to Reproduce:
1. run the above script
2. wait til it fails
3. check for mountpoints
Each test should cleanup after itself.
The above script runs all tests.
REVIEW: http://review.gluster.org/5328 (tests: call 'cleanup' at the end of each test) posted (#1) for review on master by Niels de Vos (firstname.lastname@example.org)
COMMIT: http://review.gluster.org/5328 committed in master by Anand Avati (email@example.com)
Author: Niels de Vos <firstname.lastname@example.org>
Date: Fri Jul 12 15:00:07 2013 +0200
tests: call 'cleanup' at the end of each test
Some tests do not cleanup after themselves. That is bad behaviour and
makes it difficult to run single tests and verify the state of the
Signed-off-by: Niels de Vos <email@example.com>
Tested-by: Gluster Build System <firstname.lastname@example.org>
Reviewed-by: Kaleb KEITHLEY <email@example.com>
Reviewed-by: Anand Avati <firstname.lastname@example.org>