]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Use 'array unset' instead of just 'unset'
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 4 Aug 2020 11:13:37 +0000 (12:13 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 4 Aug 2020 14:56:08 +0000 (15:56 +0100)
In the check-test-names.exp library 'unset' was being used to unset an
array variable.  Though this seems to work fine on tcl 8.6, it was
discovered on a CentOS 7.8.2003 machine, running tcl 8.5, that this
doesn't work and 'array unset' should be used instead.

Using 'array unset' should work fine for newer and older versions of
tcl (since 8.3, releases ~2000).

gdb/testsuite/ChangeLog:

* lib/check-test-names.exp (do_reset_vars): Use 'array unset' to
unset the array variable.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/check-test-names.exp

index 1e1b702ec6d531cb723278bf65defc1e4bfc6e26..38cc7be47e6eedb2ee8ed67b4fbe3610d31f5d72 100644 (file)
@@ -1,3 +1,8 @@
+2020-08-04  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * lib/check-test-names.exp (do_reset_vars): Use 'array unset' to
+       unset the array variable.
+
 2020-08-03  Tom de Vries  <tdevries@suse.de>
 
        PR symtab/26333
index 4c0fde6e4ea92a05b386719d0ff065129ec17ce6..d72de3cf82107d8917108cfd468f2589d803b94b 100644 (file)
@@ -150,7 +150,7 @@ namespace eval ::CheckTestNames {
 
        CheckTestNames::reset_vars
 
-       unset all_test_names
+       array unset all_test_names
        foreach nm {paths duplicates} {
            set counts($nm,count) 0
        }