Repository navigation
Conversation
✅ Deploy Preview for urunc canceled.
|
cmainas
reviewed
Oct 13, 2026
cmainas
left a comment
Contributor
There was a problem hiding this comment.
Hello @pocopepe ,
thank you for the PR. A few questions:
- Is the first fuzzing example actual or just a placeholder to ensure evrything works well?
- I do not think we need any discovery loop for fuzzing targets. Instead, we can use fuzzing targets in the same way we use unit tests per packages right now. So we cna name the fuzzing functions with a specific pattern to match a target.
| fns=$$($(GO) test -list '^Fuzz' ./$$pkg) || exit 1; \ | ||
| for fn in $$(echo "$$fns" | grep '^Fuzz'); do \ | ||
| echo "Fuzzing $$fn in $$pkg"; \ | ||
| $(GO) test -run='^$$' -fuzz="^$$fn$$" -fuzztime=$(FUZZTIME) ./$$pkg || exit 1; \ |
Contributor
There was a problem hiding this comment.
We should also add the GOFLAGS=$(TEST_FLAGS) and other test flags that apply cleanly for fuzzing. If they do not apply, we can refactor a bit the existing variables so they cna be more re-usable.
Ref: urunc-dev#852 Signed-off-by: viju <avijusanjai@gmail.com>
pocopepe
force-pushed
the
feat/fuzzing
branch
from
October 14, 2026 11:36
6ad5879 to
e1ae619
Compare
Contributor
Author
|
Hi @cmainas,
I've made the changes and added the Go flags as well. |
cmainas
reviewed
Oct 15, 2026
| } | ||
|
|
||
| conf, err := GetUnikernelConfig("", &specs.Spec{Root: &specs.Root{Path: rootfs}}) | ||
| if (conf == nil) == (err == nil) { |
Contributor
There was a problem hiding this comment.
This check does not catch any issues. Every return pair is either (conf, nil) or (nil, err),
| f.Add([]byte(`{"` + annotType + `":"bGludXg=","` + annotHypervisor + `":"cWVtdQ==","` + annotBinary + `":"L2FwcA=="}`)) | ||
|
|
||
| f.Fuzz(func(t *testing.T, data []byte) { | ||
| rootfs := t.TempDir() |
Contributor
There was a problem hiding this comment.
We do not have to re-create the tempDir every time. This wll slow down the whole test.
This branch has not been deployed
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.
Description
Adding a Makefile stub to extend the suite to fuzzing, and a bare bones fuzz target that runs locally and feeds arbitrary bytes as
urunc.jsonthroughGetUnikernelConfig.Related issues
How was this tested?
Ran
make fuzzLLM usage
N/A
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).