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

Add "Hygon Dhyana" to CPUs recognized by cpuid.py + small refactor (New) #928

Merged
merged 7 commits into from
Jan 11, 2024

Conversation

kissiel
Copy link
Contributor

@kissiel kissiel commented Jan 10, 2024

Description

Amidst shenanigans with the reformatting of some of the modules the PR with the addition of Hygon Dhyana got closed.

This PR brings the addition back.

But... the cpuid.py is long overdue for a makeover. Let's start by extracting the function that decodes the cpuid and adding the first unit tests for that thing.

Resolved issues

#529
SERVCERT-1147

Tests

Yeah, the first one :)
Quite a few unit tests.

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1cf70e8) 37.50% compared to head (7eef520) 37.60%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #928      +/-   ##
==========================================
+ Coverage   37.50%   37.60%   +0.09%     
==========================================
  Files         313      313              
  Lines       34809    34810       +1     
  Branches     5983     5982       -1     
==========================================
+ Hits        13055    13089      +34     
+ Misses      21174    21141      -33     
  Partials      580      580              
Flag Coverage Δ
provider-base 7.15% <100.00%> (+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.

Copy link
Collaborator

@mreed8855 mreed8855 left a comment

Choose a reason for hiding this comment

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

I would have preferred "AMD Hygon Dhyana Plus" as opposed to "Hygon Dhyana Plus", however that is a minor change that should not hold up this merge.

@kissiel kissiel merged commit e375b9d into main Jan 11, 2024
10 checks passed
@kissiel kissiel deleted the hygon-dhyana-in-cpuid branch January 11, 2024 21:26
@Hook25 Hook25 mentioned this pull request Jan 26, 2024
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this pull request Mar 20, 2024
…ew) (canonical#928)

* move decoding of cpuid to a dedicated funciton

* Add Hygon Dhyana Plus to identified CPUs in cpuid

* add the first test for cpuid

* formatting improvements

* add tests for not recognizing

* add tests for the main() of cpuid

* make the assertions python 3.5 friendly
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
…ew) (canonical#928)

* move decoding of cpuid to a dedicated funciton

* Add Hygon Dhyana Plus to identified CPUs in cpuid

* add the first test for cpuid

* formatting improvements

* add tests for not recognizing

* add tests for the main() of cpuid

* make the assertions python 3.5 friendly
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