Skip to content

rtk go test: a failing fuzz run drops the failing-input path and the re-run command #4434

Open

Description

@KuSh

When a fuzz target fails, go test -json reports where the failing input was saved and how to re-run it:

Failing input written to testdata/fuzz/FuzzRev/f7d774048ada30d0
To re-run:
go test -run=FuzzRev/f7d774048ada30d0

rtk go test prints only the assertion line:

Go test: 1 passed, 1 failed in 1 packages

foo (1 passed, 1 failed)
  [FAIL] FuzzRev
     foo_test.go:18: not involutive
[full output: ~/.local/share/rtk/tee/..._go_test.log]

Neither the corpus path nor the re-run command appears; both are in the tee log. select_go_test_failure_lines in src/cmds/go/go_cmd.rs keeps .go:N locations and lines with failure keywords, and these two lines match neither. Reproduced on develop 7efbaef (rtk 0.49.0, Go 1.26.1) with rtk go test -fuzz=FuzzRev -fuzztime=4s ./foo on a fuzz target whose property fails; the output is the same with and without #1444.

Activity

  1. added
    bug
    good first issue
    on Oct 3, 2026
  2. rtk-wshm-sync-bot commented on Oct 3, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟢 Priority low
    🎯 Confidence 90%

    Summary

    select_go_test_failure_lines in go_cmd.rs drops the fuzz corpus path and re-run command when filtering fuzz test failure output.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • src/cmds/go/go_cmd.rs

    Suggested Actions

    1. Extend select_go_test_failure_lines in src/cmds/go/go_cmd.rs to retain 'Failing input written to' and 'To re-run:' li…
    2. Add a regression test using a failing FuzzRev target to lock in both lines appearing in filtered output
    3. Cross-check against related go test filtering issues rtk go test -list prints "No tests found" while the stream lists the tests #4419, rtk pipe -f go-test reports plain-text go test output as "No tests found" #4418, rtk go test -C DIR fails: -json is injected before -C #4362 for shared root cause in the same file

    Triaged automatically by wshm · This is an automated analysis, not a human review.

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

    area:clibuggood first issuepriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions