public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-26110-4717-KZwTNpLVgU@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26110-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26110

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
In the dejagnu proc runtest, we source each test-case inside a catch call:
...
        if { [catch "uplevel #0 source $test_file_name"] == 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            
#                                                                               
# Rename unknown to tcl_unknown so that we can wrap tcl_unknown.                
# This allows Tcl package autoloading to work in the modern age.                

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 != -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 target.
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.exp
...
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.exp"
    ("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.exp
...
Running
/data/gdb_versions/devel/src/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
...
  ...
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2020-06-11 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 10:45 [Bug testsuite/26110] New: " vries at gcc dot gnu.org
2020-06-11 10:49 ` vries at gcc dot gnu.org [this message]
2020-06-11 11:23 ` [Bug testsuite/26110] " vries at gcc dot gnu.org
2020-06-11 14:35 ` vries at gcc dot gnu.org
2020-06-12  7:13 ` cvs-commit at gcc dot gnu.org
2020-06-12  7:16 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26110-4717-KZwTNpLVgU@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).