Skip to content

Add fuzz target for fdt_mut - #167

Open
vishruthasgowda wants to merge 1 commit into
google:mainfrom
vishruthasgowda:fuzz-fdt-mut
Open

vishruthasgowda wants to merge 1 commit into
google:mainfrom
vishruthasgowda:fuzz-fdt-mut

Conversation

@vishruthasgowda

Copy link
Copy Markdown
Contributor

Adds a fuzz target for fdt_mut.

The target starts from tests/dtb/test_props.dtb with some spare buffer space and applies an arbitrary sequence of operations (add_property, set_value, remove_property, remove_child, remove node, compact) on randomly chosen nodes. After every operation it checks that the buffer still parses as a valid FDT, and that each operation has its expected effect (e.g. adding a duplicate property fails, an added property is readable with the same value, remove_* returns true only if the item existed).

Ran for ~2 minutes (~200k executions) locally with no crashes.

Notes / possible follow-ups:

Fixes #166

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.

fuzz tests for fdt_mut

1 participant