tools: run-tests: FlushAndPurgeOnCleanup

This commit is contained in:
Bill Zissimopoulos 2018-04-19 11:17:41 -07:00
parent 740411d604
commit 5b72b4ad4a
No known key found for this signature in database
GPG Key ID: 3D4F95D52C7B3EA3
2 changed files with 16 additions and 2 deletions

View File

@ -31,6 +31,7 @@ cd R: >nul 2>nul || (echo === Unable to find drive R: >&2 & goto fail)
set dfl_tests=^
winfsp-tests-x64 ^
winfsp-tests-x64-case-randomize ^
winfsp-tests-x64-flushpurge ^
winfsp-tests-x64-mountpoint-drive ^
winfsp-tests-x64-mountpoint-dir ^
winfsp-tests-x64-no-traverse ^
@ -48,6 +49,7 @@ set dfl_tests=^
fscrash-x64 ^
winfsp-tests-x86 ^
winfsp-tests-x86-case-randomize ^
winfsp-tests-x86-flushpurge ^
winfsp-tests-x86-mountpoint-drive ^
winfsp-tests-x86-mountpoint-dir ^
winfsp-tests-x86-no-traverse ^
@ -167,6 +169,11 @@ winfsp-tests-x64 --case-randomize
if !ERRORLEVEL! neq 0 goto fail
exit /b 0
:winfsp-tests-x64-flushpurge
winfsp-tests-x64 --flush-and-purge-on-cleanup
if !ERRORLEVEL! neq 0 goto fail
exit /b 0
:winfsp-tests-x64-mountpoint-drive
winfsp-tests-x64 --mountpoint=X: --resilient
if !ERRORLEVEL! neq 0 goto fail
@ -197,6 +204,11 @@ winfsp-tests-x86 --case-randomize
if !ERRORLEVEL! neq 0 goto fail
exit /b 0
:winfsp-tests-x86-flushpurge
winfsp-tests-x86 --flush-and-purge-on-cleanup
if !ERRORLEVEL! neq 0 goto fail
exit /b 0
:winfsp-tests-x86-mountpoint-drive
winfsp-tests-x86 --mountpoint=X: --resilient
if !ERRORLEVEL! neq 0 goto fail

View File

@ -304,12 +304,14 @@ static void exec_rename_dir_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTime
ASSERT(CreateDirectoryW(Dir1Path, 0));
ExecHelper(FilePath, 1000, &Process);
ExecHelper(FilePath, 2000, &Process);
Sleep(1000); /* give time for file handles to be closed (FlushAndPurgeOnCleanup) */
ASSERT(MoveFileExW(Dir1Path, Dir2Path, MOVEFILE_REPLACE_EXISTING));
ASSERT(MoveFileExW(Dir2Path, Dir1Path, MOVEFILE_REPLACE_EXISTING));
WaitHelper(Process, 1000);
WaitHelper(Process, 2000);
ASSERT(DeleteFileW(FilePath));