Skip to content

Kioxia storage detect (bugfix)#1906

Merged
Hook25 merged 5 commits intomainfrom
kioxia_storage_detect
May 6, 2025
Merged

Kioxia storage detect (bugfix)#1906
Hook25 merged 5 commits intomainfrom
kioxia_storage_detect

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented May 5, 2025

WARNING: This modifies com.canonical.certification::sru-server

Description

Currently this specific revision of a Kioxia USB key is recognized as a mediacard instead of a usb key. The reason is that the model id is TransMemory, which contains SM (case insensitive), which is part of the CARD_READER_RE categorization regex. This wrongly identifies the usb key as a mediacard. To resolve this I have removed the SM part of the regex that from my research seems to be present in SmartMedia cards (please correct me if I'm wrong) wich are an ancient and dead standard we can safely drop support for.

Minor: This also adds some output to the detect job so that it easier to debug what is going wrong

Resolved issues

Fixes: https://warthogs.atlassian.net/browse/CHECKBOX-1229

Documentation

N/A

Tests

Added a stripped down udev and lsblk and a new test to verify that all works according to plan

@codecov
Copy link
Copy Markdown

codecov bot commented May 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.46%. Comparing base (2a5cb33) to head (9df9cad).
⚠️ Report is 108 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1906   +/-   ##
=======================================
  Coverage   50.46%   50.46%           
=======================================
  Files         382      382           
  Lines       41039    41039           
  Branches     6892     6892           
=======================================
  Hits        20709    20709           
  Misses      19585    19585           
  Partials      745      745           
Flag Coverage Δ
checkbox-support 62.51% <100.00%> (ø)
provider-base 26.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

pieqq
pieqq previously approved these changes May 5, 2025
Copy link
Copy Markdown
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

I added a suggestion, but it can land as is.

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
@Hook25 Hook25 merged commit 86abd78 into main May 6, 2025
26 checks passed
@Hook25 Hook25 deleted the kioxia_storage_detect branch May 6, 2025 09:43
aglinserer pushed a commit to aglinserer/checkbox that referenced this pull request May 12, 2025
* Initial implementation

* Test that the partition is now correctly recognized

* Document in the test what it is trying to do

* Drop support for SmartMedia devices

* Update providers/base/units/usb/usb.pxu

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>

---------

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
Meulengracht pushed a commit to Meulengracht/checkbox that referenced this pull request May 19, 2025
* Initial implementation

* Test that the partition is now correctly recognized

* Document in the test what it is trying to do

* Drop support for SmartMedia devices

* Update providers/base/units/usb/usb.pxu

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>

---------

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
mreed8855 pushed a commit that referenced this pull request Jul 30, 2025
* Initial implementation

* Test that the partition is now correctly recognized

* Document in the test what it is trying to do

* Drop support for SmartMedia devices

* Update providers/base/units/usb/usb.pxu

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>

---------

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
mreed8855 pushed a commit that referenced this pull request Jul 31, 2025
* Initial implementation

* Test that the partition is now correctly recognized

* Document in the test what it is trying to do

* Drop support for SmartMedia devices

* Update providers/base/units/usb/usb.pxu

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>

---------

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants