Skip to content

[test] add fuzz_tbor_part_info - #673

Draft
David Zimmermann (zimmy87) wants to merge 9 commits into
user/v-davidz/add_tbor_part_fuzzfrom
user/v-davidz/add_tbor_part_info_fuzz
Draft

[test] add fuzz_tbor_part_info#673
David Zimmermann (zimmy87) wants to merge 9 commits into
user/v-davidz/add_tbor_part_fuzzfrom
user/v-davidz/add_tbor_part_info_fuzz

Conversation

@zimmy87

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 27, 2026 18:37
@zimmy87
David Zimmermann (zimmy87) force-pushed the user/v-davidz/add_tbor_part_info_fuzz branch from a6a9a25 to 41a5973 Compare August 27, 2026 18:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_info fuzz target under fuzz_targets/ddi/tbor/.
  • Registered the new fuzz target as a [[bin]] in fuzz/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);
});
@zimmy87 David Zimmermann (zimmy87) changed the title add fuzz_tbor_part_info [test] add fuzz_tbor_part_info Aug 28, 2026
@zimmy87
David Zimmermann (zimmy87) marked this pull request as ready for review August 28, 2026 17:50
Copilot AI review requested due to automatic review settings August 28, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 PartInfo request, 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 using input to exercise a variable code path, e.g. fuzz the TborPartInfoResp type-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);
});

@zimmy87
David Zimmermann (zimmy87) marked this pull request as draft August 31, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants