Skip to content

fuzzing: support more than one executable at once #20988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
andrewrk opened this issue Aug 8, 2024 · 0 comments
Open

fuzzing: support more than one executable at once #20988

andrewrk opened this issue Aug 8, 2024 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior enhancement Solving this issue will likely involve adding new logic or components to the codebase. fuzzing
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Aug 8, 2024

Extracted from #20958.

// TODO: make each events URL correspond to one coverage map
const coverage_map = &coverage_maps[0];

To reproduce, create two different files and put a fuzz test in each one. Something like this:

    const lib_unit_tests = b.addTest(.{
        .root_source_file = b.path("src/root.zig"),
        .target = target,
        .optimize = optimize,
    });
    const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);

    const exe_unit_tests = b.addTest(.{
        .root_source_file = b.path("src/main.zig"),
        .target = target,
        .optimize = optimize,
        .link_libc = true,
    });
    const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);
    const test_step = b.step("test", "Run unit tests");
    test_step.dependOn(&run_lib_unit_tests.step);
    test_step.dependOn(&run_exe_unit_tests.step);

Then run zig build test --fuzz.

The fuzzing interface should show stats for each fuzzer, along with aggregated stats, and it should show multiple clickable entry points.

Instead it only shows the UI for one of them.

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. fuzzing labels Aug 8, 2024
@andrewrk andrewrk added this to the 0.15.0 milestone Aug 8, 2024
@andrewrk andrewrk added the bug Observed behavior contradicts documented or intended behavior label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior enhancement Solving this issue will likely involve adding new logic or components to the codebase. fuzzing
Projects
None yet
Development

No branches or pull requests

1 participant