mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-21 10:33:07 +08:00
test: don't use product specific ioctl helper in generic tests
Related-To: NEO-13527 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c5d541dd81
commit
e7a8936d70
@@ -239,6 +239,8 @@ std::unique_ptr<DrmMockCustom> DrmMockCustom::create(RootDeviceEnvironment &root
|
||||
}
|
||||
|
||||
std::unique_ptr<DrmMockCustom> DrmMockCustom::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.IgnoreProductSpecificIoctlHelper.set(true);
|
||||
auto drm{new DrmMockCustom{std::move(hwDeviceId), rootDeviceEnvironment}};
|
||||
|
||||
drm->reset();
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/os_interface/linux/drm_memory_manager.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/mocks/linux/mock_drm_wrappers.h"
|
||||
|
||||
@@ -64,6 +65,9 @@ class DrmMockSuccess : public Drm {
|
||||
public:
|
||||
using Drm::setupIoctlHelper;
|
||||
DrmMockSuccess(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(fd, mockPciPath), rootDeviceEnvironment) {
|
||||
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.IgnoreProductSpecificIoctlHelper.set(true);
|
||||
setupIoctlHelper(NEO::defaultHwInfo->platform.eProductFamily);
|
||||
}
|
||||
|
||||
@@ -73,6 +77,8 @@ class DrmMockSuccess : public Drm {
|
||||
class DrmMockFail : public Drm {
|
||||
public:
|
||||
DrmMockFail(RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(mockFd, mockPciPath), rootDeviceEnvironment) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.IgnoreProductSpecificIoctlHelper.set(true);
|
||||
setupIoctlHelper(NEO::defaultHwInfo->platform.eProductFamily);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
@@ -32,6 +33,8 @@ Drm **pDrmToReturnFromCreateFunc = nullptr;
|
||||
bool disableBindDefaultInTests = true;
|
||||
|
||||
Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.IgnoreProductSpecificIoctlHelper.set(true);
|
||||
rootDeviceEnvironment.setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
if (pDrmToReturnFromCreateFunc) {
|
||||
return *pDrmToReturnFromCreateFunc;
|
||||
|
||||
Reference in New Issue
Block a user