Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/40835 )

Change subject: base: Fix storage unit test in .fast
......................................................................

base: Fix storage unit test in .fast

These tests depend on assertions being triggered, which
does not happen in .fast.

Change-Id: I0dd78f184809a453035046bc76640dfb5988bb5f
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/base/stats/storage.test.cc
1 file changed, 8 insertions(+), 0 deletions(-)



diff --git a/src/base/stats/storage.test.cc b/src/base/stats/storage.test.cc
index 78df23d..3218438 100644
--- a/src/base/stats/storage.test.cc
+++ b/src/base/stats/storage.test.cc
@@ -175,6 +175,7 @@
     increaseTick();
 }

+#if TRACING_ON
 /**
* Test whether getting the result in a different tick triggers an assertion.
  */
@@ -184,6 +185,7 @@
     increaseTick();
     ASSERT_DEATH(stor.result(), ".+");
 }
+#endif

 /**
  * Test whether getting the result in a different tick does not trigger an
@@ -266,6 +268,7 @@
     ASSERT_FALSE(stor.zero());
 }

+#if TRACING_ON
 /** Test that an assertion is thrown when bucket size is 0. */
 TEST(StatsDistStorDeathTest, BucketSize0)
 {
@@ -273,6 +276,7 @@
     EXPECT_ANY_THROW(Stats::DistStor::Params params(0, 5, 0));
     testing::internal::GetCapturedStderr();
 }
+#endif

 /**
  * Test whether zero is correctly set as the reset value. The test order is
@@ -492,6 +496,7 @@
     checkExpectedDistData(data, expected_data, true);
 }

+#if TRACING_ON
/** Test that an assertion is thrown when not enough buckets are provided. */
 TEST(StatsHistStorDeathTest, NotEnoughBuckets0)
 {
@@ -507,6 +512,7 @@
     EXPECT_ANY_THROW(Stats::HistStor::Params params(1));
     testing::internal::GetCapturedStderr();
 }
+#endif

 /**
  * Test whether zero is correctly set as the reset value. The test order is
@@ -913,6 +919,7 @@
     prepareCheckHistStor(params, values, 0, expected_data);
 }

+#if TRACING_ON
/** Test whether adding storages with different sizes triggers an assertion. */
 TEST(StatsHistStorDeathTest, AddDifferentSize)
 {
@@ -942,6 +949,7 @@

     ASSERT_DEATH(stor.add(&stor2), ".+");
 }
+#endif

 /** Test merging two histograms. */
 TEST(StatsHistStorTest, Add)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40835
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: I0dd78f184809a453035046bc76640dfb5988bb5f
Gerrit-Change-Number: 40835
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to