Add mock function to check for page fault support

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2021-11-18 16:06:26 +00:00
committed by Compute-Runtime-Automation
parent 7ea0a11c0a
commit b8aa2871bd
3 changed files with 6 additions and 2 deletions

View File

@@ -173,7 +173,7 @@ class Drm : public DriverModel {
MOCKABLE_VIRTUAL bool registerResourceClasses();
MOCKABLE_VIRTUAL void queryPageFaultSupport();
bool hasPageFaultSupport() const;
MOCKABLE_VIRTUAL bool hasPageFaultSupport() const;
MOCKABLE_VIRTUAL uint32_t registerResource(ResourceClass classType, const void *data, size_t size);
MOCKABLE_VIRTUAL void unregisterResource(uint32_t handle);

View File

@@ -141,7 +141,7 @@ void Drm::queryPageFaultSupport() {
}
bool Drm::hasPageFaultSupport() const {
return pageFaultSupported;
return false;
}
} // namespace NEO

View File

@@ -112,6 +112,10 @@ class DrmMock : public Drm {
queryPageFaultSupportCalled = true;
}
bool hasPageFaultSupport() const override {
return pageFaultSupported;
}
static const int mockFd = 33;
bool failRetTopology = false;