From: Lancelot SIX <lancelot.six@amd.com>
To: <gdb-patches@sourceware.org>
Cc: <lsix@lancelotsix.com>, Lancelot SIX <lancelot.six@amd.com>
Subject: [PATCH 2/4] gdb/testsuite: Rename skip_hipcc_tests to allow_hipcc_tests
Date: Tue, 7 Feb 2023 13:28:00 +0000 [thread overview]
Message-ID: <20230207132802.223510-3-lancelot.six@amd.com> (raw)
In-Reply-To: <20230207132802.223510-1-lancelot.six@amd.com>
Rename skip_hipcc_tests to allow_hipcc_tests so it can be used as a
"require" predicate in tests.
Use require in gdb.rocm/simple.exp.
---
gdb/testsuite/gdb.rocm/simple.exp | 5 +----
gdb/testsuite/lib/rocm.exp | 6 +++---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/gdb/testsuite/gdb.rocm/simple.exp b/gdb/testsuite/gdb.rocm/simple.exp
index f84df71414e..befcc7aaabc 100644
--- a/gdb/testsuite/gdb.rocm/simple.exp
+++ b/gdb/testsuite/gdb.rocm/simple.exp
@@ -20,10 +20,7 @@ load_lib rocm.exp
standard_testfile .cpp
-if [skip_hipcc_tests] {
- verbose "skipping hip test: ${testfile}"
- return
-}
+require allow_hipcc_tests
if {[build_executable "failed to prepare" $testfile $srcfile {debug hip}]} {
return
diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp
index e22f392deb1..1440ac85d32 100644
--- a/gdb/testsuite/lib/rocm.exp
+++ b/gdb/testsuite/lib/rocm.exp
@@ -15,14 +15,14 @@
#
# Support library for testing ROCm (AMD GPU) GDB features.
-proc skip_hipcc_tests { } {
+proc allow_hipcc_tests { } {
# Only the native target supports ROCm debugging. E.g., when
# testing against GDBserver, there's no point in running the ROCm
# tests.
if {[target_info gdb_protocol] != ""} {
- return 1
+ return 0
}
- return 0
+ return 1
}
# The lock file used to ensure that only one GDB has access to the GPU
--
2.34.1
next prev parent reply other threads:[~2023-02-07 13:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 13:27 [PATCH 0/4] Fix gdb.rocm/simple.exp on hosts without ROCm Lancelot SIX
2023-02-07 13:27 ` [PATCH 1/4] gdb: 'show config' shows --with[out]-amd-dbgapi Lancelot SIX
2023-02-07 13:28 ` Lancelot SIX [this message]
2023-02-07 13:28 ` [PATCH 3/4] gdb/testsuite: require amd-dbgapi support to run rocm tests Lancelot SIX
2023-02-07 13:59 ` Simon Marchi
2023-02-07 13:28 ` [PATCH 4/4] gdb/testsuite: allow_hipcc_tests tests the hipcc compiler Lancelot SIX
2023-02-07 13:42 ` Lancelot SIX
2023-02-07 14:12 ` Simon Marchi
2023-02-07 15:31 ` Lancelot SIX
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=20230207132802.223510-3-lancelot.six@amd.com \
--to=lancelot.six@amd.com \
--cc=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
/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).