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

   
Specifications
  • System.Fundamentals.StorageAndBoot.BootPerformance
Platforms
  • Windows 10, client editions (x86)
  • Windows 10, client editions (x64)
Supported Releases
  • Windows 10
  • Windows 10, version 1511
  • Windows 10, version 1607
  • Windows 10, version 1703
  • Windows 10, version 1709
  • Windows 10, version 1803
  • Windows 10, version 1809
  • Windows 10, version 1903
  • Next update to Windows 10
Expected run time (in minutes) 15
Category Scenario
Timeout (in minutes) 900
Requires reboot false
Requires special configuration false
Type automatic

 

Additional documentation

Tests in this feature area might have additional documentation, including prerequisites, setup, and troubleshooting information, that can be found in the following topic(s):

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 generic troubleshooting of HLK test failures, see Troubleshooting Windows HLK Test Failures.

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](/windows/win32/api/fileapi/nf-fileapi-createfilea).

FILE_FLAG_SEQUENTIAL_SCAN

See [CreateFile function](/windows/win32/api/fileapi/nf-fileapi-createfilea).

FILE_FLAG_NO_BUFFERING

See [CreateFile function](/windows/win32/api/fileapi/nf-fileapi-createfilea).

FILE_FLAG_WRITE_THROUGH

See [CreateFile function](/windows/win32/api/fileapi/nf-fileapi-createfilea).

FILE_ATTRIBUTE_TEMPORARY

See [CreateFile function](/windows/win32/api/fileapi/nf-fileapi-createfilea).

NO_BUFFERING | WRITE_THROUGH

See [CreateFile function](/windows/win32/api/fileapi/nf-fileapi-createfilea).

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\

 

Parameters

Parameter name Parameter description
LLU_NetAccessOnly