binutils Newspaper
OCTOBER 6, 2026
gas — Proposed

gas: testsuite: Fix gas/all/pr27381 test case on Windows/MSYS2.

Fixes a gas test case for the .incbin directive to correctly handle error messages on Windows.

This patch adjusts the error message regular expression and the target directory in a gas test case (pr27381) to ensure it passes on Windows/MSYS2. The change accounts for differing behavior in fopen() between POSIX systems and Windows when attempting to include a directory with the .incbin directive, harmonizing the expected error output.

In the Thread 1 participant
  1. Jan Dubiec proposer

    Fixes the `gas/all/pr27381` test case by updating the expected error message regex and the directory used with the `.incbin` directive to accommodate Windows/MSYS2 behavior.

In Details

This patch modifies a test case in gas/testsuite/gas/all/pr27381 to ensure consistent behavior across different operating systems. The .incbin directive's handling of directories differs between POSIX and Windows due to fopen() behavior, resulting in distinct error messages. This change harmonizes the test's expected output on Windows/MSYS2.

For Context
gas
The GNU Assembler, which translates assembly language code into machine code.
.incbin
An assembler directive used to include the raw binary contents of a file into the assembled output.
testsuite
A collection of tests designed to verify the correctness of a software component.
MSYS2
A software distribution and building platform for Windows, providing a POSIX-like command-line environment.
fopen()
A C standard library function used to open a file stream. Its behavior can differ slightly between operating systems, especially regarding permissions for directories.
Filed Under: binutilsgastestsuitewindowscross-platform