[PATCH] xfstests: test for scsi_debug before trying to rmmod it |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: [PATCH] xfstests: test for scsi_debug before trying to rmmod it
- From: Eric Sandeen <sandeen@xxxxxxxxxx>
- Date: Thu, 08 Mar 2012 17:51:55 -0600
- Cc: Dave Chinner <dchinner@xxxxxxxxxx>
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
_cleanup does _put_scsi_debug_dev but there's a chance
the module has already been removed in the non-error
case.
If it's not loaded, don't try to rmmod it.
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
diff --git a/common.scsi_debug b/common.scsi_debug
index 9f9177c..08efa58 100644
--- a/common.scsi_debug
+++ b/common.scsi_debug
@@ -58,5 +58,6 @@ _get_scsi_debug_dev()
_put_scsi_debug_dev()
{
sleep 1
+ grep -q scsi_debug /proc/modules || return
rmmod scsi_debug || _fail "Could not remove scsi_debug module"
}
_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]