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

Ensure cpu/clocktest does not run on the s390x architecture (BugFix) #1704

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

pesader
Copy link
Contributor

@pesader pesader commented Jan 31, 2025

Description

The cpu/clocktest test doesn't work on s390x due to issues with sched_setaffinity (as discussed in issue #422), so make sure this test doesn't run on this architecture. To do that, add a requires to the cpu/clocktest so it doesn't fulfill its requirements if the detected CPU architecture is "s390x".

Resolved issues

Tests

I haven't written any Python code for this contribution, so I don't think the test coverage has changed. Still, I ran coverage and attached its HTML coverage report below.

htmlcov.zip

However, I have manually tested this change by running checkbox and making sure cpu/clocktest still runs on my x86 laptop and it did (the test description is "Tests the CPU for clock jitter"):

image

I don't have an IBM mainframe at hand 😅, so I tried changing "s390x" to "x86_64" to see if the test didn't run on my laptop and it didn't:

image

I make myself available for further changes and explanations. Thank you for reviewing this!

The cpu/clocktest test doesn't work on s390x due to issues with
sched_setaffinity, so skip this test on this architecture.

Fixes: canonical#422
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.

+1, note that this works only if the platforms are uniform due to how negations work in resource expressions, either way, I think we can make this assumption

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.01%. Comparing base (4b89d45) to head (cd004ba).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1704   +/-   ##
=======================================
  Coverage   49.01%   49.01%           
=======================================
  Files         372      372           
  Lines       40348    40348           
  Branches     6817     6817           
=======================================
  Hits        19777    19777           
  Misses      19849    19849           
  Partials      722      722           
Flag Coverage Δ
provider-base 24.79% <ø> (ø)

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.

@Hook25 Hook25 merged commit decfce9 into canonical:main Jan 31, 2025
40 of 41 checks passed
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