From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.base/catch-syscall.exp with --with-expat=no
Date: Wed, 11 May 2022 15:48:08 +0200 [thread overview]
Message-ID: <20220511134806.GA10361@delia> (raw)
Hi,
When doing a gdb build with --with-expat=no, I run into:
...
(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
continue to breakpoint: before pipe call
catch syscall pipe^M
Unknown syscall name 'pipe'.^M
(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
catch syscall pipe
catch syscall pipe2^M
Unknown syscall name 'pipe2'.^M
(gdb) PASS: gdb.base/catch-syscall.exp: determine pipe syscall: \
catch syscall pipe2
continue^M
Continuing.^M
[Detaching after vfork from child process 18538]^M
[Inferior 1 (process 18537) exited normally]^M
(gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: continue
...
This is a regression since recent commit 5463a15c18b ("[gdb/testsuite] Handle
pipe2 syscall in gdb.base/catch-syscall.exp").
Fix this by using pipe/pipe2 syscall numbers instead.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix gdb.base/catch-syscall.exp with --with-expat=no
---
gdb/testsuite/gdb.base/catch-syscall.exp | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
index 1260a64270f..d8b6898b3e0 100644
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
@@ -705,10 +705,12 @@ proc setup_all_syscalls {} {
# SYS_pipe doesn't exist on aarch64 kernel.
set test "check SYS_pipe"
set have_SYS_pipe 0
+ set SYS_pipe -1
gdb_test_multiple "p pipe_syscall" $test {
- -re -wrap " = $decimal" {
+ -re -wrap " = ($decimal)" {
pass $test
set have_SYS_pipe 1
+ set SYS_pipe $expect_out(1,string)
}
-re -wrap "No symbol .*" {
pass $test
@@ -717,10 +719,12 @@ proc setup_all_syscalls {} {
set test "check SYS_pipe2"
set have_SYS_pipe2 0
+ set SYS_pipe2 -1
gdb_test_multiple "p pipe2_syscall" $test {
- -re -wrap " = $decimal" {
+ -re -wrap " = ($decimal)" {
pass $test
set have_SYS_pipe2 1
+ set SYS_pipe2 $expect_out(1,string)
}
-re -wrap "No symbol .*" {
pass $test
@@ -736,19 +740,19 @@ proc setup_all_syscalls {} {
gdb_test "break $line"
gdb_continue_to_breakpoint "before pipe call"
if { $have_SYS_pipe } {
- gdb_test "catch syscall pipe"
+ gdb_test "catch syscall $SYS_pipe"
}
if { $have_SYS_pipe2 } {
- gdb_test "catch syscall pipe2"
+ gdb_test "catch syscall $SYS_pipe2"
}
set ok 0
gdb_test_multiple "continue" "" {
- -re -wrap "Catchpoint $decimal \\(call to syscall pipe\\).*" {
+ -re -wrap "Catchpoint $decimal \\(call to syscall (pipe|$SYS_pipe)\\).*" {
lappend all_syscalls pipe
pass $gdb_test_name
set ok 1
}
- -re -wrap "Catchpoint $decimal \\(call to syscall pipe2\\).*" {
+ -re -wrap "Catchpoint $decimal \\(call to syscall (pipe2|$SYS_pipe)\\).*" {
lappend all_syscalls pipe2
pass $gdb_test_name
set ok 1
reply other threads:[~2022-05-11 13:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220511134806.GA10361@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).