Skip to content

Added tests for IOMMU config (New)#1715

Merged
fernando79513 merged 9 commits intomainfrom
add_iommu_flag_check
Feb 14, 2025
Merged

Added tests for IOMMU config (New)#1715
fernando79513 merged 9 commits intomainfrom
add_iommu_flag_check

Conversation

@fernando79513
Copy link
Copy Markdown
Collaborator

@fernando79513 fernando79513 commented Feb 10, 2025

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

Description

We want to check if the CONFIG_INTEL_IOMMU_DEFAULT_ON config flag is present in versions of the kernel >=6.8.0-20

Note: I've included the test into the submission-cert-automated test-plan. It's already being run in all of the devices and it includes also some info tests, so it made sense for me to include it here. Let me know if you think it should be in another test-plan
Note: I had to remove the config iterator (see commit: removed iterator for python 3.5). I don't like this too much, but the unit tests failed in python 3.5 if I read the file line by line.

Resolved issues

https://warthogs.atlassian.net/browse/CHECKBOX-1608

Documentation

Tests

Tested with:
classic image, ubuntu 24, kernel "6.8.0-52-generic"

-------------[ Check if the kernel is compiled with IOMMU support ]-------------
ID: com.canonical.certification::info/kernel-config-iommu-flag
Category: com.canonical.plainbox::info
... 8< -------------------------------------------------------------------------
Flag CONFIG_INTEL_IOMMU_DEFAULT_ON is present and set to 'y'.

core image, ubuntu 24, pc-kernel "6.11.0-17-generic"
https://certification.canonical.com/hardware/201805-26252/submission/410961/test-results/

-------------[ Check if the kernel is compiled with IOMMU support ]-------------
ID: com.canonical.certification::info/kernel-config-iommu-flag
Category: com.canonical.plainbox::info
... 8< -------------------------------------------------------------------------
Flag CONFIG_INTEL_IOMMU_DEFAULT_ON is present and set to 'y'.

core image, ubuntu 22, pc-kernel "5.15.0-132-generic"
https://certification.canonical.com/hardware/201802-26085/submission/410964/test-results/

-------------[ Check if the kernel is compiled with IOMMU support ]-------------
ID: com.canonical.certification::info/kernel-config-iommu-flag
Category: com.canonical.plainbox::info
... 8< -------------------------------------------------------------------------
Skipping: kernel version 5.15.0-132 is lower than 6.8.0-20.

core image, ubuntu 22, pc-kernel "5.15.0-132-generic"
https://certification.canonical.com/hardware/201802-26085/submission/410964/test-results/

-------------[ Check if the kernel is compiled with IOMMU support ]-------------
ID: com.canonical.certification::info/kernel-config-iommu-flag
Category: com.canonical.plainbox::info
... 8< -------------------------------------------------------------------------
Skipping: kernel version 5.15.0-132 is lower than 6.8.0-20.

core image, ubuntu 24, pi-kernel "6.8.0-1016-raspi" (ARM)
https://certification.canonical.com/hardware/202310-32203/submission/411715/test-results/

-------------[ Check if the kernel is compiled with IOMMU support ]-------------
ID: com.canonical.certification::info/kernel-config-iommu-flag
Category: com.canonical.plainbox::info
Job cannot be started because:
 - resource expression 'cpuinfo.platform in ("i386", "x86_64")' evaluates to false
Outcome: job cannot be started

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.18%. Comparing base (9a81f3b) to head (90edca6).
Report is 140 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1715      +/-   ##
==========================================
+ Coverage   49.12%   49.18%   +0.05%     
==========================================
  Files         372      373       +1     
  Lines       40338    40385      +47     
  Branches     6809     6818       +9     
==========================================
+ Hits        19816    19863      +47     
  Misses      19799    19799              
  Partials      723      723              
Flag Coverage Δ
provider-base ∅ <100.00%> (∅)

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.

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.

Good call on creating an attachment to have a copy of the kernel config in each submission.

I've provided a few comments inline. I think Checkbox resource jobs can be used to skip the job instead of running it when not needed.

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.

+1 looks good to me! Thanks

@fernando79513 fernando79513 merged commit 0a49970 into main Feb 14, 2025
41 checks passed
@fernando79513 fernando79513 deleted the add_iommu_flag_check branch February 14, 2025 15:13
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