-
Notifications
You must be signed in to change notification settings - Fork 396
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
fbptcat: dump raw contents of FBPT table #2762
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really useful, thanks!
Besides my very small nit, we're going to need tests.
But this is a super useful tool and I hope you are ok with writing them.
if would really be nice to have this, can you tidy it up and we'll try again? |
Hi, yes thank you for the ping. |
Hi, I have a few questions:
Thank you. |
Codecov ReportAttention:
... and 2 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
Most of the code that I wrote in pkg/fpdt and pkg/fbpt parses the tables' contents which I can not verify since content can vary. I wrote a test to check the fpdt tables integrity by calculating the checksum (the fpbt table resides inside the fpdt table so its included in the checksum calculation). Are other tests/more code coverage needed? EDIT : Just read integration test section of u-root, currently still working on tests. |
Well, you do need to add a DCO via git commit -s --amend for each commit |
a1c4cf1
to
6d1ac04
Compare
b18068f
to
91f2e08
Compare
FBPT = Firmware Basic Performance Boot Table fbptcat is a shell command for printing the raw contents of Firmware Basic Performance Boot Table (FBPT) within ACPI FPDT New FPDT package created to contain functions concerning all tables and structures within ACPI FPDT New FPBT package created to contain functions concerning the FBPT Table found within ACPI FPDT Signed-off-by: Prince Geutler <tun50582@temple.edu>
91f2e08
to
d4a9dd6
Compare
We have been chatting about how best to get more coverage. At least for fbpt.go you may be able to do something similar to smbios_test.go and mock the memory ready functions. Every call to Seek and ReadFull go to a function which ultimately calls mem.Seek|ReadFull. Then you can override those functions for the test. I'm worried refactoring to use memio might be slower due to the number of sequential reads you need to do here and the number of times memio would have to open, seek, read, close. u-root/pkg/smbios/smbios_test.go Lines 56 to 70 in 19031e1
|
fbptcat: dump raw contents of FBPT table
FBPT = Firmware Basic Performance Boot Table
fbptcat is a shell command for printing the raw contents of
Firmware Basic Performance Boot Table (FBPT) within ACPI FPDT
New FPDT package created to contain functions concerning
all tables and structures within ACPI FPDT
New FPBT package created to contain functions concerning
the FBPT Table found within ACPI FPDT
Signed-off-by: Prince Geutler geutlerprince@gmail.com