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

Marshaling out #11

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Marshaling out #11

wants to merge 9 commits into from

Conversation

hugelgupf
Copy link
Member

No description provided.

Co-authored-by: Steven Hsieh <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 80.26316% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 85.20%. Comparing base (1465ce6) to head (764463f).

Files Patch % Lines
dmidecode/struct_parser.go 89.18% 5 Missing and 3 partials ⚠️
dmidecode/type3_chassis_information.go 73.33% 2 Missing and 2 partials ⚠️
dmidecode/type0_bios_information.go 0.00% 2 Missing ⚠️
dmidecode/type17_memory_device.go 0.00% 2 Missing ⚠️
dmidecode/type1_system_information.go 0.00% 2 Missing ⚠️
dmidecode/type2_baseboard_information.go 80.00% 1 Missing and 1 partial ⚠️
dmidecode/type38_ipmi_device_information.go 0.00% 2 Missing ⚠️
dmidecode/type43_tpm_device.go 0.00% 2 Missing ⚠️
dmidecode/type4_processor_information.go 0.00% 2 Missing ⚠️
dmidecode/type7_cache_information.go 0.00% 2 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   85.73%   85.20%   -0.54%     
==========================================
  Files          24       24              
  Lines        1514     1649     +135     
==========================================
+ Hits         1298     1405     +107     
- Misses        151      174      +23     
- Partials       65       70       +5     
Flag Coverage Δ
amd64-1.21.x 85.20% <80.26%> (-0.54%) ⬇️
amd64-1.22.x 85.20% <80.26%> (-0.54%) ⬇️
arm-1.21.x ?
arm-1.22.x ?
arm64-1.21.x ?
arm64-1.22.x ?
riscv64-1.21.x ?
riscv64-1.22.x ?

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.

Signed-off-by: Chris Koch <[email protected]>
We don't know how to read any of that right now anyway.

Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
t := smbios.Table{
Header: smbios.Header{
Type: val.Typ(),
Handle: handle,

Choose a reason for hiding this comment

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

why we have to pass in handle when we can directly obtain that from val.Handle?

Choose a reason for hiding this comment

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

The Length of full info Type 1 table should be (4 + 4 + 16 + 3) -> 27.
This incorrect number won't fail the test but create new test failure while copying these values for the new test.

t.Run(tt.name, func(t *testing.T) {
got, err := tt.table.MarshalBinary()
if err != nil {
t.Errorf("MarshalBinary returned error: %v", err)

Choose a reason for hiding this comment

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

Would it be better to use t.Fatalf? since it doesn't make sense to proceed if function returns error.

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