Direct ACVP test execution discards pytest's failure status

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

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

評価

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

調査の方向性

test/test_acvp.py、特に193行目付近の__main__ブロックを読み、現在のブランチを確認して、動作と修正済みかどうかを確かめてください。合格するACVPケースと意図的に失敗させるACVPケースを使ってファイルを直接実行し、その後、プロセスの終了ステータスと、pytestをインポートして実行した場合に通常どおり動作することを確認してください。直接実行が成功時に0、失敗時に0以外を返せば完了です。

索引モデルが issue の本文から書いたものです。

説明

The following misuse was identified in a pinned snapshot of IBM/mlca. The observation is limited to that snapshot; the current branch, intended contract, reachability, and any existing fixes should be checked.

Problem
The direct entry point at test/test_acvp.py:193 calls pytest.main(sys.argv) without using its return code. If a PQ KEM or signature known-answer assertion fails, pytest records the failure internally but the script then reaches normal process completion with status zero. Automation invoking the file directly can therefore accept a failed ACVP suite as a successful command; running the same tests through an imported pytest session does not have this discarded-exit-status problem.

Suggested fix
Use raise SystemExit(pytest.main(sys.argv)) or sys.exit with the returned code in the main block. Add subprocess tests for one passing and one deliberately failing ACVP case, verifying exit statuses zero and nonzero respectively while preserving normal imported pytest behavior.


This issue was drafted with AI assistance.

主要言語
C
スター
5
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

似ている issue

C の issue をもっと見る

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

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