diff --git a/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp b/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp index f8a9ded631..d4389c2473 100644 --- a/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp +++ b/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp @@ -213,7 +213,7 @@ TEST_F(TimestampPacketTests, givenTagNodeWhatAskingForGpuAddressesThenReturnCorr EXPECT_EQ(expectedCounterAddress, TimestampPacketHelper::getGpuDependenciesCountGpuAddress(mockNode)); } -TEST_F(TimestampPacketSimpleTests, whenEndTagIsNotOneThenMarkAsCompleted) { +TEST_F(TimestampPacketSimpleTests, whenContextEndTagIsNotOneThenMarkAsCompleted) { MockTimestampPacketStorage timestampPacketStorage; auto &packet = timestampPacketStorage.packets[0]; timestampPacketStorage.initialize(); @@ -228,7 +228,7 @@ TEST_F(TimestampPacketSimpleTests, whenEndTagIsNotOneThenMarkAsCompleted) { packet.contextEnd = 0; packet.globalEnd = 1; - EXPECT_FALSE(timestampPacketStorage.isCompleted()); + EXPECT_TRUE(timestampPacketStorage.isCompleted()); packet.contextEnd = 0; packet.globalEnd = 0; @@ -277,7 +277,7 @@ TEST_F(TimestampPacketSimpleTests, whenIsCompletedIsCalledThenItReturnsProperTim EXPECT_FALSE(timestampPacketStorage.isCompleted()); packet.contextEnd = 0; - EXPECT_FALSE(timestampPacketStorage.isCompleted()); + EXPECT_TRUE(timestampPacketStorage.isCompleted()); packet.globalEnd = 0; EXPECT_TRUE(timestampPacketStorage.isCompleted()); } @@ -295,10 +295,10 @@ TEST_F(TimestampPacketSimpleTests, givenMultiplePacketsInUseWhenCompletionIsChec EXPECT_FALSE(timestampPacketStorage.isCompleted()); } - packets[timestampPacketStorage.getPacketsUsed() - 1].contextEnd = 0; + packets[timestampPacketStorage.getPacketsUsed() - 1].globalEnd = 0; EXPECT_FALSE(timestampPacketStorage.isCompleted()); - packets[timestampPacketStorage.getPacketsUsed() - 1].globalEnd = 0; + packets[timestampPacketStorage.getPacketsUsed() - 1].contextEnd = 0; EXPECT_TRUE(timestampPacketStorage.isCompleted()); } diff --git a/shared/source/helpers/timestamp_packet.h b/shared/source/helpers/timestamp_packet.h index a9a46420e0..895335b6de 100644 --- a/shared/source/helpers/timestamp_packet.h +++ b/shared/source/helpers/timestamp_packet.h @@ -55,7 +55,7 @@ class TimestampPackets : public TagTypeBase { } for (uint32_t i = 0; i < packetsUsed; i++) { - if ((packets[i].contextEnd == 1) || (packets[i].globalEnd == 1)) { + if (packets[i].contextEnd == 1) { return false; } }