Bobby R. Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/49065 )
Change subject: tests: Fix ExcludeInterleavingRanges test for .fast comp
......................................................................
tests: Fix ExcludeInterleavingRanges test for .fast comp
Change-Id: Ie3ebfc0caa52f11649f479066022734ac82e6d1b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49065
Maintainer: Bobby R. Bruce <[email protected]>
Maintainer: Daniel Carvalho <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/addr_range.test.cc
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved; Looks good to me, approved
Bobby R. Bruce: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/addr_range.test.cc b/src/base/addr_range.test.cc
index 42f74a1..0f30ad5 100644
--- a/src/base/addr_range.test.cc
+++ b/src/base/addr_range.test.cc
@@ -1416,6 +1416,16 @@
*/
TEST(AddrRangeDeathTest, ExcludeInterleavingRanges)
{
+ /* An `assert(!interleaved());` exists at the top of the `exclude(...)`
+ * method. This means EXPECT_DEATH will only function when DEBUG is
enabled
+ * (as when compiled to `.opt`). When disabled (as when compiled to
`.fast`),
+ * `r.exclude` fails more catastrophically via a `panic` which GTest
cannot
+ * handle correctly. We therefore include a `#ifdef NDEBUG` guard so this
+ * test is skipped when DEBUG is disabled.
+ */
+#ifdef NDEBUG
+ GTEST_SKIP() << "Skipping as assetions are stripped from fast builds.";
+#endif
const std::vector<AddrRange> exclude_ranges{
AddrRange(0x180, 0x210),
};
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49065
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie3ebfc0caa52f11649f479066022734ac82e6d1b
Gerrit-Change-Number: 49065
Gerrit-PatchSet: 5
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s