Bug 29056

Summary: FAIL: gdb.base/catch-syscall.exp: without arguments: syscall pipe has returned
Product: gdb Reporter: Tom de Vries <vries>
Component: gdbAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: HEAD   
Target Milestone: 13.1   
Host: Target:
Build: Last reconfirmed:

Description Tom de Vries 2022-04-13 05:50:44 UTC
On openSUSE Tumbleweed, there's a cluster of FAILs related to pipe system call in this test-case:
...
FAIL: gdb.base/catch-syscall.exp: without arguments: syscall pipe has returned
FAIL: gdb.base/catch-syscall.exp: with many arguments: program has called pipe
FAIL: gdb.base/catch-syscall.exp: with many arguments: syscall pipe has returned
FAIL: gdb.base/catch-syscall.exp: with many arguments: program has called write
FAIL: gdb.base/catch-syscall.exp: with many arguments: syscall write has returned
FAIL: gdb.base/catch-syscall.exp: with many arguments: program has called read (the program exited)
FAIL: gdb.base/catch-syscall.exp: with many arguments: syscall read has returned (the program is no longer running)
FAIL: gdb.base/catch-syscall.exp: with many arguments: continue until exit (the program is no longer running)
FAIL: gdb.base/catch-syscall.exp: without args noxml: pipe: program has called 22
FAIL: gdb.base/catch-syscall.exp: without args noxml: pipe: syscall 22 has returned
FAIL: gdb.base/catch-syscall.exp: with args noxml: program has called 22
FAIL: gdb.base/catch-syscall.exp: with args noxml: syscall 22 has returned
FAIL: gdb.base/catch-syscall.exp: with args noxml: program has called 1
FAIL: gdb.base/catch-syscall.exp: with args noxml: syscall 1 has returned
FAIL: gdb.base/catch-syscall.exp: with args noxml: program has called 0 (the program exited)
FAIL: gdb.base/catch-syscall.exp: with args noxml: syscall 0 has returned (the program is no longer running)
...

And these look related:
...
FAIL: gdb.reverse/pipe-reverse.exp: continue to breakpoint: marker2
FAIL: gdb.reverse/readv-reverse.exp: continue to breakpoint: marker2
...

First in more detail:
...
(gdb) PASS: gdb.base/catch-syscall.exp: without arguments: program has called pipe
continue^M
Continuing.^M
^M
Catchpoint 2 (returned from syscall pipe2), 0x00007ffff7daabdd in pipe () from /lib64/libc.so.6^M
(gdb) FAIL: gdb.base/catch-syscall.exp: without arguments: syscall pipe has returned
...
Comment 1 Tom de Vries 2022-05-03 15:00:16 UTC
- [PATCH][gdb/tdep] Handle pipe2 syscall for amd64
  https://sourceware.org/pipermail/gdb-patches/2022-May/188661.html
- [PATCH][gdb/testsuite] Handle pipe2 syscall in gdb.base/catch-syscall.exp
  https://sourceware.org/pipermail/gdb-patches/2022-May/188662.html
Comment 2 Tom de Vries 2022-05-09 10:46:41 UTC
Fixed by:
- [gdb/tdep] Handle pipe2 syscall for amd64
- [gdb/testsuite] Handle pipe2 syscall in gdb.base/catch-syscall.exp
- [gdb/tdep] Support catch syscall pipe2 for i386