Skip to content

fix detecting insertion/removal of tb3 drive (BugFix)#930

Merged
kissiel merged 1 commit intomainfrom
fix-tb-storage-tests
Jan 12, 2024
Merged

fix detecting insertion/removal of tb3 drive (BugFix)#930
kissiel merged 1 commit intomainfrom
fix-tb-storage-tests

Conversation

@kissiel
Copy link
Copy Markdown
Contributor

@kissiel kissiel commented Jan 11, 2024

Description

Fix Thunderbolt "insert" and "remove" tests on Classic.

On classic images the "scsi detection" that was employed by the job definition did not work.
Historically we've had two version of insertion/removal detection code: one for Classic and one for Core. The patch that introduced the tests was using this approach, but in fact it was it was not needed, as the version provided by the implementation in checkbox-support (that was used exclusively for UC) works on both.

The patch I'm proposing here makes Checkbox use the working one, regardless of whether we're running on UC or Classic, thus fixing the problem

Resolved issues

Fixes: #97, CHECKBOX-1123

Documentation

No changes.

Tests

Tested on classic image with the tb3 drive.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ff8ab68) 37.43% compared to head (9994ee9) 37.49%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #930      +/-   ##
==========================================
+ Coverage   37.43%   37.49%   +0.05%     
==========================================
  Files         313      313              
  Lines       34742    34794      +52     
  Branches     5870     5982     +112     
==========================================
+ Hits        13006    13046      +40     
+ Misses      21191    21168      -23     
- Partials      545      580      +35     
Flag Coverage Δ
provider-base 6.91% <ø> (+0.24%) ⬆️

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.

@yphus
Copy link
Copy Markdown

yphus commented Jan 12, 2024

The insert/removal jobs now run the same script on core/classic but the storage test still use removable_storage_test.py -s 268400000 scsi for thunderbolt. Have you tested it too?

@kissiel
Copy link
Copy Markdown
Contributor Author

kissiel commented Jan 12, 2024

The insert/removal jobs now run the same script on core/classic but the storage test still use removable_storage_test.py -s 268400000 scsi for thunderbolt. Have you tested it too?

Yes. I got this result:

Found the following mounted scsi partitions:
    /dev/nvme1n1p1 : /tmp/tmp7ok46dc5 : None bits/s
--------------------
/dev/nvme1n1p1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 1085.5509
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 0.2358 secs
                Average Write Time: 0.2358 secs
                Average Write Speed: 1085.5509 MB/s

Copy link
Copy Markdown

@yphus yphus left a comment

Choose a reason for hiding this comment

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

+1

@kissiel kissiel merged commit 5ef92ac into main Jan 12, 2024
@kissiel kissiel deleted the fix-tb-storage-tests branch January 12, 2024 08:40
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this pull request Mar 20, 2024
fix detecting insertion/removal of tb3 drive

Fixes: canonical#97, CHECKBOX-1123
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
fix detecting insertion/removal of tb3 drive

Fixes: canonical#97, CHECKBOX-1123
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.

LP1974209: Unable to detect the insertion of TBT3 storage

2 participants