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

オープン 初心者向け
#5,785 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

まず libc-test/build/target.rs を確認し、既存の test_neutrino にある QNX 分岐とあわせて Target::nto() を調べます。次に、生成される C テストのどこで open_wmemstream が含まれているか、またプラットフォーム固有のスキップがどのように扱われているかを確認します。QNX 8 ターゲットで 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時間
マージ済み PR(30日)
45

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-lang/libc のほかの issue

rust-lang/libc の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。