From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id J1BFE7G+e2IGpwUAWB0awg (envelope-from ) for ; Wed, 11 May 2022 09:48:33 -0400 Received: by simark.ca (Postfix, from userid 112) id 3FF811E220; Wed, 11 May 2022 09:48:33 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=qPZLv+RR; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0AD2C1E01D for ; Wed, 11 May 2022 09:48:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54A213839C4E for ; Wed, 11 May 2022 13:48:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54A213839C4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652276911; bh=28MwX5EiftyTtbu9RzEwOVkEFCWDYxWA1fRt+SoNQdU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=qPZLv+RRqPPaka+OQoocXep3i4olfYE1F9Ag18ujJniSQumQTLa/3OIPkGA6sMBvg jxPKCqHcPfj3hhDVLu1PMzv4hE4jok6bLpJWiMm/QXHkpvrfdooAKDwqTj0D28GJGY OQv258tjZhfWabVlLEx2TG3OD4exIaitQCf4NvCE= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 10C5338438A2 for ; Wed, 11 May 2022 13:48:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 10C5338438A2 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 26CCA1F381 for ; Wed, 11 May 2022 13:48:10 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0857913A76 for ; Wed, 11 May 2022 13:48:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mu3jAJq+e2JGDgAAMHmgww (envelope-from ) for ; Wed, 11 May 2022 13:48:10 +0000 Date: Wed, 11 May 2022 15:48:08 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.base/catch-syscall.exp with --with-expat=no Message-ID: <20220511134806.GA10361@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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