summaryrefslogtreecommitdiff
path: root/bin
diff options
authorPaul Larson <paul.larson@ubuntu.com>2019-12-16 12:39:30 -0600
committerPaul Larson <paul.larson@ubuntu.com>2019-12-16 12:39:30 -0600
commitcc0277ef01141822db392409ab7e0225b513d099 (patch)
tree797ebe9f26c1706586bfebf45a1f91f6b7639f5b /bin
parent9fd3ae13a9416e4508ecc3e850968f466754db35 (diff)
Also fail the usb-storage-preinserted tests if there are IO errors, or if it takes too long
Diffstat (limited to 'bin')
-rwxr-xr-xbin/removable_storage_test6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/removable_storage_test b/bin/removable_storage_test
index 249911a..bbace30 100755
--- a/bin/removable_storage_test
+++ b/bin/removable_storage_test
@@ -729,6 +729,8 @@ def main():
total_write_size = sum(write_sizes)
try:
+ # Clear dmesg so we can check for I/O errors later
+ subprocess.check_output(['dmesg', '-C'])
for disk, mount_point in disks_eligible.items():
print("%s (Total Data Size / iteration: %0.4f MB):" %
(disk, (total_write_size / 1024 / 1024)))
@@ -807,6 +809,10 @@ def main():
if test.umount() != 0:
errors += 1
test.clean_tmp_dir()
+ dmesg = subprocess.run(['dmesg'], stdout=subprocess.PIPE)
+ if 'I/O error' in dmesg.stdout.decode():
+ logging.error("I/O errors found in dmesg")
+ errors += 1
if errors > 0:
logging.warning(