tst: FlushAndPurgeOnCleanup: testing

This commit is contained in:
Bill Zissimopoulos
2018-04-19 10:23:15 -07:00
parent 5c3549c6eb
commit 740411d604
7 changed files with 28 additions and 8 deletions

View File

@ -36,7 +36,9 @@ void *memfs_start_ex(ULONG Flags, ULONG FileInfoTimeout)
NTSTATUS Result;
Result = MemfsCreateFunnel(
(OptCaseInsensitive ? MemfsCaseInsensitive : 0) | Flags,
Flags |
(OptCaseInsensitive ? MemfsCaseInsensitive : 0) |
(OptFlushAndPurgeOnCleanup ? MemfsFlushAndPurgeOnCleanup : 0),
FileInfoTimeout,
1024,
1024 * 1024,

View File

@ -33,6 +33,7 @@ BOOLEAN OptResilient = FALSE;
BOOLEAN OptCaseInsensitiveCmp = FALSE;
BOOLEAN OptCaseInsensitive = FALSE;
BOOLEAN OptCaseRandomize = FALSE;
BOOLEAN OptFlushAndPurgeOnCleanup = FALSE;
WCHAR OptOplock = 0;
WCHAR OptMountPointBuf[MAX_PATH], *OptMountPoint;
WCHAR OptShareNameBuf[MAX_PATH], *OptShareName, *OptShareTarget;
@ -241,6 +242,11 @@ int main(int argc, char *argv[])
OptCaseInsensitiveCmp = TRUE;
rmarg(argv, argc, argi);
}
else if (0 == strcmp("--flush-and-purge-on-cleanup", a))
{
OptFlushAndPurgeOnCleanup = TRUE;
rmarg(argv, argc, argi);
}
else if (0 == strcmp("--oplock=batch", a))
{
OptOplock = 'B';

View File

@ -154,6 +154,7 @@ extern BOOLEAN OptResilient;
extern BOOLEAN OptCaseInsensitiveCmp;
extern BOOLEAN OptCaseInsensitive;
extern BOOLEAN OptCaseRandomize;
extern BOOLEAN OptFlushAndPurgeOnCleanup;
extern WCHAR OptOplock;
extern WCHAR OptMountPointBuf[], *OptMountPoint;
extern WCHAR OptShareNameBuf[], *OptShareName, *OptShareTarget;