public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: resolve duplicate test names in gdb.threads/tls.exp Date: Thu, 9 Jun 2022 12:45:28 +0000 (GMT) [thread overview] Message-ID: <20220609124528.673D33838001@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1054b67df3e06d92c4e11e25eece679859ac683 commit b1054b67df3e06d92c4e11e25eece679859ac683 Author: Andrew Burgess <aburgess@redhat.com> Date: Thu Jun 9 13:40:07 2022 +0100 gdb/testsuite: resolve duplicate test names in gdb.threads/tls.exp While running the gdb.threads/tls.exp test with a GDB configured without Python, I noticed some duplicate test names. 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. 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. 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} { "= $expected_value" \ "${number} thread local storage" - if {![skip_python_tests]} { + if {!$::has_python_support} { gdb_test_no_output \ "python sym = 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_threads_level} { clean_restart ${binfile} +# 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
reply other threads:[~2022-06-09 12:45 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220609124528.673D33838001@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).