mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-31 03:58:38 -05:00 
			
		
		
		
	tools: run-tests: leak-test
This commit is contained in:
		| @@ -51,6 +51,7 @@ for %%f in (^ | |||||||
|     :winfstest-memfs-x64-net ^ |     :winfstest-memfs-x64-net ^ | ||||||
|     :winfstest-memfs-x86-disk ^ |     :winfstest-memfs-x86-disk ^ | ||||||
|     :winfstest-memfs-x86-net ^ |     :winfstest-memfs-x86-net ^ | ||||||
|  |     :leak-test ^ | ||||||
|     ) do ( |     ) do ( | ||||||
|     echo === Running %%f |     echo === Running %%f | ||||||
|  |  | ||||||
| @@ -239,3 +240,33 @@ P: | |||||||
| call "%ProjRoot%\ext\test\winfstest\run-winfstest.bat" | call "%ProjRoot%\ext\test\winfstest\run-winfstest.bat" | ||||||
| if !ERRORLEVEL! neq 0 goto fail | if !ERRORLEVEL! neq 0 goto fail | ||||||
| exit /b 0 | exit /b 0 | ||||||
|  |  | ||||||
|  | :leak-test | ||||||
|  | for /F "tokens=1,2 delims=:" %%i in ('verifier /query ^| findstr ^ | ||||||
|  |     /c:"Current Pool Allocations:" ^ | ||||||
|  |     /c:"CurrentPagedPoolAllocations:" ^ | ||||||
|  |     /c:"CurrentNonPagedPoolAllocations:"' | ||||||
|  |     ) do ( | ||||||
|  |  | ||||||
|  |     set FieldName=%%i | ||||||
|  |     set FieldName=!FieldName: =! | ||||||
|  |  | ||||||
|  |     set FieldValue=%%j | ||||||
|  |     set FieldValue=!FieldValue: =! | ||||||
|  |     set FieldValue=!FieldValue:^(=! | ||||||
|  |     set FieldValue=!FieldValue:^)=! | ||||||
|  |  | ||||||
|  |     if X!FieldName!==XCurrentPoolAllocations ( | ||||||
|  |         for /F "tokens=1,2 delims=/" %%k in ("!FieldValue!") do ( | ||||||
|  |             set NonPagedAlloc=%%k | ||||||
|  |             set PagedAlloc=%%l | ||||||
|  |         ) | ||||||
|  |     ) else if X!FieldName!==XCurrentPagedPoolAllocations ( | ||||||
|  |         set PagedAlloc=%%j | ||||||
|  |     ) else if X!FieldName!==XCurrentNonPagedPoolAllocations ( | ||||||
|  |         set NonPagedAlloc=%%j | ||||||
|  |     ) | ||||||
|  | ) | ||||||
|  | if !PagedAlloc! neq 0 goto fail | ||||||
|  | if !NonPagedAlloc! neq 0 goto fail | ||||||
|  | exit /b 0 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user