]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix gdb.base/fileio.exp for local-remote-host-native
authorTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 07:54:41 +0000 (09:54 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 07:54:41 +0000 (09:54 +0200)
commitcc91060a47aa0f8d0e4f2c73f720068162408860
tree79749940c27344be372e31b1e36626b4e8bdde21
parentc6df5d79aac5c4a77c06314fd26c837470360f70
[gdb/testsuite] Fix gdb.base/fileio.exp for local-remote-host-native

When running test-case gdb.base/fileio.exp with host/target board
local-remote-host-native I run into:
...
gdb compile failed, fileio.c: In function 'test_open':
<command-line>:0:8: error: expected expression before '.' token
fileio.c:89:15: note: in expansion of macro 'OUTDIR'
   ret = open (OUTDIR FILENAME, O_CREAT | O_TRUNC | O_RDWR, S_IWUSR | S_IRUSR);
               ^~~~~~
...

Fix this by using:
- quote_for_host to pass -DOUTDIR to the compilation, and
- STRINGIFY to stringify OUTDIR in fileio.c.

Tested on x86_64-linux, with target board unix and host/target board
local-remote-host-native.
gdb/testsuite/gdb.base/fileio.c
gdb/testsuite/gdb.base/fileio.exp