Share via


Oplocks Test

This automated test verifies the basic behavior of legacy opportunistic locks (oplocks) and enhanced oplocks. The legacy oplocks are Level2 (L2), Level1 (L1), Filter, and Batch. The enhanced oplocks are Read (R), Read-Write (RW), Read-Handle (RH), and Read-Write-Handle (RWH).

Note  

For more information about the behavior of file systems (including oplocks), see File System Behavior in the Microsoft Windows Environment.

 

The test runs variations for each of the six partitions that are described in the Requirements section.

This test has the following variations:

  • Legacy_Acquire_Release. Acquire a legacy oplock and then release it.

  • Enhanced_Acquire_Release. Acquire an enhanced oplock and then release it.

  • Enhanced_Acquire_Release_Opkey. Acquire an enhanced oplock by using an oplock key.

  • Legacy_Break_L2. Break an L2 oplock with various file operations.

  • Enhanced_Break_R. Break an R oplock with various file operations.

  • Legacy_Break_L1. Break an L1 oplock with various file operations.

  • Enhanced_Break_RW. Break an RW oplock with various file operations.

  • Enhanced_Break_RH. Break an RH oplock with various file operations.

  • Legacy_Break_Batch. Break a Batch oplock with various file operations.

  • Enhanced_Break_RWH. Break an RWH oplock with various file operations.

  • EnhancedMultipleSharedOplocks. Acquire multiple enhanced oplocks on the same file.

  • EnhancedUpgradeOplocks. Upgrade an enhanced oplock.

  • EnhancedOplockBreakAckOtherHandle. Acknowledge an enhanced oplock break on another handle that opened via the same key.

  • EnhancedOplockStealthUpgrade. Acknowledge an oplock break and request an upgrade-level oplock.

  • AtomicOplocksVariation. Atomic open (open a handle by using CreatOptions=FILE_OPEN_REQUIRING_OPLOCK).

  • AtomicOplocksNonIntrusiveVariation. Atomic open when an oplock already exists on the file.

  • BreakingRHOplocks. Conduct special operations to break an RH oplock.

Test details

Associated requirements

Filter.Driver.AntiVirus.MiniFilter Filter.Driver.FileSystem.Functionality Filter.Driver.FileSystem.MiniFilter

See the filter hardware requirements.

Platforms

Windows 8 (x64) Windows 8 (x86) Windows Server 2012 (x64) Windows 8.1 x64 Windows 8.1 x86 Windows Server 2012 R2

Expected run time

~540 minutes

Categories

Certification

Type

Automated

 

Running the test

For more information about requirements, see File System Testing Prerequisites.

In addition, this test requires the following extra hard drive space for four simple 2,048-megabyte (MB) partitions and two simple 1,024-MB partitions.

Before you run the test, you must add the following partitions.

Label File system Size Expected drive letter

NTFS

NTFS

2,048 MB

g:

CNTFS

NTFS (compressed)

2,048 MB

i:

FAT

FAT16

1,024 MB

k:

FAT32

FAT32

1,024 MB

l:

ExFAT

ExFAT

2,048 MB

m:

UDF

UDF

2,048 MB

n:

REFS

REFS

10240mb

o:

 

Note  

RunFileIO.cmd contains references to environment variables that you can change to allow for skipping of certain file systems.

 

Troubleshooting

For troubleshooting information, see Troubleshooting File System Testing.

All test cases return Pass or Fail. To review test case details, review the test log from Windows Hardware Certification Kit (Windows HCK) Studio.

To run this test, make sure that the computer has NTFS, CNTFS, FAT16, FAT32, ExFAT, and UDF volumes set up. Also, make sure that the drive letter for this volume is entered in the <filesystem>_DRIVE_LETTER parameters.

More information

Command syntax

Command option Description

runkarr %DRIVE_1% %DRIVE_2% -bvt

Requires two drive letters and the appropriate bvt parameter.

 

Note  

For command-line help for this test binary, type /h.

 

File list

File Location

Enhancedoplocks.exe

<[testbinroot]>\NTTest\BASETEST\core_file_services\Shared_Tests\Regression\Oplocks\

Opkey.inf

<[testbinroot]>\NTTest\BASETEST\core_file_services\FilterManager\

Opkey.sys

<[testbinroot]>\NTTest\BASETEST\core_file_services\FilterManager\

RunOplocks.cmd

<[testbinroot]>\NTTest\BASETEST\Core_File_Services\FilterManager\TestSuite\Scripts\FileSystems\

WrapOplocks.cmd

<[testbinroot]>\NTTest\BASETEST\Core_File_Services\FilterManager\TestSuite\Scripts\FileSystems\

 

 

 

Send comments about this topic to Microsoft