mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Debug flag to force early exit
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
16db7cc890
commit
6e9257c623
@@ -29,6 +29,7 @@ struct MockDrmCsr : public DrmCommandStreamReceiver<GfxFamily> {
|
||||
using DrmCommandStreamReceiver<GfxFamily>::dispatchMode;
|
||||
using DrmCommandStreamReceiver<GfxFamily>::completionFenceValuePointer;
|
||||
using DrmCommandStreamReceiver<GfxFamily>::flushInternal;
|
||||
using DrmCommandStreamReceiver<GfxFamily>::CommandStreamReceiver::taskCount;
|
||||
};
|
||||
|
||||
class DrmCommandStreamTest : public ::testing::Test {
|
||||
|
||||
@@ -31,7 +31,9 @@ uint32_t closeFuncCalled = 0u;
|
||||
int closeFuncArgPassed = 0;
|
||||
int closeFuncRetVal = 0;
|
||||
int dlOpenFlags = 0;
|
||||
bool dlOpenCalled = 0;
|
||||
int latestExitCode = 0;
|
||||
bool exitCalled = false;
|
||||
bool dlOpenCalled = false;
|
||||
bool getNumThreadsCalled = false;
|
||||
bool makeFakeDevicePath = false;
|
||||
bool allowFakeDevicePath = false;
|
||||
@@ -66,6 +68,11 @@ int (*sysCallsPipe)(int pipeFd[2]) = nullptr;
|
||||
int (*sysCallsFstat)(int fd, struct stat *buf) = nullptr;
|
||||
char *(*sysCallsRealpath)(const char *path, char *buf) = nullptr;
|
||||
|
||||
void exit(int code) {
|
||||
exitCalled = true;
|
||||
latestExitCode = code;
|
||||
}
|
||||
|
||||
int close(int fileDescriptor) {
|
||||
closeFuncCalled++;
|
||||
closeFuncArgPassed = fileDescriptor;
|
||||
|
||||
@@ -33,6 +33,8 @@ extern int passedFileDescriptorFlagsToSet;
|
||||
extern int getFileDescriptorFlagsCalled;
|
||||
extern int setFileDescriptorFlagsCalled;
|
||||
extern uint32_t closeFuncCalled;
|
||||
extern bool exitCalled;
|
||||
extern int latestExitCode;
|
||||
|
||||
extern std::vector<void *> mmapVector;
|
||||
extern std::vector<void *> mmapCapturedExtendedPointers;
|
||||
|
||||
Reference in New Issue
Block a user