From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +oDRNaB25WB9WgAAWB0awg (envelope-from ) for ; Wed, 07 Jul 2021 05:40:48 -0400 Received: by simark.ca (Postfix, from userid 112) id CDD741F1F2; Wed, 7 Jul 2021 05:40:48 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,RDNS_DYNAMIC,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 958E81F1EE for ; Wed, 7 Jul 2021 05:40:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D95BE3861004 for ; Wed, 7 Jul 2021 09:40:46 +0000 (GMT) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 99D493857823 for ; Wed, 7 Jul 2021 09:40:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 99D493857823 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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-out1.suse.de (Postfix) with ESMTPS id CCF0F2260C; Wed, 7 Jul 2021 09:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625650834; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=b6FYIUF+wiXV9cTNPxBq0R+i/yO0fN3GlhMkx2U6nME=; b=JYU+a2h9G/j0YxhWX7EuZtAU2lO0IgxD1a3wtHxeODOcwjthK8NRJ/S0zYin1FM9Zm/cm/ r4esOpy1asj/iuSaf9sfRzT9KxFTgBiegPjyuMakGlTe+JtVcySq9mSih6bT+IiB0UNCJf lQushCzQ6oCwTAQtNttWXxNpHjsBmCE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625650834; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=b6FYIUF+wiXV9cTNPxBq0R+i/yO0fN3GlhMkx2U6nME=; b=dlMxG0ha1gFkxC1k3245peM87XxtssUKngBZP5BpwJqDSTFUdN0dWzrS/SLmIkNeJQCBEI GsdVoKPkM9Y4G7Aw== 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 B1BBB13AB9; Wed, 7 Jul 2021 09:40:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KVpaKpJ25WCcUgAAMHmgww (envelope-from ); Wed, 07 Jul 2021 09:40:34 +0000 Date: Wed, 7 Jul 2021 11:40:33 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Fix gdb.guile/scm-breakpoint.exp with guile 3.0 Message-ID: <20210707094013.GA18240@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: , Cc: Ludovic =?iso-8859-1?Q?Court=E8s?= Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.guile/scm-breakpoint.exp on openSUSE Tumbleweed with guile 3.0, I run into: ... (gdb) guile (define cp (make-breakpoint "syscall" #:type BP_CATCHPOINT))^M ERROR: In procedure make-breakpoint:^M In procedure gdbscm_make_breakpoint: unsupported breakpoint type in \ position 3: "BP_CATCHPOINT"^M Error while executing Scheme code.^M (gdb) FAIL: gdb.guile/scm-breakpoint.exp: test_catchpoints: \ create a catchpoint via the api ... The same test passes on openSUSE Leap 15.2 with guile 2.0, where the second line of the error message starts with the same prefix as the first: ... ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in \ position 3: "BP_CATCHPOINT"^M ... I observe the same difference in many other tests, f.i.: ... (gdb) gu (print (value-add i '()))^M ERROR: In procedure value-add:^M In procedure gdbscm_value_add: Wrong type argument in position 2: ()^M Error while executing Scheme code.^M (gdb) PASS: gdb.guile/scm-math.exp: catch error in guile type conversion ... but it doesn't cause FAILs anywhere else. Fix this by updating the regexp to make the "ERROR: " prefix optional. Tested on x86_64-linux, with both guile 2.0 and 3.0. Any comments? Thanks, - Tom [gdb/testsuite] Fix gdb.guile/scm-breakpoint.exp with guile 3.0 gdb/testsuite/ChangeLog: 2021-07-07 Tom de Vries * gdb.guile/scm-breakpoint.exp: Make additional "ERROR: " prefix in exception printing optional. --- gdb/testsuite/gdb.guile/scm-breakpoint.exp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp index c603af76a33..be898cacaa7 100644 --- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp +++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp @@ -260,10 +260,10 @@ proc_with_prefix test_watchpoints { } { "test watchpoint write" gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type 999))" \ - "ERROR: In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 5: 999\r\n.*" \ + "(ERROR: )?In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 5: 999\r\n.*" \ "create a breakpoint with an invalid type number" gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type BP_NONE))" \ - "ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 5: \"BP_NONE\"\r\n.*" \ + "(ERROR: )?In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 5: \"BP_NONE\"\r\n.*" \ "create a breakpoint with an unsupported type" } @@ -533,7 +533,7 @@ proc_with_prefix test_catchpoints {} { # Try to create a catchpoint, currently this isn't supported via # the guile api. gdb_test "guile (define cp (make-breakpoint \"syscall\" #:type BP_CATCHPOINT))" \ - "ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 3: \"BP_CATCHPOINT\"\r\n.*" \ + "(ERROR: )?In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 3: \"BP_CATCHPOINT\"\r\n.*" \ "create a catchpoint via the api" # Setup a catchpoint.