From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id CDD523858D35 for ; Fri, 8 Mar 2024 10:15:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CDD523858D35 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 CDD523858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709892950; cv=none; b=A7UVZtnYNUd070iTx5UPGBaZrkdvfv8hH5L06BT7LhtwIJh4Z1fNKr8jDwINmwFbMYohVZ01LcuUJubF2ZUorooE3UuVW1DwoABr8QFl5DY2SgRZg1ZpMu7guapL05XN//Tj8mevrXGZP0xpmaPlUJUzvzUPYPfGxXMuH0HCy8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709892950; c=relaxed/simple; bh=pNk3LroLZRmxz8HvMlQ2/q0eQ/j6SHuS6kbRRQt2w10=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=icTMl3npbvvewW3nYrEccKK0IaQAq5AutaOgY8bZn2XPbOz0Fy0EgAJlA9DgMEhJiyR14kMGA3IXf4KuhXyOGOjaa5s9EIOhIdmIGQxOsgd3GkRQ2ILI6Mv7V/TP0UmvbHjpCMNtaSmef0Y8uq0OFsETHlGDE9wqlrl/TqvVb9k= 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-out1.suse.de (Postfix) with ESMTPS id 5526D6AE28 for ; Fri, 8 Mar 2024 09:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709890387; 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=9hz74CIhmsIVixqPX3sgNfSRedo4xjp7mv3iE/o9mQk=; b=Lm4E5LI9r3f3sZmELE2PijN54hsu+DccZqwEyrf/qCWs2TQrEjbck8SYEUP5TWPZcPMw7s 13xV2su+vZXyQ2Y5GCuh4X5O5WxRbFsbcyc5o1UfN/muMw3xE+PORTclw5351/t93V/2qb jKlkPF45seRmRFZUQxFSfvBvVYCtZ1k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709890387; 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=9hz74CIhmsIVixqPX3sgNfSRedo4xjp7mv3iE/o9mQk=; b=Rgsp4rHfc3Tk2EjWyqols4yUIaQsR2q6X1CKRtzk6nYpUGrfkB8y7l9Y7PYL0efjXr/D/+ iB88Zip15ezZPaCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709890387; 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=9hz74CIhmsIVixqPX3sgNfSRedo4xjp7mv3iE/o9mQk=; b=Lm4E5LI9r3f3sZmELE2PijN54hsu+DccZqwEyrf/qCWs2TQrEjbck8SYEUP5TWPZcPMw7s 13xV2su+vZXyQ2Y5GCuh4X5O5WxRbFsbcyc5o1UfN/muMw3xE+PORTclw5351/t93V/2qb jKlkPF45seRmRFZUQxFSfvBvVYCtZ1k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709890387; 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=9hz74CIhmsIVixqPX3sgNfSRedo4xjp7mv3iE/o9mQk=; b=Rgsp4rHfc3Tk2EjWyqols4yUIaQsR2q6X1CKRtzk6nYpUGrfkB8y7l9Y7PYL0efjXr/D/+ iB88Zip15ezZPaCQ== 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 9820B137C3 for ; Fri, 8 Mar 2024 09:33:05 +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 +D71I1Hb6mWLYAAAD6G6ig (envelope-from ) for ; Fri, 08 Mar 2024 09:33:05 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH v4 6/6] gdb/testsuite: Add kfail in gdb.threads/threadcrash.exp on 32-bit arm targets Date: Fri, 8 Mar 2024 10:33:42 +0100 Message-Id: <20240308093342.26745-7-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240308093342.26745-1-tdevries@suse.de> References: <20240308093342.26745-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: + Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Lm4E5LI9; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Rgsp4rHf X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [1.49 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_MISSING_CHARSET(2.50)[]; TO_DN_NONE(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.00)[41.44%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCPT_COUNT_ONE(0.00)[1]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: 1.49 X-Rspamd-Queue-Id: 5526D6AE28 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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: There is an issue with the test gdb.threads/threadcrash.exp on arm targets, relating to how the targets handles gcores. The issue is that GDB can't properly backtrace from a gcore. Add a kfail referring back to PR corefiles/31294, which tracks the issues with gcores in 32-bit arm targets. I cannot reproduce the problem, so this is a best effort based on the logs in the PR. Tested on arm-linux and x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31294 --- gdb/testsuite/gdb.threads/threadcrash.exp | 27 +++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp index c72ce73fd6d..7839f5c358e 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -94,14 +94,14 @@ proc thread_apply_all {} { } } - gdb_assert {$unwind_fail == false} - if { $have_sleep == -1 } { set have_sleep 0 } if { $have_pthread_kill == -1 } { set have_pthread_kill 0 } + + return [expr !$unwind_fail] } # Perform all the tests we're interested in. They are: @@ -109,16 +109,25 @@ proc thread_apply_all {} { # * Creating the list of backtraces for all threads seen # * testing if GDB recreated the full backtrace we expect for all threads -proc do_full_test {} { +proc do_full_test { phase } { global have_sleep global have_pthread_kill global test_list set thread_count [get_valueof "" "\$_inferior_thread_count" 0] gdb_assert {$thread_count == 7} - thread_apply_all - - gdb_assert {$thread_count == [llength $test_list]} + set test thread_apply_all + set res [$test] + if { $res && $thread_count == [llength $test_list] } { + pass $test + } else { + set have_kfail [expr [string equal $phase gcore] && [is_aarch32_target]] + if { $have_kfail } { + kfail $test + } else { + fail $test + } + } if { $have_sleep } { set sleep ".*sleep.*" @@ -209,7 +218,7 @@ proc_with_prefix test_live_inferior {} { gdb_breakpoint "breakpt" gdb_continue_to_breakpoint "running to breakpoint" ".*" - do_full_test + do_full_test live_inferior } # Do all preparation steps for running the corefile tests, then @@ -229,7 +238,7 @@ proc_with_prefix test_corefile {} { "A program is being debugged already\\\. Kill it\\\? \\\(y or n\\\) " \ "y" - do_full_test + do_full_test corefile } # Do all preparation steps for running the gcore tests, then @@ -267,7 +276,7 @@ proc_with_prefix test_gcore {} { "A program is being debugged already\\\. Kill it\\\? \\\(y or n\\\) " \ "y" - do_full_test + do_full_test gcore } standard_testfile -- 2.35.3