From patchwork Thu Mar 20 15:40:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 108621 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 BEFE7385840D for ; Thu, 20 Mar 2025 15:42:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEFE7385840D Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Svh4stAr; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=rRlXwUki; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Svh4stAr; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=rRlXwUki X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id A572D3857C6E for ; Thu, 20 Mar 2025 15:39:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A572D3857C6E 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 A572D3857C6E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742485197; cv=none; b=WHJeDB/iB0EIea4A9FWKfuyHolF1pqWqZQZT5pxQ7oXWg7p2iKstMWDY/cZYaCBvVLcXjkGwfzwsVK0QVTaF0BnjKObDYSYZdGZ8B+LPbnMmihHB7kgSUrB4lVnvcVwwzm2SnLPqO7vnxB9yQx+G3VlAvK49ibAY5HHnHByo50o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742485197; c=relaxed/simple; bh=Hxakbs0DCI2rVAaXeYqlKERctlsgCj7TvGr+Lmg7GJw=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=tR+MzP5f+XWraXHD7i52OdZ76MLW/wWErdBp//idvI/3Anj38NB3ixPV+daNCVyFZY4hf2L1DCdp5vvOAUiIjPai4vngWS3RvM9rJfR90DUFQYgHPY4f46NPvbJC0F8d5C3JVYNS/AW5E7AxjwE8C7faEaysIBcb9Wj/JgUK/SQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A572D3857C6E Received: from imap1.dmz-prg2.suse.org (unknown [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 9AB5221DD3 for ; Thu, 20 Mar 2025 15:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1742485196; 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=HmqXjEikOkBHM26fIDHrSM1GvXJ8Q96TQUHNhntHBgk=; b=Svh4stAr5jGiGROYgJfQsKFZcRf5vAJ5QPES3NolbvNeIFyyEcCd62SLyTPdzaHPL3jT/l HeNP6J1YRZXC4xpdDcFMQKlQYabSaXOp+NHYd5FvqZLpdZTh//Xsn5e6f7SDJPlKZLhnUy 9LcCD7oUKKYKd8HJWkaDIyACHhyFD4w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1742485196; 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=HmqXjEikOkBHM26fIDHrSM1GvXJ8Q96TQUHNhntHBgk=; b=rRlXwUkiqkMgCi8PzgYBZuaBcaw0JpTFuAyyL69usl8i7JxAutbBO0O3g8i4arQEg0aM8l Xe1QQBv5LD0E0nBA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1742485196; 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=HmqXjEikOkBHM26fIDHrSM1GvXJ8Q96TQUHNhntHBgk=; b=Svh4stAr5jGiGROYgJfQsKFZcRf5vAJ5QPES3NolbvNeIFyyEcCd62SLyTPdzaHPL3jT/l HeNP6J1YRZXC4xpdDcFMQKlQYabSaXOp+NHYd5FvqZLpdZTh//Xsn5e6f7SDJPlKZLhnUy 9LcCD7oUKKYKd8HJWkaDIyACHhyFD4w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1742485196; 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=HmqXjEikOkBHM26fIDHrSM1GvXJ8Q96TQUHNhntHBgk=; b=rRlXwUkiqkMgCi8PzgYBZuaBcaw0JpTFuAyyL69usl8i7JxAutbBO0O3g8i4arQEg0aM8l Xe1QQBv5LD0E0nBA== 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 84D0213757 for ; Thu, 20 Mar 2025 15:39:56 +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 Kfe8Hsw23GeidwAAD6G6ig (envelope-from ) for ; Thu, 20 Mar 2025 15:39:56 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/testsuite] Allow thread exited message in gdb.threads/infcall-from-bp-cond-simple.exp Date: Thu, 20 Mar 2025 16:40:13 +0100 Message-ID: <20250320154013.16613-1-tdevries@suse.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; 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]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Status: No, score=-12.4 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 a gdb 15.2 based package and test-case gdb.threads/infcall-from-bp-cond-simple.exp, I ran into: ... Thread 2 "infcall-from-bp" hit Breakpoint 3, function_with_breakpoint () at \ infcall-from-bp-cond-simple.c:51 51 return 1; /* Nested breakpoint. */ Error in testing condition for breakpoint 2: The program being debugged stopped while in a function called from GDB. Evaluation of the expression containing the function (function_with_breakpoint) will be abandoned. When the function is done executing, GDB will silently stop. [Thread 0x7ffff73fe6c0 (LWP 951822) exited] (gdb) FAIL: $exp: target_async=on: target_non_stop=on: \ run_bp_cond_hits_breakpoint: continue ... The test fails because it doesn't expect the "[Thread ... exited]" message. I have tried to reproduce this test failure, both using 15.2 and current trunk, but haven't managed. Regardless, I think the message is harmless, so allow it to occur, both in run_bp_cond_segfaults and run_bp_cond_hits_breakpoint. Tested on x86_64-linux. PR testsuite/32785 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32785 --- gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) base-commit: d8a250dc5c0f5b34384c69dda79b2099106c72af diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp index feec37bd298..aa12a906e7a 100644 --- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp +++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp @@ -141,6 +141,8 @@ proc_with_prefix run_kill_and_restart_test { target_async target_non_stop } { gdb_start_cmd } +set re_thread_exited {\[Thread [^\r\n]+ exited\]} + # Create a conditional breakpoint which includes a call to a function that # segfaults. Run GDB and check what happens when the inferior segfaults # during the inferior call. @@ -176,7 +178,8 @@ proc_with_prefix run_bp_cond_segfaults { target_async target_non_stop } { "To change this behavior use \"set unwind-on-signal on\"\\." \ "Evaluation of the expression containing the function" \ "\\(function_that_segfaults\\) will be abandoned\\." \ - "When the function is done executing, GDB will silently stop\\."] + "When the function is done executing, GDB will silently stop\\.(" \ + "$::re_thread_exited)?"] } # Create a conditional breakpoint which includes a call to a function that @@ -210,7 +213,8 @@ proc_with_prefix run_bp_cond_hits_breakpoint { target_async target_non_stop } { "The program being debugged stopped while in a function called from GDB\\." \ "Evaluation of the expression containing the function" \ "\\(function_with_breakpoint\\) will be abandoned\\." \ - "When the function is done executing, GDB will silently stop\\."] + "When the function is done executing, GDB will silently stop\\.(" \ + "$::re_thread_exited)?"] } foreach_with_prefix target_async { "on" "off" } {