From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 5967C388F072 for ; Mon, 29 Jun 2020 11:21:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5967C388F072 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 57B3DAF17; Mon, 29 Jun 2020 11:21:08 +0000 (UTC) Date: Mon, 29 Jun 2020 13:21:06 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Pedro Alves Subject: [PATCH][gdb/testsuite] Emit unresolved for unknown proc Message-ID: <20200629112105.GA5644@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, 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: Mon, 29 Jun 2020 11:21:10 -0000 Hi, Since commit 26783bce15 "[gdb/testsuite] Don't abort testrun for invalid command in test-case" we don't abort the testrun when encountering an invalid command. However, since we don't report errors in the summary, there's a chance that the error goes unnoticed. Make the invalid command error more visible by marking the test-case unresolved, such that we have f.i.: ... PASS: gdb.python/py-breakpoint.exp: test_bkpt_internal: Test watchpoint write UNRESOLVED: gdb.python/py-breakpoint.exp: test_bkpt_eval_funcs: \ testcase aborted due to invalid command name: gdb_py_test_multiple ERROR: tcl error sourcing py-breakpoint.exp. ERROR: invalid command name "gdb_py_test_multiple" while executing ... === gdb Summary === nr of expected passes 56 nr of unresolved testcases 1 ... Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Emit unresolved for unknown proc gdb/testsuite/ChangeLog: 2020-06-29 Tom de Vries * lib/gdb.exp (unknown): Make test-case unresolved. --- gdb/testsuite/lib/gdb.exp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index af3e02dac5..b0faf622a9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5103,6 +5103,8 @@ proc default_gdb_init { test_file_name } { rename ::unknown ::dejagnu_unknown proc unknown { args } { # Use tcl's unknown. + set cmd [lindex $args 0] + unresolved "testcase aborted due to invalid command name: $cmd" return [uplevel 1 ::gdb_tcl_unknown $args] } }