mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Fix for setting context flags in AubDump
Change-Id: Ia5fba17aac19fbcbfa6676557d1af0889f538b90
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include "runtime/helpers/basic_math.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
||||
#include "unit_tests/mocks/mock_lrca_helper.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
@ -127,15 +128,6 @@ HWTEST_F(AubHelperHwTest, GivenEnabledLocalMemoryWhenGetMemTraceForPtEntryIsCall
|
||||
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
|
||||
}
|
||||
|
||||
struct MockLrcaHelper : AubMemDump::LrcaHelper {
|
||||
mutable uint32_t setContextSaveRestoreFlagsCalled = 0;
|
||||
MockLrcaHelper(uint32_t base) : AubMemDump::LrcaHelper(base) {}
|
||||
void setContextSaveRestoreFlags(uint32_t &value) const override {
|
||||
setContextSaveRestoreFlagsCalled++;
|
||||
AubMemDump::LrcaHelper::setContextSaveRestoreFlags(value);
|
||||
}
|
||||
};
|
||||
|
||||
HWTEST_F(AubHelperHwTest, giverLrcaHelperWhenContextIsInitializedThenContextFlagsAreSet) {
|
||||
const auto &csTraits = CommandStreamReceiverSimulatedCommonHw<FamilyType>::getCsTraits(EngineType::ENGINE_RCS);
|
||||
MockLrcaHelper lrcaHelper(csTraits.mmioBase);
|
||||
@ -144,4 +136,4 @@ HWTEST_F(AubHelperHwTest, giverLrcaHelperWhenContextIsInitializedThenContextFlag
|
||||
|
||||
lrcaHelper.initialize(lrcaBase.get());
|
||||
ASSERT_NE(0u, lrcaHelper.setContextSaveRestoreFlagsCalled);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user