Skip to content

fuzzing: support more than one executable at once #20988

Open

Description

@andrewrk

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.

Activity

  1. added
    enhancement
    on Aug 8, 2024
  2. added this to the 0.15.0 milestone on Aug 8, 2024
  3. added
    bug
    on Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancementfuzzing

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions