From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wdltG0vSaGoI7zEAWB0awg (envelope-from ) for ; Tue, 28 Jul 2026 12:01:15 -0400 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=zBffvZ78; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=L6LPjhhR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=bWmkiI2I; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TPwGBZWy; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6D2961E09E; Tue, 28 Jul 2026 12:01:15 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 1D3901E09B for ; Tue, 28 Jul 2026 12:01:14 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 927DE4BB3B83 for ; Tue, 28 Jul 2026 16:01:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 927DE4BB3B83 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=zBffvZ78; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=L6LPjhhR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=bWmkiI2I; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TPwGBZWy 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 C27854B9DB62 for ; Tue, 28 Jul 2026 16:00:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C27854B9DB62 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 C27854B9DB62 Authentication-Results: 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=1785254447; cv=none; b=qLigx6RBvv0gaPm1LGP/yZXP66y2O2KqqCFuNiIqQNTO0HgSKW/NINI64wMnfiPmHEMw7JYd+jhn3nvbITgEXHHCcQ/sU9xBLgx6vmT7quGIFQw7HF+y6cLktcUeqiB+hIeclWqNdhVIG952SqueTakVev8DPm5dRQ+AffjYRzg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785254447; c=relaxed/simple; bh=zIvFumo1Ra73ZjjCcHOgMF48bVaT7Vaklnw5FrE5HcI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=cbImTkmHjD619KujodAjaynugcvpWEUCWZ5LdAKMUHD65ygyUxWEdOqSfJQrgQmhjO0XSBMcwUe7oxBBD14BwQV+/fWahgB8PfK4QjQYUT9po0MT0EgsJ68KapiySxyk4cJSVWW802Z7CnDg2Nox05Fj5nQ6RRMPHWrNhDYswQE= 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=zBffvZ78; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=L6LPjhhR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=bWmkiI2I; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TPwGBZWy DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C27854B9DB62 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 979533F02 for ; Tue, 28 Jul 2026 16:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785254442; 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=sY12AIzJ2wDrjv5yC2/L45vsHqQn1XlR0TiIh53B5oM=; b=zBffvZ78bn5Yney0WbsTeOyFYssXVeQE1YDRQfHTGjhv4k5Y4Rsyjp38LHOArM50NS7wyX frxaKyOpI4+Ga7XGWUMkGFcIBfEZEklTajrMUe/sPq6fp11GwHhDOQ60zrGkESTgXPoxo6 N0icb6xJSPQMmtjnBWVms0oNOb24XzE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785254442; 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=sY12AIzJ2wDrjv5yC2/L45vsHqQn1XlR0TiIh53B5oM=; b=L6LPjhhRx/1n1CH5t2yh4s8xOYl8BZLtU/dT6V2zoF2RBudN0kt0aC/AB7UxAKAh0KS8vd 77KJuE4uaOptX4CA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=bWmkiI2I; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=TPwGBZWy DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785254438; 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=sY12AIzJ2wDrjv5yC2/L45vsHqQn1XlR0TiIh53B5oM=; b=bWmkiI2IL3TIjwG3kvKQv8xu2qnVeidgd/zlNq/zXPqi1B0rW68O03E+c8pOEGUvrySfVo rQbnpDRjg5NqdRlNBxlt524jCE8BoTtmv77kjxRq4Ev9k/Xn9eRAHhMhWMrbKTkAVLCf/p YL90XMbTVxT2zIF/SSJkV5rEEL4rxQY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785254438; 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=sY12AIzJ2wDrjv5yC2/L45vsHqQn1XlR0TiIh53B5oM=; b=TPwGBZWycU71/zBbTe/AO9qKLuCFWUluP1eMegTU/ECAc74jKVMyRNN5xEeMaDC2tjPAJw bSSZdtJY9/SHHXAQ== 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 80D33779B3 for ; Tue, 28 Jul 2026 16:00:38 +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 4LoFHibSaGpRbgAAD6G6ig (envelope-from ) for ; Tue, 28 Jul 2026 16:00:38 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 1/2] [gdb/testsuite] Fix gdb.python/py-section-script.exp with make-check-all.sh Date: Tue, 28 Jul 2026 18:00:15 +0200 Message-ID: <20260728160016.3087552-2-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260728160016.3087552-1-tdevries@suse.de> References: <20260728160016.3087552-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.01 / 50.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)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; FROM_EQ_ENVFROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sourceware.org:url,suse.de:mid,suse.de:dkim,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_TLS_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Queue-Id: 979533F02 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action 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 When running test-case gdb.python/py-section-script.exp with make-check-all.sh, I get: ... LOCAL: # of expected passes 38 TARGET BOARD: read1 # of expected passes 38 TARGET BOARD: readmore # of expected passes 38 TARGET BOARD: cc-with-gdb-index # of expected passes 38 TARGET BOARD: cc-with-index-cache # of untested testcases 1 TARGET BOARD: cc-with-debug-names FAIL: $exp: variant=compressed: gdb_breakpoint: set breakpoint at main # of expected passes 25 # of unexpected failures 1 TARGET BOARD: cc-with-dwz # of expected passes 19 # of untested testcases 1 TARGET BOARD: cc-with-dwz-m # of expected passes 19 # of untested testcases 1 TARGET BOARD: cc-with-gnu-debuglink ERROR: Undefined command "test-cmd 1 2 3". FAIL: $exp: variant=plain: sepdebug from eu-strip: verify scripts loaded FAIL: $exp: variant=plain: sepdebug from objcopy: strip py-section-script-plain-objcopy debuginfo FAIL: $exp: variant=plain: verify scripts loaded # of expected passes 12 # of unexpected failures 3 # of unresolved testcases 1 TARGET BOARD: debug-types # of expected passes 38 TARGET BOARD: dwarf4-gdb-index # of expected passes 38 TARGET BOARD: dwarf5-fission-debug-types # of expected passes 38 TARGET BOARD: dwarf64 # of expected passes 38 TARGET BOARD: fission # of untested testcases 1 TARGET BOARD: fission-dwp # of untested testcases 1 TARGET BOARD: gold # of untested testcases 1 TARGET BOARD: gold-gdb-index # of untested testcases 1 TARGET BOARD: readnow # of expected passes 38 TARGET BOARD: native-extended-gdbserver # of expected passes 38 TARGET BOARD: native-gdbserver # of expected passes 38 TARGET BOARD: native-stdio-gdbserver # of expected passes 38 TARGET BOARD: remote-gdbserver-on-localhost # of expected passes 38 TARGET BOARD: remote-stdio-gdbserver # of expected passes 38 HOST BOARD: local-remote-host, TARGET BOARD: remote-gdbserver-on-localhost # of untested testcases 1 HOST BOARD: local-remote-host, TARGET BOARD: remote-stdio-gdbserver # of untested testcases 1 HOST BOARD: local-remote-host-notty, TARGET BOARD: remote-gdbserver-on-localhost # of untested testcases 1 HOST BOARD: local-remote-host-notty, TARGET BOARD: remote-stdio-gdbserver # of untested testcases 1 HOST/TARGET BOARD: local-remote-host-native # of untested testcases 1 ... I've filed a PR about the cc-with-debug-names failure [1]. The untested for remote host configurations is because of compilation failure. There's some evidence of remote host support in the test-case, but making it work in general requires a lot of changes, because the test-case is file-manipulation heavy. Instead, just require local host and remove any suggestion that remote host is supported. Finally, cc-with-gnu-debuglink config fails because it moves the .debug_gdb_scripts section out of the executable. Detect this and bail out. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=34440 --- .../gdb.python/py-section-script.exp | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp index 91c280da2b1..04ff14a8d0a 100644 --- a/gdb/testsuite/gdb.python/py-section-script.exp +++ b/gdb/testsuite/gdb.python/py-section-script.exp @@ -18,26 +18,23 @@ require is_elf_target require allow_python_tests +require {!is_remote host} standard_testfile -# Make this available to gdb before the program starts, it is -# automagically loaded by gdb. -set remote_python_file [gdb_remote_download host \ - ${srcdir}/${subdir}/${testfile}.py] - -set quoted_name "\"$remote_python_file\"" +set python_file $srcdir/$subdir/$testfile.py +set quoted_name "\"$python_file\"" # Helper proc to 'set auto-load safe-path ...'. Build the new path value by # joining ARGS together with an appropriate path separator character. proc set_auto_load_safe_path { args } { if {[ishost *-*-mingw*]} { - set remote_pathsep ";" + set pathsep ";" } else { - set remote_pathsep ":" + set pathsep ":" } - set safe_path [join $args $remote_pathsep] + set safe_path [join $args $pathsep] gdb_test_no_output "set auto-load safe-path $safe_path" \ "set auto-load safe-path" @@ -59,6 +56,13 @@ foreach_with_prefix variant {plain compressed} { return } + if {[section_get $the_binfile ".debug_gdb_scripts"] eq ""} { + # Target board cc-with-gnu-debug-link moves .debug_gdb_scripts into + # a separate debug file. + unsupported "Section .debug_gdb_scripts not in binfile" + return + } + if {$variant == "compressed"} { set objdump_program [gdb_find_objdump] set debug_sect [exec $objdump_program -j .debug_gdb_scripts -s "$the_binfile"] @@ -92,16 +96,8 @@ foreach_with_prefix variant {plain compressed} { clean_restart - # Get the name of the binfile on the host; on a remote host this means - # stripping off any directory prefix. - if {[is_remote host]} { - set remote_binfile [file tail ${the_binfile}] - } else { - set remote_binfile ${the_binfile} - } - - set_auto_load_safe_path $remote_python_file $remote_binfile - gdb_load ${the_binfile} + set_auto_load_safe_path $python_file $the_binfile + gdb_load $the_binfile # Verify gdb loaded each script and they appear once in the list. gdb_test_multiple "info auto-load python-scripts" "verify scripts loaded" { -re -wrap "Yes.*${testfile}.py.*Yes.*inlined-script.*" { @@ -153,7 +149,7 @@ foreach_with_prefix variant {plain compressed} { return } - set_auto_load_safe_path $remote_python_file $eu_strip_binfile + set_auto_load_safe_path $python_file $eu_strip_binfile gdb_test_multiple "file $eu_strip_binfile" "load sepdebug" { -re -wrap "\r\nwarning: Invalid entry in \\.debug_gdb_scripts section.*" { fail $gdb_test_name @@ -203,7 +199,7 @@ foreach_with_prefix variant {plain compressed} { # Add the directory containing OBJCOPY_BINFILE because the scripts # section will be auto-loaded from the separate .debug file (not the # main executable), which resides alongside it. - set_auto_load_safe_path $remote_python_file \ + set_auto_load_safe_path $python_file \ [file dirname ${objcopy_binfile}] gdb_load $objcopy_binfile -- 2.51.0