]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: don't fail if we can't remove the scsi_debug module
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 9 Mar 2023 12:32:56 +0000 (13:32 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 9 Mar 2023 12:32:56 +0000 (13:32 +0100)
Let's make the cleanup 'best effort' operation, as sometimes we might
not be able to remove the scsi_debug module, and we don't really care
if it stays loaded:

[   88.521333] testsuite-17.sh[1827]: ID_TEST=test
[   88.522015] testsuite-17.sh[1679]: + rmmod scsi_debug
[   88.524795] testsuite-17.sh[1828]: rmmod: ERROR: Module scsi_debug is in use
[   88.527786] testsuite-17.sh[1679]: + cleanup_17_10

test/units/testsuite-17.10.sh

index 6978d2a1d6d951883579ec02d9525af8ce88f708..8ff214baee5056b27b27c08d7d4a4c57f367109d 100755 (executable)
@@ -145,8 +145,8 @@ EOF
 
     udevadm test-builtin hwdb "$scsidev"
 
-    rmmod scsi_debug
-    rm -f /etc/udev/hwdb.d/99-test.hwdb
+    rmmod scsi_debug || :
+    rm -fv /etc/udev/hwdb.d/99-test.hwdb
     systemd-hwdb update
 fi