Skip to content

Makefile: grep for 'FAIL' should use -I to ignore binary files.#519

Merged
katef merged 1 commit intomainfrom
sv/grep-test-ignore-binary-files
Feb 9, 2026
Merged

Makefile: grep for 'FAIL' should use -I to ignore binary files.#519
katef merged 1 commit intomainfrom
sv/grep-test-ignore-binary-files

Conversation

@silentbicycle
Copy link
Collaborator

I ran into a test failure:

grep FAIL build/tests/*/*res*; [ $? -ne 0 ]
grep: build/tests/eager_output/run_mixed_start_anchor_regression: binary file matches
*** Error code 1

because tests/eager_output/eager_output_mixed_start_anchor_regression.c contains the substring "res" in "regression", and the binary file contains "FAIL:

$ strings build/tests/eager_output/run_mixed_start_anchor_regression | grep FAIL
VM_END_FAIL
VM_FAIL

This shouldn't matter for testing purposes, the 'test' target only cares about the test result files containing "PASS" or "FAIL". The change in cb42d58 to allow prefixed result files (e.g. "dyn-fdgetc-getc-res0") made this check ANY files with "res" in the name, but grep should ignore binary files.

I ran into a test failure:

    grep FAIL build/tests/*/*res*; [ $? -ne 0 ]
    grep: build/tests/eager_output/run_mixed_start_anchor_regression: binary file matches
    *** Error code 1

because tests/eager_output/eager_output_mixed_start_anchor_regression.c
contains the substring "res" in "regression", and the binary file
contains "FAIL:

    $ strings build/tests/eager_output/run_mixed_start_anchor_regression | grep FAIL
    VM_END_FAIL
    VM_FAIL

This shouldn't matter for testing purposes, the 'test' target only cares
about the test result files containing "PASS" or "FAIL". The change in
cb42d58 to allow prefixed result files (e.g. "dyn-fdgetc-getc-res0")
made this check ANY files with "res" in the name, but grep should ignore
binary files.
Copy link
Owner

@katef katef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💛 🩶 💜 🖤

@katef katef merged commit 97cdb4e into main Feb 9, 2026
346 checks passed
@katef katef deleted the sv/grep-test-ignore-binary-files branch February 9, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments