From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QTdrLEkV52oNOCsAWB0awg (envelope-from ) for ; Sun, 01 Nov 2026 05:32:41 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=O60ow8pI; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=7TM6vVSq; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=O60ow8pI; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=7TM6vVSq; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id AA203378006; Sun, 01 Nov 2026 05:32:41 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EDDDA378002 for ; Sun, 01 Nov 2026 05:32:39 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1023E4BAE7D3 for ; Sun, 1 Nov 2026 10:32:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1023E4BAE7D3 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=O60ow8pI; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=7TM6vVSq; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=O60ow8pI; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=7TM6vVSq 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 A82754BA23E6 for ; Sun, 1 Nov 2026 10:31:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A82754BA23E6 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 A82754BA23E6 Authentication-Results: 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=1793529116; cv=none; b=rVH49tyVG6ZHSLoo4OfyZ9nIFgApOC78DY4Jfrz1nHRR1vOOQW40Y9xtdaAwxUyC7fTSJi8eZgGqDUvU379GhwqdA3G2GREHV7UXWIez28PunWs9iAOgQFpM3MA+cekrvsuleNQ0cXI33jUvppv+9+cB77XaUSLXCirdyStXvmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793529116; c=relaxed/simple; bh=nAjEYmJdPQTa0cf4NtjzQdstbVF7fmLWLI6gXzBiTLg=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=JqoZCrKJC5eC1QdGCCq0Z2iPssSl31zEgMHla92KejY9d4hvh/8cLQqFCLS0CqDGZlG5/qtjwR7nuT2jormLoe4TscInTGdfRp/YJkNJqRAi9aDZ5hHsKD8CZZZWcNOKDrVeWWobjHvS7scJxQpPN0psCKKU26tOLWEcDhA2a78= ARC-Authentication-Results: i=1; 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=O60ow8pI; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=7TM6vVSq; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=O60ow8pI; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=7TM6vVSq DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A82754BA23E6 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 0E52F21BEF for ; Sun, 1 Nov 2026 10:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1793529115; 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=3LebRhQ0dX04yuniU0Ms1COqqDT7rG0Myd7JfldQ+KU=; b=O60ow8pI2EbjCDYJm9PZGce1d15Q4f4QbME0Uv/RzS6XTxP97ORC4TeyuvfBjn7ZhSygFc pSG8ZE3iHm8yvYEYvf7L2zSR+C4gJDuVCA0CgPL4FORW0gWpUn3ZvV7mP9XGZpYIr9hqnD CSh0sVX5UTEJRQtod0w6gs6cNrI+2ms= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1793529115; 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=3LebRhQ0dX04yuniU0Ms1COqqDT7rG0Myd7JfldQ+KU=; b=7TM6vVSqw+LmyvH5RgqMQg+cv1i4kKELFqkFChrGA1JakOy7juoQlmIC0vap5ikQyzc07Z NJ9NbuqaUQy+9bDg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=O60ow8pI; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=7TM6vVSq DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1793529115; 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=3LebRhQ0dX04yuniU0Ms1COqqDT7rG0Myd7JfldQ+KU=; b=O60ow8pI2EbjCDYJm9PZGce1d15Q4f4QbME0Uv/RzS6XTxP97ORC4TeyuvfBjn7ZhSygFc pSG8ZE3iHm8yvYEYvf7L2zSR+C4gJDuVCA0CgPL4FORW0gWpUn3ZvV7mP9XGZpYIr9hqnD CSh0sVX5UTEJRQtod0w6gs6cNrI+2ms= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1793529115; 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=3LebRhQ0dX04yuniU0Ms1COqqDT7rG0Myd7JfldQ+KU=; b=7TM6vVSqw+LmyvH5RgqMQg+cv1i4kKELFqkFChrGA1JakOy7juoQlmIC0vap5ikQyzc07Z NJ9NbuqaUQy+9bDg== 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 CE499134B3 for ; Sun, 1 Nov 2026 10:31:54 +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 y2gkKRoV52qBAgAAD6G6ig (envelope-from ) for ; Sun, 01 Nov 2026 10:31:54 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix timeout in gdb.base/foll-fork-syscall.exp Date: Sun, 1 Nov 2026 11:31:54 +0100 Message-ID: <20261101103154.392746-1-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-12.01 / 50.00]; SUSE_INTERNAL_BYPASS(-9.00)[]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; 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)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_DN_NONE(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Action: no action X-Rspamd-Queue-Id: 0E52F21BEF 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~public-inbox=simark.ca@sourceware.org With a gdb 17.2 based package, and test-case gdb.base/foll-fork-syscall.exp, I ran into: ... (gdb) continue Continuing. [Detaching after fork from child process 30816] Breakpoint 2, main (argc=1, argv=0x7fffffffd648) at foll-fork-syscall.c:27 27 if (pid == 0) /* set breakpoint here */ (gdb) I am the child FAIL: $exp: follow-fork-mode=parent: detach-on-fork=on: test_catch_syscall: \ continue to breakpoint after fork (timeout) continue Continuing. I am the parent Catchpoint 5 (call to syscall chdir), 0x00007ffff7ed4cc7 in chdir () from /lib64/libc.so.6 (gdb) PASS: $exp: follow-fork-mode=parent: detach-on-fork=on: test_catch_syscall: \ continue to chdir syscall ... I can reliably reproduce this on trunk using the readmore target board with READMORE_SLEEP=2000 and this change in gdb.base/foll-fork-syscall.c: ... - printf ("I am the child\n"); + { + sleep (1); + printf ("I am the child\n"); + } ... With a longer delay before the printf, the timeout moves to the following test. The breakpoint only triggers in the fork parent, not in the fork child, so the "I am the child" message can happen at any moment following the fork. Fix this using -no-prompt-anchor in two gdb_tests. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34925 --- gdb/testsuite/gdb.base/foll-fork-syscall.exp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/foll-fork-syscall.exp b/gdb/testsuite/gdb.base/foll-fork-syscall.exp index a283631f458..53096144596 100644 --- a/gdb/testsuite/gdb.base/foll-fork-syscall.exp +++ b/gdb/testsuite/gdb.base/foll-fork-syscall.exp @@ -120,11 +120,18 @@ proc_with_prefix test_catch_syscall {follow-fork-mode detach-on-fork} { append expected_re " process.*" } append expected_re "Breakpoint .*set breakpoint here.*" - gdb_test "continue" $expected_re "continue to breakpoint after fork" + + # Use -no-prompt-anchor in the following tests to account for an + # "I am the child" message which may occur at any moment following the + # fork, for follow-fork-mode=parent and detach-on-fork=on. Likewise for + # an "I am the parent" message and follow-fork-mode=child. + gdb_test -no-prompt-anchor continue $expected_re \ + "continue to breakpoint after fork" # Next stop should be the syscall catchpoint. set expected_re ".*Catchpoint . \\(call to syscall chdir\\).*" - gdb_test continue $expected_re "continue to chdir syscall" + gdb_test -no-prompt-anchor continue $expected_re \ + "continue to chdir syscall" } # Check for follow-fork support. base-commit: ef8962f3da549ae3cdea29c4a89452c4561c824b -- 2.51.0