From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id u2RiCnnK22ZGzyIAWB0awg (envelope-from ) for ; Fri, 06 Sep 2024 23:37:29 -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=bD3kCz/9; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=KXA/Bixc; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=bD3kCz/9; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=KXA/Bixc; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 16D251E353; Fri, 6 Sep 2024 23:37:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-11.8 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,URIBL_BLOCKED,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 2CB471E05C for ; Fri, 6 Sep 2024 23:37:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B3B14385EC26 for ; Sat, 7 Sep 2024 03:37:27 +0000 (GMT) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 6EEA43858280 for ; Sat, 7 Sep 2024 03:37:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6EEA43858280 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 6EEA43858280 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=1725680228; cv=none; b=l5CKzh34UWVnjb4p9HxFW3y36C/Hm5b9nd0RZlp1hkqN9bHPuc3FH/qSTNPmsGe+lUFlmzqzBrkaX9B561VgyylKMAiGC4KRWIZzTfgACLukwm/4tdpFTdeJ0xCu6660dcFXAVVl0iEXN8DwecgdDwYYTQXWeO0GZnZshT3sV+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725680228; c=relaxed/simple; bh=Ft+OPkuagbljTmdY2KcPrHXbwEJhtSbRmpyP3XG5E4w=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=K+kVgpARLNxIVv3L81nCgHXrUmtbJYY6wFbOzWXD6APtBGe+iUr5lqN5rg8YNXkyLlnK0yxtFitG0RaA0sOrR+xhk0RLvbit8d2ahT+jRRfZiEDxyehuRjK6kNJdWbqbi7xmSgOJNdCQ0EBjCxjMeMURXsKPl2c6gJCYNotEkuA= ARC-Authentication-Results: i=1; server2.sourceware.org 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 71C4B21AE3 for ; Sat, 7 Sep 2024 03:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725680225; 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=cL03t5D/7DPUAFV5BMiLHaUTen+hFXHk7x2kg6Sydwg=; b=bD3kCz/9ffvnDMcq21+FW7QqpndFxouXJSz0tcm1eOqSSzL50qhr5t9g3Y82gxY9cyTCfZ H9zUv9jOm1MgT7VywwHNeG6UP5gC+o43nwO06qTy6KmgemSLssm5X1U2kfn0JIqXs5gnTU z8OJD4O45o3Tj5rBmnNnccaNzKAE6Dk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725680225; 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=cL03t5D/7DPUAFV5BMiLHaUTen+hFXHk7x2kg6Sydwg=; b=KXA/BixcUMMEqmXlycRudN0rSQGdcji1KA+YoEXWdrwVtq032g0U2EL+hp7KgXBCnBqJDX 9ruW0qDZH5ZYa9Cw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725680225; 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=cL03t5D/7DPUAFV5BMiLHaUTen+hFXHk7x2kg6Sydwg=; b=bD3kCz/9ffvnDMcq21+FW7QqpndFxouXJSz0tcm1eOqSSzL50qhr5t9g3Y82gxY9cyTCfZ H9zUv9jOm1MgT7VywwHNeG6UP5gC+o43nwO06qTy6KmgemSLssm5X1U2kfn0JIqXs5gnTU z8OJD4O45o3Tj5rBmnNnccaNzKAE6Dk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725680225; 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=cL03t5D/7DPUAFV5BMiLHaUTen+hFXHk7x2kg6Sydwg=; b=KXA/BixcUMMEqmXlycRudN0rSQGdcji1KA+YoEXWdrwVtq032g0U2EL+hp7KgXBCnBqJDX 9ruW0qDZH5ZYa9Cw== 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 58FF313A5F for ; Sat, 7 Sep 2024 03:37: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 ieTiE2HK22aaeAAAD6G6ig (envelope-from ) for ; Sat, 07 Sep 2024 03:37:05 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/testsuite] Handle missing curses in gdb.python/py-missing-debug.exp Date: Sat, 7 Sep 2024 05:37:13 +0200 Message-Id: <20240907033713.4483-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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)[-0.998]; 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-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 On a system with python 3.6, module gdb.missing_debug imports module curses, so when running test-case gdb.python/py-missing-debug.exp on a system without that module installed, we run into: ... (gdb) source py-missing-debug.py^M Python Exception : Module 'curses' is not installed.^M Use:^M sudo zypper install python36-curses^M to install it.^M Error occurred in Python: Module 'curses' is not installed.^M Use:^M sudo zypper install python36-curses^M to install it.^M (gdb) FAIL: gdb.python/py-missing-debug.exp: source python script ... Fix this by issuing UNSUPPORTED instead, and bailing out. Tested on x86_64-linux. PR testsuite/31576 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31576 --- gdb/testsuite/gdb.python/py-missing-debug.exp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-missing-debug.exp b/gdb/testsuite/gdb.python/py-missing-debug.exp index dfc0a467b2a..9d853d3a311 100644 --- a/gdb/testsuite/gdb.python/py-missing-debug.exp +++ b/gdb/testsuite/gdb.python/py-missing-debug.exp @@ -58,8 +58,21 @@ with_test_prefix "initial checks" { } # Load the Python script into GDB. -gdb_test "source $remote_python_file" "^Success" \ - "source python script" +set python_script_loaded 0 +set re_no_curses [string_to_regexp "Module 'curses' is not installed."] +gdb_test_multiple "source $remote_python_file" "source python script" { + -re -wrap $re_no_curses.* { + unsupported $gdb_test_name + } + -re -wrap "^Success" { + set python_script_loaded 1 + pass $gdb_test_name + } +} + +if { ! $python_script_loaded } { + return +} # Setup the separate debug info directory. This isn't actually needed until # some of the later tests, but might as well get this done now. base-commit: 4723415cda09b09dbac743f30f877355a49fdee2 -- 2.35.3