[test] add fuzz_tbor_part_info - #673
Draft
David Zimmermann (zimmy87) wants to merge 9 commits into
Draft
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
David Zimmermann (zimmy87)
force-pushed
the
user/v-davidz/add_tbor_part_info_fuzz
branch
from
August 27, 2026 18:37
a6a9a25 to
41a5973
Compare
Copilot started reviewing on behalf of
David Zimmermann (zimmy87)
August 27, 2026 18:38
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new libFuzzer target to exercise the TBOR PartInfo operation in the fuzzing crate, integrating it into the fuzz workspace binaries.
Changes:
- Added
fuzz_tbor_part_infofuzz target underfuzz_targets/ddi/tbor/. - Registered the new fuzz target as a
[[bin]]infuzz/Cargo.toml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| fuzz/fuzz_targets/ddi/tbor/fuzz_tbor_part_info.rs | New fuzz harness invoking the TBOR PartInfo request against the emulator device. |
| fuzz/Cargo.toml | Adds the fuzz_tbor_part_info binary entry so it can be built/run by the fuzz crate tooling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+9
to
+16
| use azihsm_ddi_tbor_types::TborPartInfoReq; | ||
| use libfuzzer_sys::fuzz_target; | ||
|
|
||
| fuzz_target!(|_input: &[u8]| { | ||
| let dev = common::open_emu_dev(); | ||
| let req = TborPartInfoReq; | ||
| common::fuzz_exec_op_tbor(&dev, &req); | ||
| }); |
…b.com/Azure/azihsm-sdk into user/v-davidz/add_tbor_part_info_fuzz
David Zimmermann (zimmy87)
marked this pull request as ready for review
August 28, 2026 17:50
Copilot started reviewing on behalf of
David Zimmermann (zimmy87)
August 28, 2026 17:51
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
fuzz/fuzz_targets/ddi/tbor/fuzz_tbor_part_info.rs:16
- This fuzz target ignores the fuzzer input and always issues the same deterministic
PartInforequest, so coverage won’t vary with the corpus and libFuzzer will quickly stop making progress (it becomes a repeated smoke test rather than a fuzz target). Consider usinginputto exercise a variable code path, e.g. fuzz theTborPartInfoResptype-specific decoder on arbitrary bytes while still optionally keeping the emulator round-trip for the real opcode.
fuzz_target!(|_input: &[u8]| {
let dev = common::open_emu_dev();
let req = TborPartInfoReq;
common::fuzz_exec_op_tbor(&dev, &req);
});
David Zimmermann (zimmy87)
marked this pull request as draft
August 31, 2026 17:19
…d_tbor_part_info_fuzz
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.
No description provided.