mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
Add missing ULTs for driverHandleImp
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
232640afc3
commit
484dea027c
@@ -235,7 +235,7 @@ ze_result_t DriverHandleImp::getDevice(uint32_t *pCount, ze_device_handle_t *phD
|
||||
}
|
||||
|
||||
if (phDevices == nullptr) {
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < *pCount; i++) {
|
||||
|
||||
@@ -460,6 +460,19 @@ TEST_F(DriverHandleTest, givenInitializedDriverWhenGetDeviceIsCalledThenOneDevic
|
||||
EXPECT_NE(nullptr, &device);
|
||||
}
|
||||
|
||||
TEST_F(DriverHandleTest, whenQueryingForApiVersionThenExpectedVersionIsReturned) {
|
||||
ze_api_version_t version = {};
|
||||
ze_result_t result = driverHandle->getApiVersion(&version);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_EQ(ZE_API_VERSION_1_1, version);
|
||||
}
|
||||
|
||||
TEST_F(DriverHandleTest, whenQueryingForDevicesWithCountGreaterThanZeroAndNullDevicePointerThenNullHandleIsReturned) {
|
||||
uint32_t count = 1;
|
||||
ze_result_t result = driverHandle->getDevice(&count, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_NULL_HANDLE, result);
|
||||
}
|
||||
|
||||
TEST_F(DriverHandleTest, givenValidDriverHandleWhenGetSvmAllocManagerIsCalledThenSvmAllocsManagerIsObtained) {
|
||||
auto svmAllocsManager = driverHandle->getSvmAllocsManager();
|
||||
EXPECT_NE(nullptr, svmAllocsManager);
|
||||
|
||||
Reference in New Issue
Block a user