summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qusbdual.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/tests/qusbdual.py')
-rw-r--r--test-cli/test/tests/qusbdual.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test-cli/test/tests/qusbdual.py b/test-cli/test/tests/qusbdual.py
index bb295b8..ad95b84 100644
--- a/test-cli/test/tests/qusbdual.py
+++ b/test-cli/test/tests/qusbdual.py
@@ -37,7 +37,7 @@ class Qusbdual(unittest.TestCase):
if p.exit_code != 0:
self.fail("failed: Unable to mount the mass storage gadget.")
# execute test
- for i in range(self.__repetitions):
+ for i in range(int(self.__repetitions)):
# copy files
try:
p = sh.cp("/tmp/station/hdd_gadget/usb-test.bin", "/tmp/station/hdd_gadget/usb-test.bin.md5",
@@ -46,6 +46,11 @@ class Qusbdual(unittest.TestCase):
sh.umount("/tmp/station/hdd_gadget")
sh.rmdir("/tmp/station/hdd_gadget")
self.fail("failed: Unable to copy files through USB.")
+ # check if the device is still mounted
+ if not os.path.ismount("/tmp/station/hdd_gadget"):
+ sh.rm("/tmp/station/hdd_gadget/*")
+ sh.rmdir("/tmp/station/hdd_gadget")
+ self.fail("failed: USB device unmounted during/after copying files.")
# Check md5
try:
p = sh.md5sum("/tmp/stationnfs/usb-test.bin")