Skip to content
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

Sd card not tested (BugFix) #1451

Merged
merged 12 commits into from
Sep 12, 2024
Merged

Sd card not tested (BugFix) #1451

merged 12 commits into from
Sep 12, 2024

Conversation

fernando79513
Copy link
Collaborator

@fernando79513 fernando79513 commented Sep 4, 2024

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

Description

This ticket introduces some changes to the disk tests.
The first of them is to include SD cards into the "DISK" category so we can run disk performance tests in devices that have root mounted on an SD card. This behavior was purposely ignored before.

if self.driver:
...
    # Only consider eMMC internal drives as DISK.
    # As it's not possible to distinguish them from simple MMC
    # removable storage, only those with a partition mounted as /
    # will be considered.
    # To avoid categorizing SD cards as main storage and run heavy
    # tests on them (e.g on a pandaboard) only devices with the udev
    # property MMC_TYPE == MMC are accepted.
    if self.driver.startswith("mmc"):
        if self._mmc_type == "MMC" and find_pkname_is_root_mountpoint(
            self.name, self._lsblk
        ):
            return "DISK"
        else:
            return "CARDREADER"

But we have decided to include also SD cards into the "DISK" category so the disk tests are run also in these devices
We should keep in mind that these tests, particularly the storage test, put stress on the SD cards, which could potentially reduce their lifespan.

The second one is to ignore some disks for certain types of tests:

  • Disks with less than 2MB of memory are ignored for reading tests
  • mtdblock disks are ignored for storage tests.

We discussed moving the disk-detecting logic to a separate resource instead of using "udevadm.py", but I think we can do that in a follow-up ticket.

Resolved issues

#1272
https://warthogs.atlassian.net/browse/CHECKBOX-1458

Documentation

N/A

Tests

The tests have been run in a laptop and in a Xilinx device with the root mounted in the SD card:

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.75%. Comparing base (d725523) to head (9fd975d).
Report is 140 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1451      +/-   ##
==========================================
+ Coverage   45.72%   45.75%   +0.02%     
==========================================
  Files         367      367              
  Lines       39134    39163      +29     
  Branches     6618     6625       +7     
==========================================
+ Hits        17895    17918      +23     
- Misses      20565    20569       +4     
- Partials      674      676       +2     
Flag Coverage Δ
checkbox-support 59.58% <100.00%> (-0.14%) ⬇️
provider-base 20.00% <100.00%> (+0.08%) ⬆️

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.

Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

I don't know if you want to use that feature, but we do have it

providers/base/units/benchmarks/jobs.pxu Show resolved Hide resolved
@fernando79513 fernando79513 added the waiting-for-changes The review has been completed but the PR is waiting for changes from the author label Sep 6, 2024
@fernando79513 fernando79513 merged commit 21efaa7 into main Sep 12, 2024
49 checks passed
@fernando79513 fernando79513 deleted the sd-card-not-tested branch September 12, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-changes The review has been completed but the PR is waiting for changes from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants