diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index 53ed25b14e..c22efb75cc 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -288,8 +288,6 @@ TEST(CommandQueue, givenDeviceWhenCreatingCommandQueueThenPickCsrFromDefaultEngi EXPECT_EQ(defaultCsr, &cmdQ.getGpgpuCommandStreamReceiver()); } -struct CommandQueueWithBlitOperationsTests : public ::testing::TestWithParam {}; - TEST(CommandQueue, givenDeviceNotSupportingBlitOperationsWhenQueueIsCreatedThenDontRegisterAnyBcsCsrs) { HardwareInfo hwInfo = *defaultHwInfo; hwInfo.capabilityTable.blitterOperationsSupported = false; @@ -351,16 +349,6 @@ TEST(CommandQueue, whenCommandQueueWithInternalUsageIsCreatedThenInternalBcsEngi } } -INSTANTIATE_TEST_SUITE_P(uint32_t, - CommandQueueWithBlitOperationsTests, - ::testing::Values(CL_COMMAND_WRITE_BUFFER, - CL_COMMAND_WRITE_BUFFER_RECT, - CL_COMMAND_READ_BUFFER, - CL_COMMAND_READ_BUFFER_RECT, - CL_COMMAND_COPY_BUFFER, - CL_COMMAND_COPY_BUFFER_RECT, - CL_COMMAND_SVM_MEMCPY)); - TEST(CommandQueue, givenCmdQueueBlockedByReadyVirtualEventWhenUnblockingThenUpdateFlushTaskFromEvent) { auto mockDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(nullptr)); auto context = new MockContext; diff --git a/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp b/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp index a570d26c12..420de6419f 100644 --- a/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp @@ -246,6 +246,11 @@ INSTANTIATE_TEST_SUITE_P( CreateImageSize, testing::ValuesIn(allImageTypes)); +INSTANTIATE_TEST_SUITE_P( + , + CheckImageType, + testing::ValuesIn(allImageTypes)); + static cl_mem_object_type allImageTypesWithBadOne[] = { 0, // negative scenario CL_MEM_OBJECT_BUFFER, diff --git a/shared/test/unit_test/fixtures/product_config_fixture.h b/shared/test/unit_test/fixtures/product_config_fixture.h index 4c1da2027a..dd10f7f580 100644 --- a/shared/test/unit_test/fixtures/product_config_fixture.h +++ b/shared/test/unit_test/fixtures/product_config_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -45,4 +45,3 @@ struct ProductConfigHwInfoTests : public ProductConfigTest<::testing::TestWithPa }; using ProductConfigTests = ProductConfigTest<::testing::Test>; -using ProductConfigHwInfoBadArchTests = ProductConfigHwInfoTests; diff --git a/shared/test/unit_test/helpers/basic_math_tests.cpp b/shared/test/unit_test/helpers/basic_math_tests.cpp index 50d6c39da3..889982ee7d 100644 --- a/shared/test/unit_test/helpers/basic_math_tests.cpp +++ b/shared/test/unit_test/helpers/basic_math_tests.cpp @@ -180,6 +180,9 @@ TEST_P(ComputeTotalElementsCount, givenVariousInputVectorsWhenComputeTotalElemen Vec3 inputData(GetParam().x, GetParam().y, GetParam().z); EXPECT_EQ(GetParam().result, computeTotalElementsCount(inputData)); } +INSTANTIATE_TEST_SUITE_P(, + ComputeTotalElementsCount, + ::testing::ValuesIn(elementCountInputData)); TEST(isPow2Test, WhenArgZeroThenReturnFalse) { EXPECT_FALSE(isPow2(0u)); diff --git a/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp b/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp index 4ecf385728..7034789128 100644 --- a/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp +++ b/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp @@ -479,7 +479,7 @@ INSTANTIATE_TEST_SUITE_P( HeapIndex::heapStandard2MB, HeapIndex::heapExtended)); -struct GfxPartitionOn57bTest : public ::testing::TestWithParam { +struct GfxPartitionOn57bTest : public ::testing::Test { public: class MockOsMemory : public OSMemory { public: @@ -599,12 +599,12 @@ struct GfxPartitionOn57bTest : public ::testing::TestWithParam { uint32_t GfxPartitionOn57bTest::MockOsMemory::reserveCount = 0; -TEST_P(GfxPartitionOn57bTest, given48bitCpuAddressWidthWhenInitializingGfxPartitionThenDoNotReserve48bitSpaceForDriverAllocations) { +TEST_F(GfxPartitionOn57bTest, given48bitCpuAddressWidthWhenInitializingGfxPartitionThenDoNotReserve48bitSpaceForDriverAllocations) { if (is32bit) { GTEST_SKIP(); } - auto gpuAddressSpace = GetParam(); + auto gpuAddressSpace = 48; // 48 bit CPU VA - do not reserve CPU address range, use [0x800000000000-0xFFFFFFFFFFFF] CpuInfoOverrideVirtualAddressSizeAndFlags overrideCpuInfo(48); @@ -618,12 +618,12 @@ TEST_P(GfxPartitionOn57bTest, given48bitCpuAddressWidthWhenInitializingGfxPartit verifyHeaps(0x800000000000, 0x1000000000000, 0x7FFFFFFFFFFF, gpuAddressSpace == 57); } -TEST_P(GfxPartitionOn57bTest, given57bitCpuAddressWidthAndLa57IsNotPresentWhenInitializingGfxPartitionThenDoNotReserve48bitSpaceForDriverAllocations) { +TEST_F(GfxPartitionOn57bTest, given57bitCpuAddressWidthAndLa57IsNotPresentWhenInitializingGfxPartitionThenDoNotReserve48bitSpaceForDriverAllocations) { if (is32bit) { GTEST_SKIP(); } - auto gpuAddressSpace = GetParam(); + auto gpuAddressSpace = 57; // 57 bit CPU VA, la57 is not present - do not reserve CPU address range, use [0x800000000000-0xFFFFFFFFFFFF] CpuInfoOverrideVirtualAddressSizeAndFlags overrideCpuInfo(57); diff --git a/shared/test/unit_test/memory_manager/local_memory_usage_tests.cpp b/shared/test/unit_test/memory_manager/local_memory_usage_tests.cpp index 7e271e78ee..303aada03e 100644 --- a/shared/test/unit_test/memory_manager/local_memory_usage_tests.cpp +++ b/shared/test/unit_test/memory_manager/local_memory_usage_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2023 Intel Corporation + * Copyright (C) 2019-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,7 +10,7 @@ #include "shared/source/memory_manager/local_memory_usage.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "third_party/gtest/gtest/gtest.h" +#include "gtest/gtest.h" namespace NEO { diff --git a/shared/test/unit_test/os_interface/linux/drm_os_memory_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_os_memory_tests.cpp index ea58bb6b78..a3320983bc 100644 --- a/shared/test/unit_test/os_interface/linux/drm_os_memory_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_os_memory_tests.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2024 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/helpers/array_count.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/file_io.h" #include "shared/source/os_interface/linux/os_inc.h" @@ -115,7 +116,7 @@ TEST(OSMemoryLinux, GivenProcSelfMapsFileExistsWhenGetMemoryMapsIsQueriedThenVal {0x564fcd1fa000, 0x564fcd202000}, {0x564fcd401000, 0x564fcd402000}, {0x564fcd402000, 0x564fcd403000}, {0x564fcdf40000, 0x564fcdf61000}, {0x7fded3d79000, 0x7fded4879000}, {0x7fded4879000, 0x7fded4a60000}, {0x7fded4a60000, 0x7fded4c60000}, {0x7fded4c60000, 0x7fded4c64000}, {0x7fded4c64000, 0x7fded4c66000}, {0x7fded4c66000, 0x7fded4c6a000}, {0x7fded4c6a000, 0x7fded4c91000}, {0x7fded4e54000, 0x7fded4e78000}, {0x7fded4e91000, 0x7fded4e92000}, {0x7fded4e92000, 0x7fded4e93000}, {0x7fded4e93000, 0x7fded4e94000}, {0x7ffd6dfa2000, 0x7ffd6dfc3000}, {0x7ffd6dfe8000, 0x7ffd6dfeb000}, {0x7ffd6dfeb000, 0x7ffd6dfec000}, {0xffffffffff600000, 0xffffffffff601000}}; EXPECT_FALSE(memoryMaps.empty()); - EXPECT_EQ(memoryMaps.size(), GTEST_ARRAY_SIZE_(referenceMaps)); + EXPECT_EQ(memoryMaps.size(), arrayCount(referenceMaps)); for (size_t i = 0; i < memoryMaps.size(); ++i) { EXPECT_EQ(memoryMaps[i].start, referenceMaps[i].start);