Skip to content

Commit be8545f

Browse files
refactor: reset all waitpkg variables on test start
Signed-off-by: Lukasz Jobczyk <[email protected]>
1 parent dacbce7 commit be8545f

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

shared/source/utilities/wait_util.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ namespace NEO {
1414

1515
namespace WaitUtils {
1616

17-
constexpr uint64_t defaultCounterValue = 10000;
18-
constexpr uint32_t defaultControlValue = 0;
19-
2017
uint64_t waitpkgCounterValue = defaultCounterValue;
2118
uint32_t waitpkgControlValue = defaultControlValue;
2219

shared/source/utilities/wait_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ namespace NEO {
1717

1818
namespace WaitUtils {
1919

20+
constexpr uint64_t defaultCounterValue = 10000;
21+
constexpr uint32_t defaultControlValue = 0;
2022
constexpr uint32_t defaultWaitCount = 1u;
2123

2224
extern uint64_t waitpkgCounterValue;

shared/test/common/base_ult_config_listener.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ extern unsigned int testCaseMaxTimeInMs;
2222

2323
void BaseUltConfigListener::OnTestStart(const ::testing::TestInfo &) {
2424
WaitUtils::waitpkgUse = false;
25+
WaitUtils::waitpkgCounterValue = WaitUtils::defaultCounterValue;
26+
WaitUtils::waitpkgControlValue = WaitUtils::defaultControlValue;
27+
WaitUtils::waitCount = WaitUtils::defaultWaitCount;
28+
2529
maxOsContextCountBackup = MemoryManager::maxOsContextCount;
2630
debugVarSnapshot = debugManager.flags;
2731
injectFcnSnapshot = debugManager.injectFcn;

0 commit comments

Comments
 (0)