Skip to content

Commit d27d617

Browse files
Applied timeout for test 250
1 parent d05dd1f commit d27d617

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/cpp/src/250-load-scheduling.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@ SCENARIO("The core issues loads only after its registers are finished") {
4545
}
4646

4747
AND_WHEN("The consumer is executed") {
48-
while (!uut.ROB.back().executed) {
48+
for (int i = 0; i < 10000 && !uut.ROB.back().executed; ++i) {
4949
for (auto op : std::array<champsim::operable*,3>{{&uut, &mock_L1I, &mock_L1D}})
5050
op->_operate();
5151
}
5252
for (auto op : std::array<champsim::operable*,3>{{&uut, &mock_L1I, &mock_L1D}})
5353
op->_operate();
5454

5555
THEN("The load queue entry is issued") {
56-
REQUIRE(uut.LQ.at(0)->fetch_issued == true);
56+
auto found = std::find_if(std::begin(uut.LQ), std::end(uut.LQ), [](auto x){ return x.has_value(); });
57+
REQUIRE(found != std::end(uut.LQ));
58+
REQUIRE((*found)->fetch_issued == true);
5759
REQUIRE(mock_L1D.packet_count() == 1);
5860
}
5961
}

0 commit comments

Comments
 (0)