From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 19B12399141F for ; Wed, 17 Jun 2020 20:52:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 19B12399141F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: N+NE1DZHgz2ook7vtNPi9c+P8VWiu7M3hxjAE11B1GXeRE2TO7VmeymvAm1gEr3iblxc/xK9tH XvNSuMtXnV2fV7TLQVZeGVeiKEcK49HYU31GWHo5aHDOWiHQmJok5EpJDOgJvMf/qgE1khtZoc sbRGNnb1vA4ysoZMEeNyu9wVS7aPJWe56EzjnB6NCznUO96SmPsyjJESVRpnGU7YizzeXArgCR nZ8MoIxQZeMwleGDP44/v5XYW1873oCDOs+fQXMXMwHYvWgSjonelZ3FBWYqjbVDr5XxAjNd42 2OY= X-IronPort-AV: E=Sophos;i="5.73,523,1583222400"; d="scan'208";a="49944772" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 17 Jun 2020 12:52:52 -0800 IronPort-SDR: xlS5iq/0JcBgagkbAbhDInjjNKIJBTqbOY1LDh3LCPsWleUP6XANmOKqUJ2e11f9vTw68cmS3d 8XhprypjeFydDUEmJSxZv/wViZlK3Vf2B0xg3UoqGjq3qYJYSrXBj8YOG1gVcLmkp6656az6Kh TbOBGvoh7a0i5Oe5q/pEd0NGyfweaf53/5q7UR48kP3+mwF4NQNt2x+DouVBGlnYtlyXgWwReI 79gEugWgt+gzhxS+3fztKLqZCsXDRScKgc7D/buqxcf/mQewXAqYKkQrqR8fC+EHHclk+XIoFF 04Q= To: "gdb-patches@sourceware.org" From: Sandra Loosemore Subject: [committed, obvious] gdb/testsuite: fix TCL error in py-format-string.exp Message-ID: <97381abe-8817-fc56-e16f-c375cc018086@codesourcery.com> Date: Wed, 17 Jun 2020 14:52:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------9DD590D3ACF169C165FBA94C" Content-Language: en-US X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 20:52:55 -0000 --------------9DD590D3ACF169C165FBA94C Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit When GDB is built without python support, I've been seeing this TCL error: (gdb) UNSUPPORTED: gdb.python/py-format-string.exp: format_string: lang_c: Python support is disabled. ERROR: tcl error sourcing /path/to/gdb/testsuite/gdb.python/py-format-string.exp. ERROR: invoked "continue" outside of a loop The test for python support is the same one being used in all the gdb.python tests, it is just in the wrong place, inside a function instead of at top level, where it cannot meaningfully "continue". I've fixed it by moving the test earlier in the file, outside the function. I think this is sufficiently obvious that I've gone ahead and checked in this patch. -Sandra --------------9DD590D3ACF169C165FBA94C Content-Type: text/x-patch; charset="UTF-8"; name="tcl-error.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tcl-error.patch" commit 05e682e3be7e3d9d63ec358dcf8943fd200545cb Author: Sandra Loosemore Date: Wed Jun 17 13:43:32 2020 -0700 Fix TCL error in gdb.python/py-format-string.exp. 2020-06-17 Sandra Loosemore gdb/testsuite/ * gdb.python/py-format-string.exp: Move test for python support earlier, out of function body. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5d76719..2d60408 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-06-17 Sandra Loosemore + + Fix TCL error in gdb.python/py-format-string.exp. + + * gdb.python/py-format-string.exp: Move test for python support + earlier, out of function body. + 2020-06-15 Simon Marchi * gdb.base/index-cache-load-twice.c: New. diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp index f809ef3..792d60c 100644 --- a/gdb/testsuite/gdb.python/py-format-string.exp +++ b/gdb/testsuite/gdb.python/py-format-string.exp @@ -24,6 +24,11 @@ if [get_compiler_info c++] { return -1 } +# Skip all tests if Python scripting is not enabled. +gdb_exit +gdb_start +if { [skip_python_tests] } { continue } + # Build inferior to language specification. proc build_inferior {exefile lang} { global srcdir subdir srcfile testfile hex @@ -45,9 +50,6 @@ proc prepare_gdb {exefile} { gdb_reinitialize_dir $srcdir/$subdir gdb_load ${exefile} - # Skip all tests if Python scripting is not enabled. - if { [skip_python_tests] } { continue } - if ![runto_main] then { perror "couldn't run to breakpoint" return --------------9DD590D3ACF169C165FBA94C--