[gdb/testsuite] Fix gdb.base/early-init-file.exp with -fsanitize=thread
authorTom de Vries <tdevries@suse.de>
Sat, 2 Jul 2022 09:50:03 +0000 (11:50 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 2 Jul 2022 09:50:03 +0000 (11:50 +0200)
commit47226049bb7cdbc93543db13e6305c0091f4f642
tree1cbf1c69ac093898ba7cece4c1c68e56bb5afc30
parentf15f0ddd10ed6d7c5bc08b3364abef4bd4c8a0f1
[gdb/testsuite] Fix gdb.base/early-init-file.exp with -fsanitize=thread

When building gdb with -fsanitize=thread, I run into:
...
FAIL: gdb.base/early-init-file.exp: check startup version string has style \
  version
...
due to this:
...
warning: Found custom handler for signal 7 (Bus error) preinstalled.^M
warning: Found custom handler for signal 8 (Floating point exception) \
  preinstalled.^M
warning: Found custom handler for signal 11 (Segmentation fault) \
  preinstalled.^M
Some signal dispositions inherited from the environment (SIG_DFL/SIG_IGN)^M
won't be propagated to spawned programs.^M
...
appearing before the "GNU gdb (GDB) $version" line.

This is similar to the problem fixed by commit f0bbba7886f
("gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with
AddressSanitizer").

In that commit, the problem was fixed by starting gdb with -quiet, but using
that would mean the "GNU gdb (GDB) $version" line that we're trying to check
would disappear.

Fix this instead by updating the regexp to allow the message.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/early-init-file.exp