tst: winfsp-tests: refactor hooks

This commit is contained in:
Bill Zissimopoulos
2016-10-26 12:02:30 -07:00
parent b072a1f0da
commit 0532cee99c
5 changed files with 219 additions and 181 deletions

View File

@ -17,12 +17,16 @@
#include <windows.h>
void *memfs_start_ex(ULONG Flags, ULONG FileInfoTimeout);
void *memfs_start(ULONG Flags);
void memfs_stop(void *data);
PWSTR memfs_volumename(void *data);
#define ABORT(s)\
do\
{\
void tlib_printf(const char *fmt, ...);\
tlib_printf("ABORT: %s: %s\n", __func__, s);\
abort();\
} while (0,0)
int mywcscmp(PWSTR a, int alen, PWSTR b, int blen);
#define testalpha(c) ('a' <= ((c) | 0x20) && ((c) | 0x20) <= 'z')
#define togglealpha(c) ((c) ^ 0x20)
#define CreateFileW HookCreateFileW
#define CloseHandle HookCloseHandle
@ -58,6 +62,14 @@ typedef struct
BOOLEAN Disposition;
} MY_FILE_DISPOSITION_INFO;
void *memfs_start_ex(ULONG Flags, ULONG FileInfoTimeout);
void *memfs_start(ULONG Flags);
void memfs_stop(void *data);
PWSTR memfs_volumename(void *data);
int mywcscmp(PWSTR a, int alen, PWSTR b, int blen);
int myrand(void);
extern int NtfsTests;
extern int WinFspDiskTests;
extern int WinFspNetTests;