Skip to content

suite: add a cstool output layout test - #3156

Closed
Bittu5134 wants to merge 1 commit into
capstone-engine:nextfrom
Bittu5134:cstool-output-layout-test
Closed

Bittu5134 wants to merge 1 commit into
capstone-engine:nextfrom
Bittu5134:cstool-output-layout-test

Conversation

@Bittu5134

Copy link
Copy Markdown

PLACEHOLDER - NOT A PR DESCRIPTION.

capstone forbids AI-written PR descriptions and commit messages (CONTRIBUTING.md,
AGENTS.md). Replace this field and the commit message with your own text before
publishing.

Reference notes for the owner:

Where: new file suite/run_cstool_output.sh plus one CI step in
.github/workflows/CITest.yml. Addresses issue #2740.

What it does: runs cstool four times and compares stdout byte for byte against
the expected text, so the offset column, the byte column, the mnemonic/operand
tab and the widened address column cannot drift without CI noticing. Failures
print a unified diff.

Coverage: multi instruction stream (x64), a shorter stream with a different
bytes width (aarch64), a start address widening the offset column (x64), and
thumb mode (arm).

CI step is guarded with if: matrix.config.diet-build == 'OFF', because diet
builds drop the detail this layout depends on.

Tested: script exits 0 on a full build; editing one expected line makes it exit
1 and print the diff. CITest.yml parses as YAML.

Adds suite/run_cstool_output.sh, which compares cstool output byte for byte
against the expected columns and spacing, and runs it in CI. Closes capstone-engine#2740.
@github-actions github-actions Bot added the Github-files Github related files label Nov 8, 2026
@Rot127 Rot127 closed this Nov 8, 2026
@Rot127

Rot127 commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Obviously ignores our guidelines.

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

Labels

Github-files Github related files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants