A failed --test run ends in an ASSERT FAIL trace from lib/test_runner.eigs

未关闭 适合新手
#2,197 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
83/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c
领域
cli, testing

调研方向

从 lib/test_runner.eigs 第184行附近开始,这里失败的测试文件会触发断言;并检查 issue #1839 提到的现有退出码行为。然后找到 eigenscript --test 的回归测试,并补充对失败运行的最后一行输出和退出状态的覆盖,包括 --json;完成标准是失败时以退出码1结束且没有 runner 跟踪信息,而通过时的输出保持不变并以退出码0结束。

由索引模型根据 Issue 内容生成。

描述

area:stdlib bug found-by:cold-read kind:bug

When any test file fails, eigenscript --test ends its run with an ASSERT FAIL error and a stack trace pointing into lib/test_runner.eigs. The exit status (1) is right; the output reads as if the runner itself crashed, and the trace is noise on every red run. It also lands after the --json document.

To reproduce (v0.48.0, release build)
mkdir -p tdir
printf 'assert of [1 == 2, "one is not two"]\n' > tdir/test_a.eigs
printf 'assert of [true, "ok"]\n' > tdir/test_b.eigs
eigenscript --test tdir; echo "rc=$?"
Actual (tail)
Files: 2 | Passed: 1 | Failed: 1
Error .../lib/test_runner.eigs:184: ASSERT FAIL: 1 test file(s) failed
   184 |     assert of [0, (str of failed_files) + " test file(s) failed"]
       |            ^
  at <module> (.../lib/test_runner.eigs:184)
rc=1
Expected

The summary line is the last thing printed and the process exits 1, as pytest or cargo test do. No error header or trace from the runner's own source. (set_exit_code, from #1839, or exit of 1 would do it without a raise.)

Done when
  • On the repro, --test prints no ASSERT FAIL and no trace into lib/test_runner.eigs, and still exits 1.
  • --test --json on the repro writes only the JSON document to stdout and exits 1.
  • An all-passing run is unchanged (same output, exit 0).
  • A regression test checks the failing case's last line and exit status, and fails on v0.48.0.

Found while checking docs/llms.txt against the runtime (PR #2193).


Generated by Claude Code

主要语言
C
星标
3
派生
7
平均合并
6 小时 21 分钟
30 天内合并 PR
323

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。