Skip to content

Tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options#2884

Merged
hugelgupf merged 10 commits into
u-root:mainfrom
hugelgupf:kexec-arm64-tests
Feb 1, 2024
Merged

Tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options#2884
hugelgupf merged 10 commits into
u-root:mainfrom
hugelgupf:kexec-arm64-tests

Conversation

@hugelgupf
Copy link
Copy Markdown
Member

@hugelgupf hugelgupf commented Feb 1, 2024

  • Tests for arm64 kexec.
  • Instead of allowing users to specify whether to mmap kernel/initramfs, just try the mmap. If it fails, fall back to reading the file.

Depends on #2885 and #2886

@hugelgupf hugelgupf changed the title WIP: tests for arm64 kexec WIP: tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options Feb 1, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 1, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (809a676) 77.31% compared to head (330f5b8) 77.37%.

Files Patch % Lines
pkg/boot/linux/load_linux_image.go 92.70% 7 Missing ⚠️
pkg/boot/linux/load_linux.go 88.46% 3 Missing ⚠️
pkg/boot/kexec/memory_linux.go 87.50% 2 Missing ⚠️
pkg/boot/linux/load_linux_arm64.go 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2884      +/-   ##
==========================================
+ Coverage   77.31%   77.37%   +0.05%     
==========================================
  Files         429      431       +2     
  Lines       43148    43153       +5     
==========================================
+ Hits        33360    33389      +29     
+ Misses       9788     9764      -24     
Flag Coverage Δ
.-amd64 67.87% <ø> (ø)
cmds/...-amd64 71.40% <ø> (ø)
integration/generic-tests/...-amd64 17.97% <0.71%> (-0.44%) ⬇️
integration/generic-tests/...-arm 0.00% <ø> (ø)
integration/generic-tests/...-arm64 22.13% <68.75%> (+0.02%) ⬆️
integration/gotests/...-amd64 74.11% <71.01%> (+<0.01%) ⬆️
integration/gotests/...-arm 75.41% <80.32%> (+0.02%) ⬆️
integration/gotests/...-arm64 75.31% <68.53%> (+0.25%) ⬆️
pkg/...-amd64 76.35% <81.15%> (+0.26%) ⬆️

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.

@hugelgupf hugelgupf force-pushed the kexec-arm64-tests branch 2 times, most recently from c4e43ee to 2ef2f47 Compare February 1, 2024 20:15
@hugelgupf hugelgupf changed the title WIP: tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options Feb 1, 2024
@hugelgupf hugelgupf changed the title tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options Tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options Feb 1, 2024
@hugelgupf hugelgupf marked this pull request as ready for review February 1, 2024 20:25
@rminnich rminnich added the Awaiting reviewer Waiting for a reviewer. label Feb 1, 2024
rminnich
rminnich previously approved these changes Feb 1, 2024
Copy link
Copy Markdown
Member

@rminnich rminnich left a comment

Choose a reason for hiding this comment

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

just had one comment, your call.
So the Mmap is gone? IIRC it was added for low memory situations, did that issue go away?

Comment thread pkg/boot/linux/load_linux.go Outdated
@rminnich rminnich added Awaiting author Waiting for new changes or feedback for author. and removed Awaiting reviewer Waiting for a reviewer. labels Feb 1, 2024
@hugelgupf
Copy link
Copy Markdown
Member Author

just had one comment, your call. So the Mmap is gone? IIRC it was added for low memory situations, did that issue go away?

The mmap isn't gone -- rather than having to set KexecOptions.MmapKernel we will just always try to mmap the file, and if mmap didn't work, we'll read it. No need to configure it.

@rminnich
Copy link
Copy Markdown
Member

rminnich commented Feb 1, 2024

the automagic property of this is quite nice ...

Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
@hugelgupf hugelgupf merged commit 6002e37 into u-root:main Feb 1, 2024
@hugelgupf hugelgupf deleted the kexec-arm64-tests branch February 1, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting author Waiting for new changes or feedback for author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants