ASIF: Add blockSize detection and unit tests on macOS#64
Merged
AkihiroSuda merged 1 commit intolima-vm:masterfrom Nov 18, 2025
Merged
ASIF: Add blockSize detection and unit tests on macOS#64AkihiroSuda merged 1 commit intolima-vm:masterfrom
AkihiroSuda merged 1 commit intolima-vm:masterfrom
Conversation
b20f933 to
6365c19
Compare
AkihiroSuda
reviewed
Nov 18, 2025
AkihiroSuda
reviewed
Nov 18, 2025
AkihiroSuda
reviewed
Nov 18, 2025
AkihiroSuda
reviewed
Nov 18, 2025
AkihiroSuda
reviewed
Nov 18, 2025
image/asif/asif_darwin_test.go
Outdated
|
|
||
| func TestOpenASIF(t *testing.T) { | ||
| // Check macOS version | ||
| if productVersion, err := exec.CommandContext(context.Background(), "sw_vers", "--productVersion").Output(); err != nil { |
Member
There was a problem hiding this comment.
t.Context should be used.
Same for other commands too, and please squash the commits
Contributor
Author
There was a problem hiding this comment.
t.Context() requires Go 1.24+.
Member
There was a problem hiding this comment.
We can drop the support for Go 1.23 as it has reached EOL
https://endoflife.date/go
befc316 to
3556092
Compare
ref: https://github.com/fox-it/dissect.hypervisor/blob/0c8976613a369923e69022304b2f0ed587e997e2/dissect/hypervisor/disk/c_asif.py#L19 Since ASIF file format information does not exist officially, we should test the parsed properties in unit test. Signed-off-by: Norio Nomura <norio.nomura@gmail.com> Apply reviews - rename to `image/asif/asif_darwin_test.go` - remove redundant check - rename to `TestOpenASIF()` - use `exe.CommandContext()` - Bumpt to Go 1.24 Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
3556092 to
7b13263
Compare
Contributor
Author
|
Thanks! 🙏🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: https://github.com/fox-it/dissect.hypervisor/blob/0c8976613a369923e69022304b2f0ed587e997e2/dissect/hypervisor/disk/c_asif.py#L19
Since ASIF file format information does not exist officially, we should test the parsed properties in unit test.
Fixes #62