From patchwork Wed Apr 24 13:36:21 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: 88956 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 DE09E3846400 for ; Wed, 24 Apr 2024 13:36:53 +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 [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id BEE7B3849AED for ; Wed, 24 Apr 2024 13:36:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEE7B3849AED 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 BEE7B3849AED Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713965789; cv=none; b=kcI+LngRe04/oFZcqjuxj6EHw++EGPInPAkLh0jWkwQw+oFyuNnSCUg2oJcIPoLN/ndL7rJf1CCn9ZSRulVcp1w6sJw48Jhgfsg2h6oJ+Qd9iGJZoL+K1K06wLerhWsouV5t1/couQ9tRlCo3rU2ZmifJyRjWfQ2nszeoKgGdwc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713965789; c=relaxed/simple; bh=3DqyPddwiScLf8eOJxpZ+3+1OmK9vQ9pQIgduBIdb10=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=uCF6nVyfP/4rCtQ2s0cgEtTPHgyh8DdxfZ4gIfpPay6KBVKIM4Y/l9gjuC9JxQlnL751EpodVB187LKmL9/+SXAqNQ2IZxjXPeYuZoaZ6d0XkiVvX0VOulwydZFxzECVLX9YRF0nGCxdFfTOi2/ws4j2ENHPq9sUWMvB5GMDzlQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 DC1CC66E4A for ; Wed, 24 Apr 2024 13:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1713965777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NNMN6voGpnVd0keJIZtiSA1Ti3gubWi4OBpZrAw2Hsg=; b=oLWRBxHHzK85BhVcZp3l4iKGaKUl/5DCXST/INLrX6l0c/fg8/AzzwrbSXTTem1oxBX7Tz PALYuebNCjZMhiwJZShC+ubsxsNiNoyLbq8BScwyTb2mhJTmgdgVZswanbawrlWqmOYKQ5 9PbA5QrmOtu68hGUc2itvY+vRM12gg4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1713965777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NNMN6voGpnVd0keJIZtiSA1Ti3gubWi4OBpZrAw2Hsg=; b=oUDOSAv2GLoBeyYYjBM0PWi/llGpPsDP6gdNTzthNaffPMbiwTijUcb88Jp9O8T+Gr7jJ+ IoALocW/x3KXOcDg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1713965777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NNMN6voGpnVd0keJIZtiSA1Ti3gubWi4OBpZrAw2Hsg=; b=oLWRBxHHzK85BhVcZp3l4iKGaKUl/5DCXST/INLrX6l0c/fg8/AzzwrbSXTTem1oxBX7Tz PALYuebNCjZMhiwJZShC+ubsxsNiNoyLbq8BScwyTb2mhJTmgdgVZswanbawrlWqmOYKQ5 9PbA5QrmOtu68hGUc2itvY+vRM12gg4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1713965777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NNMN6voGpnVd0keJIZtiSA1Ti3gubWi4OBpZrAw2Hsg=; b=oUDOSAv2GLoBeyYYjBM0PWi/llGpPsDP6gdNTzthNaffPMbiwTijUcb88Jp9O8T+Gr7jJ+ IoALocW/x3KXOcDg== 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 CD0D613690 for ; Wed, 24 Apr 2024 13:36:17 +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 QdUpMdEKKWYcBQAAD6G6ig (envelope-from ) for ; Wed, 24 Apr 2024 13:36:17 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 1/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp with glibc debuginfo Date: Wed, 24 Apr 2024 15:36:21 +0200 Message-Id: <20240424133622.4639-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-1.25 / 50.00]; BAYES_HAM(-1.45)[91.31%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -1.25 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 After installing glibc debuginfo, I ran into: ... FAIL: gdb.threads/threadcrash.exp: test_live_inferior: \ $thread_count == [llength $test_list] ... This happens because the clause: ... -re "^\r\n${hs}main$hs$eol" { ... which is intended to match only: ... #1 in main () at threadcrash.c:423^M ... also matches "remaining" in: ... #1 in __GI___nanosleep (requested_time=, remaining=) at \ nanosleep.c:27^M ... Fix this by checking for "in main" instead. Tested on x86_64-linux. --- gdb/testsuite/gdb.threads/threadcrash.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 3b3e2090118966e3b885ae578440e380dc90e648 diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp index c72ce73fd6d..ffbfd83942c 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -74,7 +74,7 @@ proc thread_apply_all {} { lappend test_list 6 exp_continue } - -re "^\r\n${hs}main$hs$eol" { + -re "^\r\n${hs}in main$hs$eol" { lappend test_list 7 exp_continue } From patchwork Wed Apr 24 13:36:22 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: 88957 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 0E498384642B for ; Wed, 24 Apr 2024 13:36:54 +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 0CED23849AE5 for ; Wed, 24 Apr 2024 13:36:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CED23849AE5 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 0CED23849AE5 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=1713965789; cv=none; b=UoJyXJqtsFHNrABNTAkhwr6zugNqz3vYdGqfaIqsVMYMZADvqlbzmOu0UchJ4v9TJAHW1EYGW4CEFh0AXUKeG8OVPRlB5QjUd+H9aAj54h6gT6H0uJSb6uRAdSdvUvvGRBuQ/+wM8hNQaMlxCbKzTQOUs2QyPCQ73xCpVhlbM+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713965789; c=relaxed/simple; bh=k9dZ9s7H3cWWW18ZKr18efeCwRwuayEWv0LzT59O5Hg=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=bQw1vAy0K6r3y1O6l+XQRJqK3qc/mNsXvZE4gaxOYnO1ll9uDF1NyS4Wr99393dRtp3YFLcm/9buzJ+culJUXCxl6OgqYFRpqavI4A8OLKLuGpVtrUp7FgOID6nLQ3MZG4W2ggap9PtdI4Hc9Sh/6pHiR1sZRxmDHIXLcMIZTeU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 0F50D66E4B for ; Wed, 24 Apr 2024 13:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1713965778; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XvSadGW1s7giOGN+ASG8NLLrb7nnrPLKF4P2ZjUWrhY=; b=Vevrm4uEIBTyrBAEL8AMnwBQYnHQw8dy25NvOcosf62Rj3UM+dwLgFKlucWrY2r54HDHaa hW2IyG7PSIgCiFBK42ldBck986gKLyZLXu1VqFGOF/22Gp3uZjjy+n4KiTpmoXBU+85o8I 8+4aGHYb05sL24HJnCAazSTB/QZ2Z+w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1713965778; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XvSadGW1s7giOGN+ASG8NLLrb7nnrPLKF4P2ZjUWrhY=; b=eoloRTO/d56Re+v+AA/HHxt14keSxP3sppxcscqe6IIUybxcF3gEdI2XP+rrc3chltiJyr IBADurg4phe6LSBw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1713965778; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XvSadGW1s7giOGN+ASG8NLLrb7nnrPLKF4P2ZjUWrhY=; b=Vevrm4uEIBTyrBAEL8AMnwBQYnHQw8dy25NvOcosf62Rj3UM+dwLgFKlucWrY2r54HDHaa hW2IyG7PSIgCiFBK42ldBck986gKLyZLXu1VqFGOF/22Gp3uZjjy+n4KiTpmoXBU+85o8I 8+4aGHYb05sL24HJnCAazSTB/QZ2Z+w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1713965778; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XvSadGW1s7giOGN+ASG8NLLrb7nnrPLKF4P2ZjUWrhY=; b=eoloRTO/d56Re+v+AA/HHxt14keSxP3sppxcscqe6IIUybxcF3gEdI2XP+rrc3chltiJyr IBADurg4phe6LSBw== 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 E076C13941 for ; Wed, 24 Apr 2024 13:36:17 +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 IOqcNdEKKWYcBQAAD6G6ig (envelope-from ) for ; Wed, 24 Apr 2024 13:36:17 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 2/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp for remote host Date: Wed, 24 Apr 2024 15:36:22 +0200 Message-Id: <20240424133622.4639-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240424133622.4639-1-tdevries@suse.de> References: <20240424133622.4639-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Score: -0.14 X-Spam-Level: X-Spamd-Result: default: False [-0.14 / 50.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; BAYES_HAM(-0.34)[76.24%]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 With test-case gdb.threads/threadcrash.exp using host board local-remote-host and target board remote-gdbserver-on-localhost I run into: ... (gdb) PASS: gdb.threads/threadcrash.exp: test_gcore: continue to crash gcore $outputs/gdb.threads/threadcrash/threadcrash.gcore^M Failed to open '$outputs/gdb.threads/threadcrash/threadcrash.gcore' for output.^M (gdb) FAIL: gdb.threads/threadcrash.exp: test_gcore: saving gcore UNSUPPORTED: gdb.threads/threadcrash.exp: test_gcore: couldn't generate gcore file ... The problem is that the gcore command tries to save a file on a remote host, but the filename is a location on build. Fix this by using host_standard_output_file. Tested on x86_64-linux. --- gdb/testsuite/gdb.threads/threadcrash.exp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp index ffbfd83942c..6da70736983 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -251,17 +251,15 @@ proc_with_prefix test_gcore {} { } gdb_test "continue" ".*Segmentation fault.*" "continue to crash" - set gcore_name "${::binfile}.gcore" - set gcore_supported [gdb_gcore_cmd "$gcore_name" "saving gcore"] + set gcore_host [host_standard_output_file $::testfile.gcore] + set gcore_supported [gdb_gcore_cmd "$gcore_host" "saving gcore"] if {!$gcore_supported} { unsupported "couldn't generate gcore file" return } - set corefile [gdb_remote_download host $gcore_name] - - gdb_test "core-file $corefile" \ + gdb_test "core-file $gcore_host" \ "" \ "loading_corefile" \ "A program is being debugged already\\\. Kill it\\\? \\\(y or n\\\) " \