Repository navigation
test: add fake-tool coverage for untested LLDB ops - #26
walsykerem wants to merge 1 commit into
Conversation
|
PR Summary by QodoAdd fake-tool tests for 13 LLDB operations
AI Description
Merge Risk
|
Code Review by Qodo
1. The reported test command skips the new tests
|
| if !strings.Contains(out.Output, "ran:") { | ||
| t.Fatalf("%s lost the fake lldb output: %q", c.name, out.Output) | ||
| } |
There was a problem hiding this comment.
2. Lldb output checks accept any output 📎 Requirement gap ≡ Correctness
The success path of TestIssue7LldbMiscOpsFakeTool checks out.Args as returned metadata but only looks for ran: in the fake debugger’s output, without verifying the arguments the shim received or each operation’s output. If extLldb drops --, changes -o, omits the target, or an operation returns the wrong or unparsed transcript, the success cases can still pass; the refusal cases only inspect error kinds.
Agent Prompt
## Issue description
The success cases need to verify both the command line received by the fake debugger and the output returned or parsed for each of the 13 LLDB misc operations. Checking returned command metadata and the generic `ran:` prefix does not establish either.
## Fix Focus Areas
- test/issue7_lldb_fake_test.go[50-50]
- test/issue7_lldb_fake_test.go[61-79]
- test/issue7_lldb_fake_test.go[91-96]
## Recommended Fix
Have the shim print its received arguments with unambiguous boundaries, and assert that they contain `--batch`, each expected `-o` command, `--`, and the target in the expected order. Give each case an expected output shape, or have the shim print a per-command marker that the operation’s parser must surface, then assert that the returned `extOut` or parsed fields match it. Keep the existing `out.Args` metadata assertion as a separate check.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| // The 13 misc LLDB items had no fake-tool test at all. Each one is one batch | ||
| // dialog, so the exact command is the contract: a typo there is a different | ||
| // lldb command, not a formatting detail. | ||
| func TestIssue7LldbMiscOpsFakeTool(t *testing.T) { |
There was a problem hiding this comment.
1. The reported test command skips the new tests 🐞 Bug ≡ Correctness
TestIssue7LldbMiscOpsFakeTool and the other new tests live in test/, while the reported `go test ./lrecon -run '^TestIssue7' selects tests only from lrecon/`. That command can succeed without executing a fake-tool case, because matching the implementation’s package main declaration does not make files in the two directories one Go package.
Agent Prompt
## Issue description
The reported `go test ./lrecon -run '^TestIssue7'` does not discover tests placed in `test/`.
## Fix Focus Areas
- test/issue7_lldb_fake_test.go[1-182]
## Recommended Fix
Move the new test file into `lrecon/` so it joins the implementation package, then run the stated command and verify that the Issue 7 cases execute.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Qodo Fixer🍒 Ready to be cherry-picked — ✅ Merged (0) · ☑ Fixed (1) 🔗 Fix PR: #33 This fix PR was closed automatically. Its branch is preserved so you can cherry pick the changes into the original PR. Prompt for coding agent Process — 1 fixed
|
|
Recreated from verified backup (/Users/keremurhan/lrecon-pr-backup-20261126) as part of PR cleanup; replacement PR follows. |



Fixes #7
Adds fake-tool unit tests for the 13 LLDB misc ops that had no test coverage: disassemble, breakpoint set/list/delete, watchpoint, image lookup, source list, frame variable, thread backtrace, diagnostics, thread list full, image list full, and target list full.
Each case puts a fake
lldbshell shim on PATH, so there is no real debugger dependency and no new dependency. The tests pin the exact batch command, the live-opprocess launch --stop-at-entry/process killwrapper, argument defaults, and the refusal paths (missing target =io, missing lldb =no_engine, no-process transcript =no_enginewith the note retained, launch-failure transcript =bad_arg).Why: these ops are a command string plus a refusal contract; a typo or a lost refusal kind was invisible to CI. The 7 LLDB memory ops already had fake-tool tests and are unchanged.
Tests:
go test ./lrecon -run '^TestIssue7' -count=1(ok).