Direct ACVP test execution discards pytest's failure status
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- cryptography, testing
Research direction
Read test/test_acvp.py, especially the main block near line 193, and check the current branch to confirm the behavior and whether it is already fixed. Run the file directly with a passing and a deliberately failing ACVP case, then verify the process exit statuses and that imported pytest runs behave normally. Done means direct execution returns zero on success and nonzero on failure.
Written by the indexing model from the issue text.
Description
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.
- Pinned source: test/test_acvp.py
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.
- Dominant language
- C
- Stars
- 5
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
Similar issues
-
bug rust SDK & CLI & REST API
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
boxlite-ai/boxlite#3292 ·
Maintainers usually reply within 1 day
-
bug game: 0400486024DEC000 mac nvn shader chain
Difficulty 1/5 Under an hour Newbie friendliness 78/100
seedds/nxnative#3675 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100