Skip to content

Test that PGSO rejects pgso-ir output it saw only the end of - #2047

Draft
fazxes wants to merge 1 commit into
mainfrom
fazxes/pgso-truncated-output-test
Draft

fazxes wants to merge 1 commit into
mainfrom
fazxes/pgso-truncated-output-test

Conversation

@fazxes

@fazxes fazxes commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a test for the check in emit_bitcode that rejects pgso-ir --verbose output the runner truncated.
  • emit_bitcode requires exactly one compile that emits bitcode in that output. The runner keeps only the tail of long output, so an earlier compile can be cut off and the one left would pass. The test prints two such compiles, lowers the capture limit so the first is cut off, and expects the truncation error with no compile run again. It fails without the check.

Testing

  • python3 -m unittest scripts.pgso.tests.test_pipeline: 60 tests pass.
  • With the check removed from scripts/pgso/pipeline.py, the new test fails with PgsoError not raised.

@fazxes fazxes added the type: maintenance Changes internal tooling, dependencies, CI, or implementation structure label Nov 16, 2026
emit_bitcode finds the compile to run again in pgso-ir's --verbose
output and requires exactly one compile that emits bitcode. The capture
keeps only the tail, so an earlier compile can be cut off and the one
left would pass that check. The guard that rejects truncated output had
no test; this one fails without it.
@fazxes
fazxes force-pushed the fazxes/pgso-truncated-output-test branch from e53be42 to cde9485 Compare November 22, 2026 20:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: maintenance Changes internal tooling, dependencies, CI, or implementation structure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant