Syscache (SYSTEM)
This is a data validation test that runs on the system volume. It writes to a file and verifies that the data written is read back correctly. It can detect corruptions caused by anything in the path from firmware, drivers, file system, memory, etc. It uses standard Win32 file system and memory management APIs to read and write data from the file.
Test details
Associated requirements |
System.Fundamentals.StorageAndBoot.BootPerformance |
Platforms |
Windows RT (ARM-based) Windows 8 (x86) Windows RT 8.1 Windows 8.1 x64 Windows 8.1 x86 |
Expected run time |
~15 minutes |
Categories |
Certification Reliability |
Type |
Automated |
Running the test
Before you run the test, complete the test setup as described in the test requirements: WDTF System Fundamentals Testing Prerequisites.
Troubleshooting
For troubleshooting information, see Troubleshooting System Fundamentals Testing.
When the test fails, the log contains all of the information you need to analyze the failure. Look for the following information to reproduce the error:
The "Write Attribute". Look up the table of write attributes to find how the data was written to the file.
The "Read Attribute". Look up the table of read attributes to find out how the data was read back from the file.
The offset at which the error occurred.
The region of the file in which the error occurred. The test typically writes entire region using a single write (with the exception of the FILE_FLAG_SECTOR_CHUNKS option, where it writes one sector at a time).
More information
Syscache opens a file with a certain flag/attribute and writes to the file. Each chosen flag may span several runs on the file.
A run is defined as a set of the following sequence:
Create/open a file.
Truncate the file size to 0.
Write to the file.
Close the file.
Open the file again.
Read the file.
Verify the contents of the file.
Close the file.
There is a set of zero and non-zero regions in the file. Zero regions are areas in the file where no data was written. Non-zero regions are areas in the file where data was written. The pattern is a DWORD of the format RRPPPPPP. The top two bytes are the run number, and the next 3 bytes are the one's complement of the offset of this DWORD in the file.
The following attributes are used for writing a file:
Write attribute | Explanation |
---|---|
FILE_ATTRIBUTE_NORMAL |
See CreateFile function. |
FILE_FLAG_SEQUENTIAL_SCAN |
See CreateFile function. |
FILE_FLAG_NO_BUFFERING |
See CreateFile function. |
FILE_FLAG_WRITE_THROUGH |
See CreateFile function. |
FILE_ATTRIBUTE_TEMPORARY |
See CreateFile function. |
NO_BUFFERING | WRITE_THROUGH |
See CreateFile function. |
FILE_ATTRIBUTE_SPARSE_FILE |
The file is set to sparse. |
NORMAL APPEND_WRITE |
Same as FILE_ATTRIBUTE_NORMAL; closes and reopening the file per write and appending the next region. |
FILE_FLAG_SECTOR_CHUNKS |
Same as FILE_FLAG_NO_BUFFERING, data is written one sector at a time. |
FILE_MAP |
Same as FILE_ATTRIBUTE_NORMAL, data is written via memory mapping. |
FILE_FLAG_OVEREXTEND |
Same as FILE_ATTRIBUTE_NORMAL, data is written via memory mapping |
The following attributes are used for reading from the file:
Read attribute | Explanation |
---|---|
FILE_MAP |
FILE_ATTRIBUTE_NORMAL, data is read via memory mapping |
NO_BUFFERING |
FILE_FLAG_NO_BUFFERING |
NORMAL |
FILE_ATTRIBUTE_NORMAL |
RANDOM_ACCESS |
FILE_FLAG_RANDOM_ACCESS |
SEQUENTIAL_SCAN |
FILE_FLAG_SEQUENTIAL_SCAN |
TEMPORARY |
FILE_FLAG_TEMPORARY |
WRITE_THROUGH |
FILE_FLAG_WRITE_THROUGH |
Command syntax
Command | Description |
---|---|
readwrit.exe -n 10 -d /logfile Syscache.log |
Runs the test. |
File list
File | Location |
---|---|
readwrit.exe |
<[testbinroot]>\NTTest\BASETEST\core_file_services\cachemgr\ |
ntlog.dll |
<[osbinroot]>\NTTest\CommonTest\NtLog\ |
ntlogger.ini |
<[osbinroot]>\NTTest\CommonTest\NtLog\ |
stresslog.dll |
<[testbinroot]>\NTTest\basetest\core_file_services\shared_libs\ |