mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 14:33:04 +08:00
Test closing GEM worker is blocking during cleanup
Added test checking if closing GEM worker during DRM memory manager clean up is blocking. Related-To: NEO-6213 Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dc534c84d7
commit
af7cb3ff35
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -124,4 +124,20 @@ class TestedDrmMemoryManager : public MemoryManagerCreate<DrmMemoryManager> {
|
||||
bool alignedMallocShouldFail = false;
|
||||
size_t alignedMallocSizeRequired = 0u;
|
||||
};
|
||||
|
||||
struct MockDrmGemCloseWorker : DrmGemCloseWorker {
|
||||
using DrmGemCloseWorker::DrmGemCloseWorker;
|
||||
|
||||
void close(bool blocking) override {
|
||||
wasBlocking = blocking;
|
||||
DrmGemCloseWorker::close(blocking);
|
||||
}
|
||||
bool wasBlocking = false;
|
||||
};
|
||||
|
||||
struct MockDrmMemoryManager : DrmMemoryManager {
|
||||
using DrmMemoryManager::DrmMemoryManager;
|
||||
using DrmMemoryManager::gemCloseWorker;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user