From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 617EA3938C2C; Thu, 11 Jun 2020 10:49:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 617EA3938C2C From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/26110] invalid command name in one test-case aborts entire test run Date: Thu, 11 Jun 2020 10:49:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 10:49:35 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26110 --- Comment #1 from Tom de Vries --- In the dejagnu proc runtest, we source each test-case inside a catch call: ... if { [catch "uplevel #0 source $test_file_name"] =3D=3D 1 } { ... but that doesn't catch this particular error, because in the dejagnu framework.exp file we have: ... # unknown -- called by expect if a proc is called that doesn't exist=20=20= =20=20=20=20=20=20=20=20=20=20 #=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 # Rename unknown to tcl_unknown so that we can wrap tcl_unknown.=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 # This allows Tcl package autoloading to work in the modern age.=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 rename ::unknown ::tcl_unknown proc unknown args { if {[catch {uplevel 1 ::tcl_unknown $args} msg]} { global errorCode global errorInfo global exit_status clone_output "ERROR: (DejaGnu) proc \"$args\" does not exist." if {[info exists errorCode]} { send_error "The error code is $errorCode\n" } if {[info exists errorInfo]} { send_error "The info on the error is:\n$errorInfo\n" } set exit_status 2 log_and_exit } } ... If in f.i. gdb.exp we undo this dejagnu change: ... diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 9a0620a2bf..bbb9988d9a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7200,5 +7200,8 @@ proc hex_in_list { val hexlist } { return [expr $index !=3D -1] } +rename ::unknown ::dejagnu_unknown +rename ::tcl_unknown ::unknown + # Always load compatibility stuff. load_lib future.exp ... we have instead: ... Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for targ= et. Using /data/gdb_versions/devel/src/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file. Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/O2_float_param.e= xp ... ERROR: tcl error sourcing /data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/O2_float_param.exp. ERROR: invalid command name "foobar" while executing "foobar" (file "/data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/O2_float_param.exp" line 33) invoked from within "source /data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/O2_float_param.e= xp" ("uplevel" body line 1) invoked from within "uplevel #0 source /data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/O2_float_param.exp" invoked from within "catch "uplevel #0 source $test_file_name"" Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/access_tagged_param.exp = ... Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/access_to_packed_array.e= xp ... Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/access_to_unbounded_arra= y.exp ... ... ... --=20 You are receiving this mail because: You are on the CC list for the bug.=