Add cl_khr_device_uuid to extension list

Related-To: NEO-5681

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
Baj, Tomasz
2022-05-11 14:08:18 +00:00
committed by Compute-Runtime-Automation
parent d5b2f03dc4
commit b450d3c20b
23 changed files with 362 additions and 51 deletions

View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(UNIX)
target_sources(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/neo_device_linux_tests.cpp
)
endif()
add_subdirectories()

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/device/device.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/test_macros/test.h"
using DeviceTest = Test<DeviceFixture>;
TEST_F(DeviceTest, GivenDeviceWhenGetAdapterLuidThenLuidIsNotSet) {
std::array<uint8_t, HwInfoConfig::luidSize> luid, expectedLuid;
expectedLuid.fill(-1);
luid = expectedLuid;
pDevice->getAdapterLuid(luid);
EXPECT_EQ(expectedLuid, luid);
}
TEST_F(DeviceTest, GivenDeviceWhenVerifyAdapterLuidThenFalseIsReturned) {
EXPECT_FALSE(pDevice->verifyAdapterLuid());
}
TEST_F(DeviceTest, GivenDeviceWhenGetAdapterMaskThenMaskIsNotSet) {
uint32_t nodeMask = 0x1234u;
pDevice->getAdapterMask(nodeMask);
EXPECT_EQ(nodeMask, 0x1234u);
}
TEST_F(DeviceTest, GivenCallBaseVerifyAdapterLuidWhenGetAdapterMaskThenMaskIsSet) {
uint32_t nodeMask = 0x1234u;
pDevice->callBaseVerifyAdapterLuid = false;
pDevice->getAdapterMask(nodeMask);
EXPECT_EQ(nodeMask, 1u);
}