diff --git a/checkbox-support/checkbox_support/scripts/run_watcher.py b/checkbox-support/checkbox_support/scripts/run_watcher.py index ef34a3df9..2124d8ed2 100644 --- a/checkbox-support/checkbox_support/scripts/run_watcher.py +++ b/checkbox-support/checkbox_support/scripts/run_watcher.py @@ -238,7 +238,7 @@ def _parse_journal_line(self, line_str): ).group(1) # Look for insertion action - if "USB Mass Storage device detected" in line_str or "uas" in line_str: + if "New USB device found" in line_str: self.action = "insertion" # Look for removal action diff --git a/checkbox-support/checkbox_support/tests/test_run_watcher.py b/checkbox-support/checkbox_support/tests/test_run_watcher.py index 3f71e0ec9..865963d4f 100644 --- a/checkbox-support/checkbox_support/tests/test_run_watcher.py +++ b/checkbox-support/checkbox_support/tests/test_run_watcher.py @@ -345,12 +345,7 @@ def test_usb_storage_parse_journal_line(self): USBStorage._parse_journal_line(mock_usb_storage, line_str) self.assertEqual(mock_usb_storage.driver, "xhci_hcd") - line_str = "USB Mass Storage device detected" - mock_usb_storage = MagicMock() - USBStorage._parse_journal_line(mock_usb_storage, line_str) - self.assertEqual(mock_usb_storage.action, "insertion") - - line_str = "kernel: scsi host0: uas" + line_str = "New USB device found" mock_usb_storage = MagicMock() USBStorage._parse_journal_line(mock_usb_storage, line_str) self.assertEqual(mock_usb_storage.action, "insertion")