libc-test: ctest does not run for target_os = "qnx" (QNX 8)

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust

调研方向

从 libc-test/build/target.rs 开始,检查 Target::nto() 以及 test_neutrino 中现有的 QNX 分支。然后查看 open_wmemstream 在生成的 C 测试中的引入位置,以及平台特定的跳过项是如何处理的。完成标准是 QNX 8 target 成功运行 ctest 构建,并且报告中的测试套件通过。

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

描述

C-bug

Target triples: x86_64-pc-qnx, aarch64-unknown-qnx (QNX SDP 8.0)

Problem: libc-test does not run for target_os = "qnx". Target::nto() in libc-test/build/target.rs only matches os == "nto", so the build script panics before reaching test_neutrino, even though test_neutrino already has a "qnx" branch.

Steps to reproduce (QNX SDP 8.0 environment sourced, a QNX 8 target reachable through a cargo runner):

cd libc-test
LIBC_CI_ZBUILD_STD=1 CC_x86_64_pc_qnx=qcc CFLAGS_x86_64_pc_qnx=-Vgcc_ntox86_64 \
  cargo +nightly test --target x86_64-pc-qnx -Zbuild-std=std,panic_abort --test ctest

Log:

thread 'main' panicked at libc-test/build/main.rs:93:14:
unknown target Target { triple: "x86_64-pc-qnx", ... os: "qnx", ... }

Second problem: with Target::nto() extended to "qnx", the generated C test fails to compile because open_wmemstream is bound for QNX but not declared in the QNX 8.0 headers:

ctest_output.c: error: 'open_wmemstream' undeclared (first use in this function)

With both changed locally ("qnx" accepted, open_wmemstream skipped), everything else passes on QNX 8.0 x86_64: PASSED 4653 tests.

Found while testing #5783. I can send a PR for both.

主要语言
Rust
星标
2.7k
派生
1.4k
平均合并
3 天 2 小时
30 天内合并 PR
45

环境准备

从这里开始

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

rust-lang/libc 的其他 Issue

查看 rust-lang/libc 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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