From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 952C03858D3C for ; Fri, 24 Nov 2023 14:38:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 952C03858D3C 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 952C03858D3C Authentication-Results: server2.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=1700836711; cv=none; b=wAL8mJLGKSOjBvkJAHAD+XBRNn8YaX/1C/VhwhmoYzEO7FzfIVyW/HBxkE571FyIaImEY9VwOnq7VnwyEPfyGg6gb18TU3Rn/WkJgH+KftKf0wOSPA4dsvs89QY9ZfmzmF+1Vk/kmqxfg3uDRy+N2hWFn9PkA1LPTcEpuwfr4s0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700836711; c=relaxed/simple; bh=ICJHgVFV2Q68uvs3QmJU3q6LD8FGhp0u+X6P9dYkY2Q=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=SAkTSdQ+LtGxP979bcg/TgY9yCvL3vgdzA4nyVOcay1Au4acLVATMrXKBlMtT79a3ju5kmG+ugGvNoF84ytQEJIhiJPAlqm5S/fCFs0TJnhDpqGOqZD/4uP8fcA3JERB5u+KCitt6/R+bkI3tU/NzjswfgPTPT8MipXh2hvnHdg= 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-out2.suse.de (Postfix) with ESMTPS id 9A5A41FD6F for ; Fri, 24 Nov 2023 14:38:29 +0000 (UTC) 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 840FB1340B for ; Fri, 24 Nov 2023 14:38:29 +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 sB7UHmW1YGU+SwAAD6G6ig (envelope-from ) for ; Fri, 24 Nov 2023 14:38:29 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Two fixes in gdb.python/tui-window-disabled.exp Date: Fri, 24 Nov 2023 15:38:31 +0100 Message-Id: <20231124143831.1167-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: +++++++++++++++++ Authentication-Results: smtp-out2.suse.de; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=suse.de (policy=none); spf=softfail (smtp-out2.suse.de: 2a07:de40:b281:104:10:150:64:97 is neither permitted nor denied by domain of tdevries@suse.de) smtp.mailfrom=tdevries@suse.de X-Rspamd-Server: rspamd2 X-Spamd-Result: default: False [17.79 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(4.60)[~all:c]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_SHORT(3.00)[1.000]; MX_GOOD(-0.01)[]; NEURAL_SPAM_LONG(3.50)[1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(2.20)[]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_HI(-0.50)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[33.59%]; DMARC_POLICY_SOFTFAIL(0.10)[suse.de : No valid SPF, No valid DKIM,none] X-Spam-Score: 17.79 X-Rspamd-Queue-Id: 9A5A41FD6F X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,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: I ran test-case gdb.python/tui-window-disabled.exp on a configuration without python support, and ran into: ... PASS: $exp: cleanup_properly=True: initial restart: set pagination off UNSUPPORTED: $exp: cleanup_properly=True: couldn't restart GDB PASS: $exp: cleanup_properly=False: initial restart: set pagination off UNSUPPORTED: $exp: cleanup_properly=False: couldn't restart GDB ... After looking into the test-case, I realized that this is a consequence of !allow_python_tests. Handle this instead by requiring allow_python_tests, such that we get the usual and more clear: ... UNSUPPORTED: $exp: require failed: allow_python_tests ... Also fix a return without value in clean_restart_and_setup, which if triggered would cause: ... ERROR: expected boolean value but got "" ... Tested on x86_64-linux. --- gdb/testsuite/gdb.python/tui-window-disabled.exp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.python/tui-window-disabled.exp b/gdb/testsuite/gdb.python/tui-window-disabled.exp index fc69b2b16c2..1d10437711d 100644 --- a/gdb/testsuite/gdb.python/tui-window-disabled.exp +++ b/gdb/testsuite/gdb.python/tui-window-disabled.exp @@ -22,7 +22,7 @@ # though the tui should be disabled. load_lib gdb-python.exp -require allow_tui_tests +require allow_tui_tests allow_python_tests tuiterm_env standard_testfile @@ -49,9 +49,6 @@ proc clean_restart_and_setup { prefix } { Term::clean_restart 24 80 $testfile - # Skip all tests if Python scripting is not enabled. - if { ![allow_python_tests] } { return 0 } - # Now source the python script. gdb_test_no_output "source ${remote_python_file}" \ "source ${testfile}.py" @@ -64,7 +61,7 @@ proc clean_restart_and_setup { prefix } { if {![runto_main]} { perror "test suppressed" - return + return 0 } } base-commit: fa1c74b22aa8c465974ddf792395d8e313199a52 -- 2.35.3