diff --git a/layer_tests/tracing/src/test_api_ltracing.cpp b/layer_tests/tracing/src/test_api_ltracing.cpp index d5f03581..9564a0f8 100644 --- a/layer_tests/tracing/src/test_api_ltracing.cpp +++ b/layer_tests/tracing/src/test_api_ltracing.cpp @@ -943,6 +943,42 @@ TEST_F( ASSERT_EQ(initial_result, zeCommandListReset(command_list)); } +TEST_F( + LTRACING_TEST_NAME, + GivenEnabledTracerWithCalltoZetAPIThenSuccessIsReturned) { + prologues.CommandList.pfnResetCb = lzt::lprologue_callback; + epilogues.CommandList.pfnResetCb = lzt::lepilogue_callback; + + init_command_list(); + + ze_result_t initial_result = zeCommandListReset(command_list); + ready_ltracer(tracer_handle, prologues, epilogues); + + ASSERT_EQ(initial_result, zeCommandListReset(command_list)); + uint32_t metricGroupCount = 0; + EXPECT_EQ(ZE_RESULT_SUCCESS, + zetMetricGroupGet(device, &metricGroupCount, nullptr)); +} + +TEST_F( + LTRACING_TEST_NAME, + GivenEnabledTracerWithCalltoZesAPIThenSuccessIsReturned) { + prologues.CommandList.pfnResetCb = lzt::lprologue_callback; + epilogues.CommandList.pfnResetCb = lzt::lepilogue_callback; + + init_command_list(); + + ze_result_t initial_result = zeCommandListReset(command_list); + ready_ltracer(tracer_handle, prologues, epilogues); + + ASSERT_EQ(initial_result, zeCommandListReset(command_list)); + EXPECT_EQ(ZE_RESULT_SUCCESS, + zesInit(0)); + uint32_t zesCount = 0; + EXPECT_EQ(ZE_RESULT_SUCCESS, + zesDriverGet(&zesCount, nullptr)); +} + TEST_F( LTRACING_TEST_NAME, GivenEnabledTracerWithzeCommandListCloseCallbacksWhenCallingzeCommandListCloseThenUserDataIsSetAndResultUnchanged) {