From patchwork Wed Oct 9 11:37:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98584 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 44428385E45A for ; Wed, 9 Oct 2024 11:37:44 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 89CD8385DC1E for ; Wed, 9 Oct 2024 11:37:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 89CD8385DC1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 89CD8385DC1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728473841; cv=none; b=Z+kv8gl6uNlIPD+2pQNb/PKwcm06FEUXGsRvFFWmIFWnxaihokzr480AwmUAEQxbEFrvhrOdg/ab/EQAu92WHJY4gC3Ij7iCBJDMh5RyTh5Xa0yuovhfprGRuuoSAOAvUDtLuKS8cpESqEyRnt2DpDoAo1J8OcufNwH9vVi4dv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728473841; c=relaxed/simple; bh=X4pN4DgRfDTbzZYc1zK7rrQx6oxN/HubncbEPyRBZ1s=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=NmCYrDZOyENBv1w76zqnL/OKFaQfVfoR1LIh1rDASjyZMYPuuxSo4sO8Gb0TWlfK7/UtVLlLx4gxy2tX5e1AUKcGh4zoi4onbTOstSGGfT3M9NHo5cVr5moj/4OtMRMrYlGTw/iosXnHKeZK1DEYjOkBpsg3afYeJ7JJBnDbX1c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 705E51FE92; Wed, 9 Oct 2024 11:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728473838; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=U5gZsXJ9n+tnZhQiCoD9IswjTAKyeXHTShP7oJ5c19M=; b=HtfU/MYFeDFGu78dl0jM7BshgrkuBMTBk0EEuC1x0MO8huBQrFB0QW7Y+1aHtzXo7dfrLr kuxbuNGx17C1xfZz8qls8KzYUzmDAfEuC99KX5/abrNJ7q5IqGZpKREZ/UNBkc8FbW6LJO XzB3yr0JqR5pM3mTpbkoUbpTkwBTCN0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728473838; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=U5gZsXJ9n+tnZhQiCoD9IswjTAKyeXHTShP7oJ5c19M=; b=SJxGKFVmpYFo9sFuBu7vYcOJebjrbzlKEdTJSr1vhzSbs8SgoHPSNM9rnFV7GwArfLfM7D bCCbszUQIK/KZjDA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="HtfU/MYF"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=SJxGKFVm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728473838; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=U5gZsXJ9n+tnZhQiCoD9IswjTAKyeXHTShP7oJ5c19M=; b=HtfU/MYFeDFGu78dl0jM7BshgrkuBMTBk0EEuC1x0MO8huBQrFB0QW7Y+1aHtzXo7dfrLr kuxbuNGx17C1xfZz8qls8KzYUzmDAfEuC99KX5/abrNJ7q5IqGZpKREZ/UNBkc8FbW6LJO XzB3yr0JqR5pM3mTpbkoUbpTkwBTCN0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728473838; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=U5gZsXJ9n+tnZhQiCoD9IswjTAKyeXHTShP7oJ5c19M=; b=SJxGKFVmpYFo9sFuBu7vYcOJebjrbzlKEdTJSr1vhzSbs8SgoHPSNM9rnFV7GwArfLfM7D bCCbszUQIK/KZjDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 51AE013A58; Wed, 9 Oct 2024 11:37:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EmTiEe5qBmcCCwAAD6G6ig (envelope-from ); Wed, 09 Oct 2024 11:37:18 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Keith Seitz Subject: [PATCH] [gdb/testsuite] Fix some gdb.dwarf2 test-cases for check-read1 Date: Wed, 9 Oct 2024 13:37:15 +0200 Message-Id: <20241009113715.19491-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: 705E51FE92 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org I ran the testsuite in an environment simulating a stressed system in combination with check-read1. This exposes a few more FAILs. Fix the gdb.dwarf2 ones by using pipe / grep to filter out unnecessary output. Tested on x86_64-linux. --- gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp | 3 ++- gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp | 3 ++- gdb/testsuite/gdb.dwarf2/gdb-index.exp | 8 +++++++- gdb/testsuite/gdb.dwarf2/pr13961.exp | 3 ++- gdb/testsuite/gdb.dwarf2/self-spec.exp | 4 ++-- 5 files changed, 15 insertions(+), 6 deletions(-) base-commit: 2ae9b1b2d7e5feb0fd734f91250fc5dd187767a5 diff --git a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp index 59b3db50dbb..2f41db97841 100644 --- a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp @@ -98,6 +98,7 @@ foreach_with_prefix worker_threads $worker_threads_list { gdb_load $binfile - gdb_test "maint print objfiles" "$eol$ws+qualified:$ws+ns::v$eol.*" \ + gdb_test "pipe maint print objfiles | grep ns::v" \ + "$ws+qualified:$ws+ns::v" \ "v has parent ns" } diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp index d8367b0a162..b734c309f9c 100644 --- a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp @@ -98,6 +98,7 @@ foreach_with_prefix worker_threads $worker_threads_list { gdb_load $binfile - gdb_test "maint print objfiles" "$eol$ws+qualified:$ws+ns::v$eol.*" \ + gdb_test "pipe maint print objfiles | grep ns::v" \ + "$ws+qualified:$ws+ns::v" \ "v has parent ns" } diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-index.exp index 4e442278f9b..23d60da6a53 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp @@ -95,7 +95,13 @@ proc local_add_gdb_index { program } { # building an index from a program already using one. set test "check if index present" -gdb_test_multiple "mt print objfiles ${testfile}" $test { +set filter "gdb_index|debug_names|Psymtabs|Cooked" +set cmd "pipe mt print objfiles ${testfile} | grep -E \"$filter\"" +set cmd_re [string_to_regexp $cmd] +gdb_test_multiple $cmd $test { + -re ^$cmd_re { + exp_continue + } -re "gdb_index.*${gdb_prompt} $" { set binfile_with_index $binfile set host_binfile_with_index [gdb_remote_download host $binfile] diff --git a/gdb/testsuite/gdb.dwarf2/pr13961.exp b/gdb/testsuite/gdb.dwarf2/pr13961.exp index a306c45a125..e4ea9d0f8c0 100644 --- a/gdb/testsuite/gdb.dwarf2/pr13961.exp +++ b/gdb/testsuite/gdb.dwarf2/pr13961.exp @@ -36,7 +36,8 @@ gdb_test "break -q main" "Breakpoint.*at.*" pass $testfile # Regression test for PR symtab/30739. -gdb_test_multiple "maint print objfiles $binfile" "no foo::foo" { +set cmd "pipe maint print objfiles $binfile | grep foo::foo" +gdb_test_multiple $cmd "no foo::foo" { -re -wrap "\r\n *qualified: *foo::foo\r\n.*" { fail $gdb_test_name } diff --git a/gdb/testsuite/gdb.dwarf2/self-spec.exp b/gdb/testsuite/gdb.dwarf2/self-spec.exp index 2e8fe6b3933..9bb4064874f 100644 --- a/gdb/testsuite/gdb.dwarf2/self-spec.exp +++ b/gdb/testsuite/gdb.dwarf2/self-spec.exp @@ -59,8 +59,8 @@ require {string eq $index ""} require !readnow -gdb_test "maint print objfiles $testfile" \ - "\r\n *qualified: *c1\r\n.*" \ +gdb_test "pipe maint print objfiles $testfile | grep c1" \ + " *qualified: *c1" \ "class c1 in cooked index" gdb_test "maint expand-symtabs"