mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 11:03:02 +08:00
- Move Engine type to OsContext - Move OsContext to CSR - Improve EngineMapper logic - CompletionStamp cleanup Change-Id: I935cb7169c8c48cd09837e20e3da06f6dd3437b9 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
33 lines
916 B
C++
33 lines
916 B
C++
/*
|
|
* Copyright (C) 2017-2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/os_interface/linux/os_context_linux.h"
|
|
#include "runtime/os_interface/linux/os_interface.h"
|
|
#include "unit_tests/os_interface/linux/drm_mock.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
namespace OCLRT {
|
|
|
|
TEST(OsInterfaceTest, GivenLinuxWhenare64kbPagesEnabledThenFalse) {
|
|
EXPECT_FALSE(OSInterface::are64kbPagesEnabled());
|
|
}
|
|
|
|
TEST(OsInterfaceTest, GivenLinuxOsInterfaceWhenDeviceHandleQueriedthenZeroIsReturned) {
|
|
OSInterface osInterface;
|
|
EXPECT_EQ(0u, osInterface.getDeviceHandle());
|
|
}
|
|
|
|
TEST(OsContextTest, givenDrmWhenOsContextIsCreatedThenImplIsAvailable) {
|
|
DrmMock drmMock;
|
|
OSInterface osInterface;
|
|
osInterface.get()->setDrm(&drmMock);
|
|
|
|
auto osContext = std::make_unique<OsContext>(&osInterface, 0u, gpgpuEngineInstances[0]);
|
|
EXPECT_NE(nullptr, osContext->get());
|
|
}
|
|
} // namespace OCLRT
|