[gdb/testsuite] Add missing wait in gdb.base/signals-state-child.exp
authorTom de Vries <tdevries@suse.de>
Thu, 18 Nov 2021 14:52:07 +0000 (15:52 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 18 Nov 2021 14:52:07 +0000 (15:52 +0100)
commita0cfd0ca0ea26f157957c42b359b750c6f53d4bf
tree7aab70760b1d2b67fb3e5d67df9ae013a66d2e4b
parent7a53275579e7cec9389ccb924f5ecf69e8d89d41
[gdb/testsuite] Add missing wait in gdb.base/signals-state-child.exp

On OBS I ran into:
...
(gdb) shell diff -s outputs/gdb.base/signals-state-child/standalone.txt \
  outputs/gdb.base/signals-state-child/gdb.txt^M
diff: outputs/gdb.base/signals-state-child/standalone.txt: \
  No such file or directory^M
(gdb) FAIL: gdb.base/signals-state-child.exp: signals states are identical
...

I managed to reproduce this by adding "sleep (5)" at the start of main in
signals-state-child.c.

Fix this by waiting on the result of the spawned command.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/signals-state-child.exp