test(cl): when expect.txt is ';', skip diff only, not execution
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- go
- Domain
- testing-qa
Research direction
Start in cl/cltest/cltest.go at testRunFrom and inspect how RunAndCaptureWithConf and expect.txt comparison are handled. Run go test ./cl, reproduce the cl/_testgo/cgobasic case if needed, and add a regression test showing that ; executes the case while skipping only textual output comparison.
Written by the indexing model from the issue text.
Description
Background
In cl runtime tests, many cases use a single ; in expect.txt. In practice this is often used for outputs that are not stable for textual golden comparison (for example, address-like values or environment-dependent formatting).
However, the current implementation treats this marker as skip the whole run, so tests appear green while the case is never executed.
Current Behavior
In cl/cltest/cltest.go (testRunFrom):
if bytes.Equal(expected, []byte{';'}) { // expected == ";" means skipping expect.txt
return
}
This returns before RunAndCaptureWithConf(...).
Why This Is a Problem
expect.txt == ";" effectively means “do not run”, not just “do not diff output”.
Consequences:
- build/runtime regressions can be hidden in
go test ./cl; - false confidence: CI reports pass while manual
llgo runfails for the same case.
Expected Behavior
For expect.txt == ";":
- still execute
RunAndCaptureWithConf(...)(at least validate build/run success); - skip only
output vs expect.txttextual diff.
If we still need “skip execution entirely”, introduce a separate explicit marker.
Reproduction Example
cd cl/_testgo/cgobasic
llgo run -target esp32c3-basic -emulator .
This fails with build/SSA errors, while the current go test ./cl path may not execute this case when expect.txt == ";".
If helpful, I can follow up with a PR that changes ; to run-only/no-diff semantics and adds a regression test.
- Dominant language
- LLVM
- Stars
- 758
- Forks
- 49
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 137
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xgo-dev/llgo
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
go-compat proposal Proposal-Accepted
Difficulty 5/5 Over a week Newbie friendliness 15/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100