-
Notifications
You must be signed in to change notification settings - Fork 74
Fix: USB SD card reader support (Bugfix) #2254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2254 +/- ##
=======================================
Coverage 53.81% 53.82%
=======================================
Files 406 406
Lines 43288 43294 +6
Branches 7997 7999 +2
=======================================
+ Hits 23296 23302 +6
Misses 19179 19179
Partials 813 813
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1407e27 to
d6463da
Compare
eb19539 to
e26b49d
Compare
The mediacard_combo storage watcher was unable to detect SD card readers that appear as SCSI/USB mass storage devices (/dev/sda) instead of mmcblk devices. This caused insertion tests to timeout. This patch enhances MediacardComboStorage._parse_journal_line() to: - Detect insertions via 'detected capacity change from 0 to X' messages - Detect removals via 'detected capacity change from X to 0' messages - Label these devices as 'SD/MMC via USB reader' The fix allows the action state to be updated dynamically, properly handling multiple insert/remove cycles even when a card is already inserted at test start. Partition extraction is handled by the existing USBStorage parent class logic. Comprehensive unit tests have been added to cover all new code paths: - test_mediacard_combo_storage_usb_sd_card_reader_insertion - test_mediacard_combo_storage_usb_sd_card_reader_removal - test_mediacard_combo_storage_usb_sd_card_reader_partition - test_mediacard_combo_storage_usb_sd_card_reader_action_update Tested with USB SD card readers that enumerate as /dev/sda devices.
e26b49d to
2635eba
Compare
|
Hello, please attach at least one passing test submission. The code lgtm, but I want to see it working |
|
submission_2026-01-20T06.14.29.607611.html @Hook25 Uploading the pass submission for your reference. |
Hook25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM, thanks for the sub
Hook25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, didnt pay attention, are you sure?
| # This is a removal - always update to reflect current action | ||
| self.action = "removal" | ||
|
|
||
| return super()._parse_journal_line(line_str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just noticed this, are you sure you need it? It is done above (explicitly, this only calls USBStorage._parse_journal_line)
Description
The mediacard_combo storage watcher was unable to detect SD card readers that appear as SCSI/USB mass storage devices (/dev/sda) instead of mmcblk devices. This caused insertion tests to timeout.
This patch enhances MediacardComboStorage._parse_journal_line() to:
The fix allows the action state to be updated dynamically, properly handling multiple insert/remove cycles even when a card is already inserted at test start.
Tested with USB SD card readers that enumerate as /dev/sda devices.
Resolved issues
Fixes: https://warthogs.atlassian.net/browse/CPL-258
Documentation
N/A
Tests
sudo ./run_watcher.py insertion mediacard_comboWait for the "INSERT NOW" prompt, then insert the card.