From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 673D33838001; Thu, 9 Jun 2022 12:45:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 673D33838001 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: resolve duplicate test names in gdb.threads/tls.exp X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: 417d2514ef183c2beacd932651c6684743130ab6 X-Git-Newrev: b1054b67df3e06d92c4e11e25eece679859ac683 Message-Id: <20220609124528.673D33838001@sourceware.org> Date: Thu, 9 Jun 2022 12:45:28 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2022 12:45:28 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db1054b67df3e= 06d92c4e11e25eece679859ac683 commit b1054b67df3e06d92c4e11e25eece679859ac683 Author: Andrew Burgess Date: Thu Jun 9 13:40:07 2022 +0100 gdb/testsuite: resolve duplicate test names in gdb.threads/tls.exp =20 While running the gdb.threads/tls.exp test with a GDB configured without Python, I noticed some duplicate test names. =20 This is caused by a call to skip_python_tests that is within a proc that is called multiple times by the test script. Each call to skip_python_tests results in a call to 'unsupported', and this causes the duplicate test names. =20 After this commit we now call skip_python_tests just once and place the result into a variable. Now, instead of calling skip_python_tests multiple times, we just check the variable. =20 There should be no change in what is tested after this commit. Diff: --- gdb/testsuite/gdb.threads/tls.exp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/= tls.exp index 486e29dd901..4f88c0ec987 100644 --- a/gdb/testsuite/gdb.threads/tls.exp +++ b/gdb/testsuite/gdb.threads/tls.exp @@ -72,7 +72,7 @@ proc check_thread_local {number} { "=3D $expected_value" \ "${number} thread local storage" =20 - if {![skip_python_tests]} { + if {!$::has_python_support} { gdb_test_no_output \ "python sym =3D gdb.lookup_symbol('a_thread_local')\[0\]" \ "${number} look up a_thread_local symbol" @@ -155,6 +155,9 @@ proc check_thread_stack {number spin_threads spin_threa= ds_level} { =20 clean_restart ${binfile} =20 +# Set this to avoid calling skip_python_tests repeatedly. +set has_python_support [skip_python_tests] + gdb_test_multiple "print a_thread_local" "" { -re -wrap "Cannot find thread-local variables on this target" { kfail "gdb/25807" $gdb_test_name