MS-FSA Protocol Server Test Design Specification

March 25, 2024 · View on GitHub

Contents

Introduction

This document provides information about how MS-FSA test suite is designed to test the usability and accuracy of MS-FSA technical document. It gives the analysis of MS-FSA technical document content, and describes test assumptions, scope and constraints of the test suite. It also specifies test approach, test scenarios, detail test cases, test suite architecture and adapter design.

MS-FSA Overview

MS-FSA is an algorithm technical document, with detail algorithm implementation. Below diagram shows the basic 11 operations for MS-FSA.

image6.png

Test Approach

In MS-FSA test suite, MBT test method and traditional approach will work together.

  • MBT

    Model-based test will mostly cover the return codes for the algorithm operations.

  • Traditional

    Traditional test is used to cover some negative test cases, and the object store changes during operations, and make sure if-conditions are covered.

    This document will cover only traditional scenarios and test cases.

Test Suite Overview

The following flow chart shows the overview for MS-FSA test suite design.

image7.png

Test initialization and cleanup

In the test design, MS-FSA uses a common test initialization and cleanup method, which will be used commonly in the test cases:

  • FsaInitial: It includes the following operations: select transport, connect, negotiate, session setup and tree connect.

  • Cleanup: Logoff and disconnect from server.

MS-FSA Test Environment

The following diagram shows the basic test environment for MS-FSA. The DC01 is optional.

image2.png

Scenario and Test Case Summary

Traditional Test cases

Traditional Test cases are designed specific to new algorithms in Win8, ReFS file system and Alternate Data Stream. There are 228 test cases in total:

CategoryScenariosTest cases (BVT)
Scenarios for FileInformation1184 (49)
Scenarios for FileSystemInformation424 (7)
Scenarios for FsControlRequest13101 (32)
Scenarios for Alternate Data Stream941 (12)
Scenarios for QuotaInformation12 (0)
Scenarios for File And Directory Leasing17 (0)
Scenarios for FileAccess29 (2)
Scenarios for CommonAlgorithm211 (11)
Scenarios for Query Directory151 (48)
Other Scenarios410 (0)

MBT Test cases

Model-based test cases are designed to cover most of algorithm details. There are 343 test cases in total:

CategoryTest Cases
Open30
Create25
Read3
Write1
Close1
Flush Cached Data1
Lock and Unlock2
Change Notification2
IoCtl Request71
Query Directory20
Query FileInfo44
Query FsInfo24
Query SecurityInfo12
Set FileInfo89
Set SecurityInfo18

Traditional Test Scenarios Design

Scenarios for CommonAlgorithm

Algorithm_Noting_FileModified

DescriptionTo test if LastWriteTime, LastChangeTime, LastAccessTime and Archive is updated by File System when file is modified.
Note: The FAT32 file system doesn’t process the ChangeTime field
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation
If supported, the LastWriteTime, LastChangeTime and LastAccessTime is set to current system time.
If supported, the Archive attribute is set to true.
Message SequenceCreateFile.
Modify file
Verify LastWriteTime, LastChangeTime and LastAccessTime is set to current system time
Verify Archive attribute is set to true

Algorithm_Noting_FileAccessed

DescriptionTo test if LastAccessTime is updated by File System when file is accessed.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation
If supported, the LastAccessTime is set to current system time.
Message SequenceCreateFile.
Read file
Verify LastAccessTime is set to current system time

Scenarios for FileInformation

FileInfo_IsCompressionSupported

DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileCompressionInformation
If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.
If supported, the operation returns STATUS_SUCCESS.
Message SequenceCreateFile.
SetInfo for FileInfoClass.FileCompressionInformation.
Verify server return with STATUS_SUCCESS for supported file systems.
Or failed the request with STATUS_INVALID_PARAMETER.

FileInfo_IsEASupported

DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileFullEaInformation, FileEaInformation
If the object store does not support extended attribute, the EA size should be 0.
If supported, the EA size should be greater than 0.
Message SequenceCreateFile.
SetInfo for FileInfoClass.FileFullEaInformation or FileEaInformation.
Verify server return EA size > 0 for supported file systems.
Or EA size == 0 for unsupported file systems.

FileInfo_IsIntegritySupported

DescriptionTo test if integrity is supported for different file systems.
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation, FileAttributeTagInformation, FileNetworkOpenInformation
If the object store support this functionality, FILE_ATTRIBUTE_INTEGRITY_STREAM is set in OutputBuffer.FileAttributes.
If not support, FILE_ATTRIBUTE_INTEGRITY_STREAM is not set in OutputBuffer.FileAttributes.
Message SequenceCreateFile
QueryInfo with FileInfoClass = FileAttributeTagInformation/FileBasicInformation/FileNetworkOpenInformation.
Verify the FILE_ATTRIBUTE_INTEGRITY_STREAM is set or not in OutputBuffer.FileAttributes.

FileInfo_IsFileLinkInfoSupported

DescriptionTo test if FileLinkInformation is supported for different file systems.
Note: Only NTFS supports FileLinkInformation.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileLinkInformation
If the tested file system is FAT32, the operation failed with STATUS_INVALID_DEVICE_REQUEST.
If the object store does not support this functionality, the operation failed with STATUS_NOT_SUPPORTED.
If support, returns STATUS_SUCCESS.
Message SequenceCreateFile.
SetInfo with FileInfoClass.FileLinkInformation.
Verify server responses accordingly.

FileInfo_IsFileValidDataLengthInfoSupported

DescriptionTo test the FileValidDataLengthInformation for different file systems.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileValidDataLengthInformation
If the object store does not support this functionality, the operation failed with STATUS_INVALID_PARAMETER.
If support, returns STATUS_SUCCESS.
Message SequenceCreateFile.
SetInfo with FileInfoClass = FileValidDataLengthInformation.
Verify server responses accordingly.

FileInfo_IsShortNameSupported

DescriptionTo test if short name supported for different file systems.
Note: ReFS does not implement short names.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileShortNameInformation
If not supported, the operation failed with STATUS_INVALID_PARAMETER.
If supported, The operation returns STATUS_SUCCESS.
Message SequenceCreateFile.
SetInfo with FileInfoClass.FileShortNameInformation.
Verify server response with ShortName info for supported file systems.
Or failed the request for unsupported file systems.

FileInfo_FileIdInformationSupported

DescriptionTo test if FileIdInformation supported for different file systems.
Test environment: NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileIdInformation
If supported, The operation returns STATUS_SUCCESS.
And FileId of FileIdInformation is verified by sending FSCTL_READ_FILE_USN_DATA, VolumeSerialNumber of FileIdInformation is verified by sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA.
Message SequenceCreateFile.
QueryInfo with FileInfoClass.FileIdInformation
Get FileReferenceNumber by sending FSCTL_READ_FILE_USN_DATA to server.
Verify FileId when querying FileIdInformation should be the same with FileReferenceNumber when sending FSCTL_READ_FILE_USN_DATA.
Get VolumeSerialNumber by sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA to server.
Verify VolumeSerialNumber when querying FileIdInformation should be the same with VolumeSerialNumber when sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA.

FileInfo_FileAccessInformationSupported

DescriptionTo test if FileAccessInformation supported for different file systems.
Test environment: NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileAccessInformation
If supported, The operation returns STATUS_SUCCESS.
Message SequenceCreateFile.
QueryInfo with FileInfoClass.FileAccessInformation
Verify server responses accordingly.

FileInfo_SetFileBasicInformationSupported

DescriptionTo test if set values for FileBasicInformation attributes supported by different file systems.
Note: The FAT32 file system doesn’t process the ChangeTime field
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation
If the file system supports the attribute values, The system responds according to [MS-FSA] 2.1.5.14.2 FileBasicInformation.
Message SequenceCreateFile.
SetInfo with FileInfoClass.FileBasicInformation
QueryInfo with FileInfoClass.FileBasicInformation
Verify server responses accordingly.

FileInfo_CreationTime

DescriptionTo test if CreationTime is handled by different File Systems.
Note: Only NTFS, ReFS support value -2 for timestamps
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation, FileBothDirectoryInformation, FileFullDirectoryInformation, FileIdGlobalTxDirectoryInformation
If supported, CreationTime is set to current system time when file is created.
If supported, CreationTime is never updated in response to file system calls such as read and write.
Message SequenceCreateFile.
Verify CreationTime is set to current system time
Modify file
Verify CreationTime is not changed

FileInfo_Set_FileBasicInformation_Timestamp_Zero

DescriptionTo test if setting timestamps value to 0 is handled by different File Systems.
Note: Only NTFS, ReFS support value -2 for timestamps
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation
If supported, timestamp is not changed if value is set to 0.
Message SequenceCreateFile.
Set timestamp to value 0
Verify timestamp attribute is not changed

FileInfo_Set_FileBasicInformation_Timestamp_MinusOne

DescriptionTo test if setting timestamps value to -1 is handled by different File Systems.
Note: Only NTFS, ReFS support value -2 for timestamps
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation
If supported, timestamp is not changed if IO operation is performed after timestamp value is set to -1
Message SequenceCreateFile.
Set timestamp to value -1
Modify file
Verify timestamp attribute is not changed

FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo

DescriptionTo test if setting timestamps value to -2 is handled by different File Systems.
Note: Only NTFS, ReFS support value -2 for timestamps
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileInfoClass: FileBasicInformation
If supported, timestamp is set to current time if IO operation is performed after timestamp value is set to -1 and subsquently -2
Message SequenceCreateFile.
Set timestamp to value -1
Modify file
Verify timestamp attribute is not changed
Set timestamp to value -2
Modify file
Verify timestamp attribute is set to current time

Scenarios for FileSystemInformation

FsInfo_FileFsAttributeInformation

DescriptionTo query FileFsAttributeInformation for supported features in the file system.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FileFsAttributes: FILE_SUPPORTS_ENCRYPTION, FILE_SUPPORTS_OBJECT_IDS, FILE_SUPPORTS_REPARSE_POINTS, FILE_SUPPORTS_SPARSE_FILES, FILE_FILE_COMPRESSION, FILE_SUPPORT_INTEGRITY_STREAMS
FsInfoClass: FileFsAttributeInformation
If the object store support this functionality, according attribute is set in OutputBuffer.FileSystemAttributes.
If not support, according attribute is not set in OutputBuffer.FileSystemAttributes.
Message SequenceCreateFile.
QueryInfo with FsInfoClass.FileFsAttributeInformation.
Verify the file system attribute is set correctly.

FsInfo_IsObjectIdSupported

DescriptionTo test if object id is supported for different file systems.
Note: ReFS does not support object IDs.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsInfoClass: FileObjectIdInformation
If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.
If supported, the operation returns STATUS_SUCCESS.
Message SequenceCreateFile.
SetInfo with FsInfoClass.FileObjectIdInformation.
Verify server return with STATUS_SUCCESS for supported file systems.
Or failed the request with STATUS_INVALID_PARAMETER.

FsInfo_FileFsSizeInformation_ClusterSize

DescriptionTo test cluster size for different file system.
For ClusterSize:
FAT32 uses a default cluster size of 4KB.
NTFS uses a default cluster size of 4KB.
ReFS uses a default cluster size of 64KB.
For LogicalBytesPerSector:
MUST be greater than or equal to 512 bytes.
For FileFsSizeInformation:
OutputBuffer.SectorsPerAllocationUnit set to Open.File.Volume.ClusterSize / Open.File.Volume.LogicalBytesPerSector.
So for FAT32, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For NTFS, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For ReFS, SectorsPerAllocationUnit = 64KB/512 bytes = 128.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsInfoClass: FileFsSizeInformation
For FAT32, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For NTFS, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For ReFS, SectorsPerAllocationUnit = 64KB/512 bytes = 128.
Message SequenceCreateFile.
QueryInfo with FsInfoClass.FileFsSizeInformation.
Verify the OutputBuffer.SectorsPerAllocationUnit is correctly set according to default cluster size or to Open.File.Volume.ClusterSize / Open.File.Volume.LogicalBytesPerSector.

FsInfo_Query_FileFsSectorSizeInformation

DescriptionTo test query file system info with FsInfoClass.FileFsSectorSizeInformation.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsInfoClass: FILE_FS_SECTOR_SIZE_INFORMATION
Input parameter test:
If OutputBufferSize is equal to or greaten than sizeof(FILE_FS_SECTOR_INFORMATION), then operation returns STATUS_SUCCESS.
If OutputBufferSize is smaller than sizeof(FILE_FS_SECTOR_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.
Operation test:
Upon successful completion of the operation, returns STATUS_SUCCESS.
Verify each data element in OutputBuffer for FILE_FS_SECTOR_SIZE_INFORMATION structure.
Message SequenceCreateFile.
QueryInfo with FsInfoClass.FileFsSectorSizeInformation.
Verify server responses accordingly to the input parameters.

Scenarios for FsControlRequest

FsCtl_Create_Or_Get_ObjectId

DescriptionTo test FSCTL request: FSCTL_CREATE_OR_GET_OBJECT_ID
Note: Only NTFS supports create or get object id.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_CREATE_OR_GET_OBJECT_ID
Supporting test:
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
The operation MUST be failed with STATUS_INVALID_PARAMETER if:
OutputBufferSize is less than sizeof(FILE_OBJECTID_BUFFER).
Operation test:
Upon successful completion of the operation, server returns STATUS_SUCCESS.
Verify OutputBuffer.ObjectId is set to non-empty Guid.
Verify OutputBuffer.BirthVolumeId is set to non-empty Guid.
Verify OutputBuffer.BirthObjectId is set to non-empty Guid.
Verify OutputBuffer.DomainId is set to empty Guid.
Message SequenceCreateFile.
FSCTL request with FSCTL_CREATE_OR_GET_OBJECT_ID.
Verify server response is correct.

FsCtl_Get_ObjectId

DescriptionTo test FSCTL request: FSCTL_GET_OBJECT_ID
Note: Only NTFS supports get object id.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_GET_OBJECT_ID
Supporting test:
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
The operation MUST be failed with STATUS_INVALID_PARAMETER if:
OutputBufferSize is less than sizeof(FILE_OBJECTID_BUFFER).
Operation test:
Upon successful completion of the operation, server returns STATUS_SUCCESS.
Verify OutputBuffer.ObjectId is set to non-empty Guid.
Verify OutputBuffer.BirthVolumeId is set to non-empty Guid.
Verify OutputBuffer.BirthObjectId is set to non-empty Guid.
Verify OutputBuffer.DomainId is set to empty Guid.
Message SequenceCreateFile.
FSCTL request with FSCTL_CREATE_OR_GET_OBJECT_ID to ensure the Object ID is set.
FSCTL request with FSCTL_GET_OBJECT_ID.
Verify server response is correct.

FsCtl_Get_IntegrityInformation

DescriptionTo test FSCTL request: FSCTL_GET_INTEGRITY_INFORMATION
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_GET_INTEGRITY_INFORMATION
Supporting test:
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
The operation MUST be failed with STATUS_INVALID_PARAMETER under any of the following conditions:
OutputBufferSize is less than sizeof(FSCTL_GET_INTEGRITY_INFORMATION_BUFFER).
Open.Stream.StreamType is not DirectoryStream or FileStream.
Open.File.FileAttributes.FILE_ATTRIBUTE_SYSTEM is TRUE.
Operation test:
Upon successful completion of the operation, server returns STATUS_SUCCESS.
Verify OutputBuffer.CheckSumAlgorithm is set correctly.
Verify OutputBuffer.ChecksumChunkShift is set correctly.
Verify OutputBuffer.ClusterShift is set correctly.
Verify OutputBuffer.Flags for CHECKSUM_ENFORCEMENT_OFF is set correctly.
Verify ByteCount == sizeof(FSCTL_GET_INTEGRITY_INFORMATION_BUFFER).
Message SequenceCreateFile.
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION.
Verify server responses accordingly to input parameters.

FsCtl_Set_IntegrityInformation

DescriptionTo test FSCTL request: FSCTL_SET_INTEGRITY_INFORMATION
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_SET_INTEGRITY_INFORMATION
Supporting test:
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
The operation MUST be failed with STATUS_INVALID_PARAMETER under any of the following conditions:
OutputBufferSize is less than sizeof(FSCTL_SET_INTEGRITY_INFORMATION_BUFFER).
Open.Stream.StreamType is not DirectoryStream or FileStream.
Open.File.FileAttributes.FILE_ATTRIBUTE_SYSTEM is TRUE.
Operation test:
Upon successful completion of the operation, server returns STATUS_SUCCESS.
Verify OutputBuffer.CheckSumAlgorithm is set correctly.
Verify OutputBuffer.ChecksumChunkShift is set correctly.
Verify OutputBuffer.ClusterShift is set correctly.
Verify OutputBuffer.Flags for CHECKSUM_ENFORCEMENT_OFF is set correctly.
Verify ByteCount == sizeof(FSCTL_SET_INTEGRITY_INFORMATION_BUFFER).
Message SequenceCreateFile.
FSCTL request with FSCTL_SET_INTEGRITY_INFORMATION.
Verify server responses accordingly to input parameters.

FsCtl_Set_IntegrityInformation_Ex

DescriptionTo test FSCTL request: FSCTL_SET_INTEGRITY_INFORMATION_EX
Test environment: NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_SET_INTEGRITY_INFORMATION_EX
Supporting test:
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
The operation MUST be failed with STATUS_INVALID_PARAMETER under any of the following conditions:
OutputBufferSize is less than sizeof(FSCTL_SET_INTEGRITY_INFORMATION_EX_BUFFER).
Open.Stream.StreamType is not DirectoryStream or FileStream.
Open.File.FileAttributes.FILE_ATTRIBUTE_SYSTEM is TRUE.
Operation test:
Upon successful completion of the operation, server returns STATUS_SUCCESS.
Verify OutputBuffer.CheckSumAlgorithm is set correctly.
Verify OutputBuffer.ChecksumChunkShift is set correctly.
Verify OutputBuffer.ClusterShift is set correctly.
Verify OutputBuffer.Flags for CHECKSUM_ENFORCEMENT_OFF is set correctly.
Verify ByteCount == sizeof(FSCTL_SET_INTEGRITY_INFORMATION_EX_BUFFER).
Message SequenceCreateFile.
FSCTL request with FSCTL_SET_INTEGRITY_INFORMATION_EX.
Verify server responses accordingly to input parameters.

FsCtl_Offload_Read

DescriptionTo test FSCTL request: FSCTL_OFFLOAD_READ
Note: Support for this read operation is optional.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_OFFLOAD_READ
Supporting test:
If not implement, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
Test with different parameter, verify server returns different status code accordingly: STATUS_NOT_SUPPORTED, STATUS_BUFFER_TOO_SMALL, STATUS_INVALID_PARAMETER, STATUS_SUCCESS, STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED, STATUS_FILE_DELETED, STATUS_END_OF_FILE, OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE.
Operation test:
Upon successful completion of the operation, returns STATUS_SUCCESS.
BytesReturned set to OutputBufferLength.
Message SequenceCreateFile.
FSCTL request with FSCTL_OFFLOAD_READ.
Verify server responses accordingly to input parameters.

FsCtl_Offload_Write

DescriptionTo test FSCTL request: FSCTL_OFFLOAD_WRITE
Note:Support for this read operation is optional.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_OFFLOAD_WRITE
Supporting test:
If not implement, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
Test with different parameter, verify server returns different status code accordingly: STATUS_NOT_SUPPORTED, STATUS_BUFFER_TOO_SMALL, STATUS_INVALID_PARAMETER, STATUS_SUCCESS, STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED, STATUS_FILE_DELETED, STATUS_END_OF_FILE, OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE.
Operation test:
Upon successful completion of the operation, returns STATUS_SUCCESS.
BytesReturned set to OutputBufferLength.
Message SequenceCreateFile.
FSCTL request with FSCTL_OFFLOAD_WRITE.
Verify server responses correctly.

FsCtl_IsAllocatedRangesSupported

DescriptionTo test if FSCTL_QUERY_ALLOCATED_RANGES is supported for different file systems.
Note: This is only implemented by the ReFS and NTFS file systems.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile
Test coverage:
FsCtl: FSCTL_QUERY_ALLOCATED_RANGES
If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.
If support, returns STATUS_SUCCESS.
Message SequenceCreateFile.
FsCtl request with FSCTL_QUERY_ALLOCATED_RANGES.
Verify server returns STATUS_SUCCESS for supported file systems
Or returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.

FsCtl_IsReparsePointSupported

DescriptionTo test if FSCTL_GET_REPARSE_POINT is supported for different file systems.
Note: This is only implemented by the ReFS and NTFS file systems.
Test environment: FAT32, NTFS, ReFS
Test object: DirectoryFile
Test coverage:
FsCtl: FSCTL_GET_REPARSE_POINT
If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.
If support, returns STATUS_SUCCESS.
Message SequenceCreateFile.
FsCtl request with FSCTL_GET_REPARSE_POINT.
Verify server returns STATUS_SUCCESS for supported file systems.
Or returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.

FsCtl_IsSparseFileSupported

DescriptionTo test if FSCTL_SET_SPARSE is supported for different file systems.
Note: This is only implemented by the NTFS file system.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_SET_SPARSE
If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.
If support, returns STATUS_SUCCESS.
Message SequenceCreateFile.
FsCtl request with FSCTL_SET_SPARSE.
Verify server returns STATUS_SUCCESS for supported file systems.
Or returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.

FsCtl_IsZeroDataSupported

DescriptionTo test if FSCTL_SET_ZERO_DATA is supported for different file systems.
Note: This is only implemented by the NTFS file system.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_SET_ZERO_DATA
If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.
If support, returns STATUS_SUCCESS.
Message SequenceCreateFile.
FsCtl request with FSCTL_SET_ZERO_DATA.
Verify server returns STATUS_SUCCESS for supported file systems.
Or returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.

FsCtl_IsDuplicateExtentsToFileExSupported

DescriptionTo test if FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX with DUPLICATE_EXTENTS_DATA_EX_SOURCE_ATOMIC is supported.
Note: This is only implemented by the ReFS file system.
Test environment: ReFS
Test object: DataFile
Test coverage:
FsCtl: FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX
Message SequenceCreate test file and fill up first two clusters with random data.
FSCTL request with FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX and different additional flags to duplicate the file extent of first cluster to the second.
Verify returned NTSTATUS code and file content by checking the following:
1. The returned status is STATUS_SUCCESS.
2. The file content of the second cluster is the same as the first.

FsCtl_Get_Volume_Data

DescriptionTo test if FSCTL_GET_REFS_VOLUME_DATA/FSCTL_GET_NTFS_VOLUME_DATA is supported.
Note: This is only implemented by the ReFS file system and NTFS file system.
Test environment: NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_GET_REFS_VOLUME_DATA, FSCTL_GET_NTFS_VOLUME_DATA
Message SequenceCreate test file.
Query FileIdInformation.
Query FileFsFullSizeInformation.
FSCTL request with FSCTL_GET_NTFS_VOLUME_DATA/FSCTL_GET_REFS_VOLUME_DATA.
Verify returned STATUS_SUCCESS and Verify returned REFS_VOLUME_DATA_BUFFER or NTFS_VOLUME_DATA_BUFFER:
1. VolumeSerialNumber of VOLUME_DATA_BUFFER should be the same with VolumeSerialNumber of FileIdInformation.
2. TotalClusters of VOLUME_DATA_BUFFER should be the same with TotalAllocationUnits of FileFsFullSizeInformation.
3. BytesPerSector of VOLUME_DATA_BUFFER should be the same with BytesPerSector of FileFsFullSizeInformation.

FsCtl_Query_File_Regions

DescriptionTo test if FSCTL_QUERY_FILE_REGIONS is supported.
Note: This is only implemented by the ReFS file system and NTFS file system.
Test environment: NTFS, ReFS
Test object: DataFile
Test coverage:
FsCtl: FSCTL_QUERY_FILE_REGIONS
Message SequenceCreate test file and fill it up with random data.
FSCTL request with FSCTL_QUERY_FILE_REGIONS (containing or not containing input data).
Verify returned STATUS_SUCCESS and Verify returned FILE_REGION_OUTPUT:
1. RegionEntryCount of the output data element should be 1.
2. TotalRegionEntryCount of the output data element should be 1.
3. FileOffset of the FILE_REGION_INFO data element should be zero.
4. Length of the FILE_REGION_INFO data element should be the size written to the file.
5. FILE_REGION_USAGE_VALID_CACHED_DATA should be set for NTFS, or FILE_REGION_USAGE_VALID_NONCACHED_DATA should be set for ReFS.

FsCtl_Get_Compression

DescriptionTo test if FSCTL_GET_COMPRESSION is supported.
Note: This is only implemented by the ReFS file system and NTFS file system.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_GET_COMPRESSION
Message SequenceCreateFile.
FSCTL request with FSCTL_GET_COMPRESSION.
If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.
If support, returns STATUS_SUCCESS.

FsCtl_Set_Compression

DescriptionTo test if FSCTL_SET_COMPRESSION is supported.
Note: This is only implemented by the ReFS file system and NTFS file system.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_SET_COMPRESSION
Input parameter test:
Test with different parameter, verify server returns different status code accordingly: STATUS_NOT_SUPPORTED, STATUS_INVALID_DEVICE_REQUEST, STATUS_ACCESS_DENIED, STATUS_SUCCESS.
Message SequenceCreateFile.
FSCTL request with FSCTL_SET_COMPRESSION.
Verify server responses correctly.

FsCtl_RefsStreamSnapshotManagement

DescriptionTo test FSCTL request: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Note: Support for this operation is optional.
Test environment: ReFS
Test object: DataFile
Test coverage:
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Supporting test:
If not supported by operating system, failed with STATUS_NOT_SUPPORTED.
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
Test with different REFS_STREAM_SNAPSHOT_OPERATION parameter, verify server returns status code accordingly: STATUS_NOT_SUPPORTED, STATUS_INVALID_DEVICE_REQUEST, STATUS_INVALID_PARAMETER, STATUS_BUFFER_TOO_SMALL, STATUS_ACCESS_DENIED, STATUS_SUCCESS.
Operation test:
Upon successful completion of the operation, returns STATUS_SUCCESS.
Message SequenceCreateFile.
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT.
Verify server responds according to input parameters.

FsCtl_RefsStreamSnapshotOperationCreate

DescriptionTo test FSCTL request: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE
Note: Support for this operation is optional.
Test environment: ReFS
Test object: DataFile
Test coverage:
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE
Supporting test:
If not supported by operating system, failed with STATUS_NOT_SUPPORTED.
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
Test with single snapshot created and duplicate snapshot name created.
Operation test:
Upon successful completion of the operation, returns STATUS_SUCCESS.
Message SequenceCreateFile.
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE.
Verify snapshot is created.

FsCtl_RefsStreamSnapshotOperationQueryDeltas

DescriptionTo test FSCTL request: REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS
Note: Support for this operation is optional.
Test environment: ReFS
Test object: DataFile
Test coverage:
FsCtl: REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS
Supporting test:
If not supported by operating system, failed with STATUS_NOT_SUPPORTED.
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
Test with modified file and unmodified file.
Operation test:
Upon successful completion of the operation, returns STATUS_SUCCESS.
Message SequenceCreateFile and fill with random data.
FSCTL request with REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS.
Verify that modification extents are returned.

FsCtl_Mark_Handle

DescriptionTo test if FSCTL_MARK_HANDLE is supported.
Note: This is implemented by the ReFS file system and NTFS file system.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
FsCtl: FSCTL_MARK_HANDLE
Input parameter test:
Test with different parameter, verify server returns different status code accordingly: STATUS_DIRECTORY_NOT_SUPPORTED, STATUS_INVALID_DEVICE_REQUEST, STATUS_NOT_REDUNDANT_STORAGE, STATUS_INVALID_PARAMETER, STATUS_RESIDENT_FILE_NOT_SUPPORTED, STATUS_SUCCESS.
Message SequenceCreateFile.
FSCTL request with FSCTL_MARK_HANDLE.
Verify server response is correct.

FsCtl_RefsStreamSnapshotOperationList

DescriptionTo test FSCTL request: REFS_STREAM_SNAPSHOT_OPERATION_LIST
Note: Support for this operation is optional.
Test environment: ReFS
Test object: DataFile
Test coverage:
FsCtl: REFS_STREAM_SNAPSHOT_OPERATION_LIST
Supporting test:
If not supported by operating system, failed with STATUS_NOT_SUPPORTED.
If not implemented, failed with STATUS_INVALID_DEVICE_REQUEST.
Input parameter test:
Test with multiple snapshot created. Verify that single entry, multiple entry and no entry returned appropriately.
Operation test:
Upon successful completion of the operation, returns STATUS_SUCCESS.
Message SequenceCreateFile
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE.
FSCTL request with REFS_STREAM_SNAPSHOT_OPERATION_LIST.
Verify that correct number of entry is returned.

Scenarios for QuotaInformation

QuotaInfo_IsQuotaInfoSupported

DescriptionTo test if quota info is supported for different file systems.
Note: Only NTFS supports quotas.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile, DirectoryFile
Test coverage:
If the object store does not implement this functionality, the operation MUST be failed with STATUS_OBJECT_PATH_NOT_FOUND or STATUS_OBJECT_NAME_NOT_FOUND
If support, returns STATUS_SUCCESS.
Message SequenceCreateFile.
Query Quota Information
Verify server responses accordingly.

Scenarios for FileAccess

FileAccess_OpenExistingFile

DescriptionTo write or delete a read only file and check the returned status code.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile
Test coverage:
Message SequenceCreate readonly data file.
Write or delete the read only data file
Verify server responses accordingly.

FileAccess_OpenNamedPipe

DescriptionOpen a named pipe and check the returned status code.
Test environment: FAT32, NTFS, ReFS
Test object: NamedPipe
Test coverage:
Message SequenceCreate named pipe.
Open named pipe
Verify server responses accordingly.

Scenarios for Alternate Data Stream

AlternateDataStream_CreateStream

DescriptionTo create Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Create another Alternate Data Stream and write 4096 bytes to the stream.
Verify server return with STATUS_SUCCESS for supported file systems.

AlternateDataStream_ListStreams

DescriptionTo list the Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Create another Alternate Data Stream and write 4096 bytes to the stream.
List all the Alternate Data Streams created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.
Verify server return with StreamName and StreamSize.

AlternateDataStream_DeleteStream

DescriptionTo delete the Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Create another Alternate Data Stream and write 4096 bytes to the stream.
Delete the second Alternate Data Stream created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.
List all the Alternate Data Streams created on this file.
Verify server return with StreamName and StreamSize.

AlternateDataStream_RenameStream

DescriptionTo rename the Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Create another Alternate Data Stream and write 4096 bytes to the stream.
List all the Alternate Data Streams created on this file.
Verify server return with StreamName and StreamSize.
Rename the second Alternate Data Stream created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.
List all the Alternate Data Streams created on this file.
Verify server return with StreamName and StreamSize.

AlternateDataStream_WriteAndRead

DescriptionTo write and read from the Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Read the bytes from the Alternate Data Streams created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.
Verify the bytes read and the bytes written on this stream.
Create another Alternate Data Stream and write 4096 bytes to the stream.
Read the bytes from the Alternate Data Streams created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.
Verify the bytes read and the bytes written on this stream.

AlternateDataStream_LockAndUnlock

DescriptionTo lock and unlock a byte range of the Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Create another Alternate Data Stream and write 4096 bytes to the stream.
Lock a byte range of the second Alternate Data Stream created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.
Unlock the byte range of the second Alternate Data Stream created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.

AlternateDataStream_QueryAndSet_FileInformation

DescriptionTo query or set the file information of the Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Query or set the file information on this Alternate Data Stream created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.

AlternateDataStream_FsControl

DescriptionTo request a FsControl on the Alternate Data Streams on a file in the file system.
Test environment: NTFS
Test object: DataFile, DirectoryFile
Test coverage:
Message SequenceCreateFile.
Create an Alternate Data Stream and write 2048 bytes to the stream.
Request a FsControl on this Alternate Data Stream created on this file.
Verify server return with STATUS_SUCCESS for supported file systems.

AlternateDataStream_FileShareAccess_DataFileExisted

DescriptionTo create a data file and then create another alternate data stream with granted access.
Test environment: NTFS
Test object: DataFile
Test coverage:
Message SequenceCreate a data file.
Create an Alternate Data Stream with granted access.
Verify server return with STATUS_SHARING_VIOLATION for supported file systems.

AlternateDataStream_FileShareAccess_DirectoryExisted

DescriptionTo create a directory file and then create another alternate data stream with granted access.
Test environment: NTFS
Test object: DirectoryFile
Test coverage:
Message SequenceCreate a directory file.
Create an Alternate Data Stream with granted access.
Verify server return with STATUS_SHARING_VIOLATION for supported file systems.

AlternateDataStream_FileShareAccess_AlternateStreamExisted

DescriptionTo Create an alternate data stream and then create a data file with granted access.
Test environment: NTFS
Test object: DataFile
Test coverage:
Message SequenceCreate an alternate data stream with granted access.
Create an data file with granted access.
Verify server return with STATUS_SHARING_VIOLATION for supported file systems.

Scenarios for Create and Query Directory

Query Directory

DescriptionTo test if Create and Query directory is supported.
Test environment: NTFS, ReFS, FAT32
Test object: DirectoryFile
Test coverage:
Message SequenceCreate a directory file.
Create a file (files) under the newly created directory.
Query server directory with created directory name.
Verify server response.

Other Scenarios

CreateFile_InvalidStreamName

DescriptionTo test create a directory file with a invalid stream name in the file system.
Test environment: FAT32, NTFS, ReFS
Test object: DirectoryFile
Message SequenceCreate a directory file with a invalid stream name.
Verify server return with STATUS_INVALID_PARAMETER for NTFS and ReFS, and STATUS_OBJECT_NAME_INVALID for other file systems.

CreateFile_InvalidColon

DescriptionTo test create a directory or data file with invalid colon.
Test environment: FAT32, NTFS, ReFS
Test object: DirectoryFile, DataFile
Message SequenceCreate a directory or data file with a invalid colon contained in file name.
Verify server return with STATUS_OBJECT_NAME_INVALID for supported file systems.

CreateFile_BackSlash

DescriptionTo test create a directory or data file with a invalid back slash.
Test environment: FAT32, NTFS, ReFS
Test object: DirectoryFile, DataFile
Message SequenceCreate a directory or data file with back slash contained in file name.
Verify server response for supported file systems.

CreateFile_FindAllFiles

DescriptionTo test finding all files under a directory
Test environment: FAT32, NTFS, ReFS
Test object: DirectoryFile, DataFile
Message SequenceCreate a directory
Create file(s) under the directory
Query the directory
Verify that all files existing in the directory are returned

Traditional Test Case Design

Test cases for CommonAlgorithm

NotingFileModified

Algorithm_NotingFileModified_File_LastModificationTime
DescriptionTo test if LastWriteTime is updated by different file systems when file is modified.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
Write to file
Verify LastWriteTimeBeforeFileModified is less than LastWriteTimeAfterFileModified
Algorithm_NotingFileModified_Dir_LastModificationTime
DescriptionTo test if LastWriteTime is updated by different file systems when directory is modified.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
Create file into directory
Verify LastWriteTimeBeforeFileModified is less than LastWriteTimeAfterFileModified
Algorithm_NotingFileModified_File_LastChangeTime
DescriptionTo test if LastChangeTime is updated by different file systems when file is modified.
Note: the FAT32 file system doesn’t process the ChangeTime field
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
Write to file
Verify LastChangeTimeBeforeFileModified is less than LastChangeTimeAfterFileModified
Algorithm_NotingFileModified_Dir_LastChangeTime
DescriptionTo test if LastChangeTime is updated by different file systems when directory is modified.
Note: the FAT32 file system doesn’t process the ChangeTime field
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
Create file into directory
Verify LastChangeTimeBeforeFileModified is less than LastChangeTimeAfterFileModified
Algorithm_NotingFileModified_File_LastAccessTime
DescriptionTo test if LastAccessTime is updated by different file systems when file is modified.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
Write data into file
Verify LastAccessTimeBeforeFileModified is less than LastAccessTimeAfterFileModified
Algorithm_NotingFileModified_Dir_LastAccessTime
DescriptionTo test if LastAccessTime is updated by different file systems when directory is modified.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
Create file into directory
Verify LastAccessTimeBeforeFileModified is less than LastAccessTimeAfterFileModified
Algorithm_NotingFileModified_File_Archive
DescriptionTo test if Archive is updated by different file systems when file is modified.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
Write to file
Verify Archive is true
Algorithm_NotingFileModified_Dir_Archive
DescriptionTo test if Archive is updated by different file systems when directory is modified.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
Create file into directory
Verify Archive is true

NotingFileAccessed

Algorithm_NotingFileAccessed_File_LastAccessTime
DescriptionTo test if LastAccessTime is updated by different file systems when file is read.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
Write to file
Query FileBasicInformation and store LastAccessTimeBeforeFileAccessed
Read file
Query FileBasicInformation and store LastAccessTimeAfterFileAccessed
Verify LastAccessTimeBeforeFileAccessed is less than LastAccessTimeAfterFileAccessed
Algorithm_NotingFileAccessed_Dir_LastAccessTime
DescriptionTo test if LastAccessTime is updated by different file systems when directory is read.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
Write files in directory
Query FileBasicInformation and store LastAccessTimeBeforeFileAccessed
Query files in directory
Query FileBasicInformation and store LastAccessTimeAfterFileAccessed
Verify LastAccessTimeBeforeFileModified is less than LastAccessTimeAfterFileAccessed

Test cases for FileInformation

IsEASupported

FileInfo_Set_FileFullEaInformation_File_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsEASupported == True | STATUS_SUCCESS
IsEASupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
SetInfo with FileInfoClass.FileFullEaInformation
If (IsEASupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FileInfo_Set_FileFullEaInformation_Dir_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsEASupported == True | STATUS_SUCCESS
IsEASupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
SetInfo with FileInfoClass.FileFullEaInformation
If (IsEASupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FileInfo_Query_FileFullEaInformation_File_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsEASupported == True | STATUS_SUCCESS
IsEASupported == False | INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
QueryInfo with FileInfoClass.FileFullEaInformation
If (IsEASupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(INVALID_DEVICE_REQUEST, ActualResult);
}
FileInfo_Query_FileFullEaInformation_Dir_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsEASupported == True | STATUS_SUCCESS
IsEASupported == False | INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
QueryInfo with FileInfoClass.FileFullEaInformation
If (IsEASupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(INVALID_DEVICE_REQUEST, ActualResult);
}
FileInfo_Set_FileEaInformation_File_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
SetInfo with FileInfoClass.FileEaInformation
Assert.AreEqual(STATUS_INVALID_INFO_CLASS, ActualResult);
FileInfo_Set_FileEaInformation_Dir_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
SetInfo with FileInfoClass.FileEaInformation
Assert.AreEqual(STATUS_INVALID_INFO_CLASS, ActualResult);
FileInfo_Query_FileEaInformation_File_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsEASupported == True | EaSize > 0
IsEASupported == False | EaSize == 0
Message SequenceCreateFile (DataFile)
QueryInfo with FileInfoClass.FileEaInformation
If (IsEASupported == True) {
    Verify EaSize > 0;
} Else {
    Verify EaSize == 0;
}
FileInfo_Query_FileEaInformation_Dir_IsEASupported
DescriptionTo test if extended attribute is supported for different file systems.
Note: Only NTFS implements EAs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsEASupported == True | EaSize > 0
IsEASupported == False | EaSize == 0
Message SequenceCreateFile (DirectoryFile)
QueryInfo with FileInfoClass.FileEaInformation
If (IsEASupported == True) {
    Verify EaSize > 0;
} Else {
    Verify EaSize == 0;
}

IsFileLinkInfoSupported

FileInfo_Set_FileLinkInfo_File_IsFileLinkInfoSupported
DescriptionTo test if FileLinkInformation is supported for different file systems.
Note: Only NTFS supports FileLinkInformation
Test environment: FAT32, NTFS, ReFS
Test object: DataFile
Input parameter: FileInfoClass.FileLinkInformation
Parameter combination
Parameter | Expected Result
Transport == SMB | STATUS_NOT_SUPPORTED
FileSystem == FAT32 | STATUS_INVALID_DEVICE_REQUEST
IsFileLinkInfoSupported == True | STATUS_SUCCESS
IsFileLinkInfoSupported == False | STATUS_NOT_SUPPORTED
Message SequenceCreateFile (DataFile)
SetInfo with FileInfoClass.FileLinkInformation
If (Transport == SMB) {
    Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    Return;
}
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
If (IsFileLinkInfoSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
}
FileInfo_Set_FileLinkInfo_Dir_IsFileLinkInfoSupported
DescriptionTo test if FileLinkInformation is supported for different file systems.
Note: Only NTFS supports FileLinkInformation
Test environment: FAT32, NTFS, ReFS
Test object: DirectoryFile
Input parameter: FileInfoClass.FileLinkInformation
Parameter combination
Parameter | Expected Result
Transport == SMB | STATUS_NOT_SUPPORTED
FileSystem == FAT32 | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
SetInfo with FileInfoClass.FileLinkInformation
If (Transport == SMB) {
    Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    Return;
}
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
Assert.AreEqual(STATUS_FILE_IS_A_DIRECTORY, ActualResult);

IsShortNameSupported

FileInfo_Set_FileShortNameInfo_File_IsShortNameSupported
DescriptionTo test if short name supported for different file system.
Note: ReFS does not implement short names.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsShortNameSupported == True | STATUS_SUCCESS
IsShortNameSupported == False | STATUS_INVALID_PARAMETER
Message SequenceCreateFile (DataFile)
SetInfo with FileInfoClass.FileShortNameInformation
If (IsShortNameSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FileInfo_Set_FileShortNameInfo_Dir_IsShortNameSupported
DescriptionTo test if short name supported for different file system.
Note: ReFS does not implement short names.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsShortNameSupported == True | STATUS_SUCCESS
IsShortNameSupported == False | STATUS_INVALID_PARAMETER
Message SequenceCreateFile (DirectoryFile)
SetInfo with FileInfoClass.FileShortNameInformation
If (IsShortNameSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}

IsFileValidLengthInformationSupported

FileInfo_Set_FileValidDataLengthInfo_File_IsSupported
DescriptionTo test if valid data length supported for different file system.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
Write data to File
SetInfo with FileInfoClass.FileValidDataLengthInformation
Assert.AreEqual(STATUS_SUCCESS, ActualResult);
FileInfo_Set_FileValidDataLengthInfo_Dir_IsSupported
DescriptionTo test if valid data length supported for different file system.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
SetInfo with FileInfoClass.FileValidDataLengthInformation
Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);

IsCompressionSupported

FileInfo_Query_FileCompressionInfo_File_IsCompressionSupported
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
FileSystem == FAT32 | STATUS_INVALID_PARAMETER
IsCompressionSupported == True | CompressionFormat & COMPRESSION_FORMAT_LZNT1 == COMPRESSION_FORMAT_LZNT1
IsCompressionSupported == False | CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1
Message SequenceCreateFile (DataFile)
QueryInfo for FileInfoClass.FileCompressionInformation
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
    Return;
}
If (IsCompressionSupported == True) {
    Verify CompressionFormat & COMPRESSION_FORMAT_LZNT1 == COMPRESSION_FORMAT_LZNT1;
} Else {
    Verify CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1;
}
FileInfo_Query_FileCompressionInfo_Dir_IsCompressionSupported
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
FileSystem == FAT32 | STATUS_INVALID_PARAMETER
IsCompressionSupported == True | CompressionFormat & COMPRESSION_FORMAT_LZNT1 == COMPRESSION_FORMAT_LZNT1
IsCompressionSupported == True && FileSystem == CSVFS | CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1
IsCompressionSupported == False | CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1
Message SequenceCreateFile (DirectoryFile)
QueryInfo for FileInfoClass.FileCompressionInformation
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
    Return;
}
If (IsCompressionSupported == True) {
    If (FileSystem == CSVFS) {
        Verify CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1;
    } Else {
        Verify CompressionFormat & COMPRESSION_FORMAT_LZNT1 == COMPRESSION_FORMAT_LZNT1;
    }
} Else {
    Verify CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1;
}

IsFileValidDataLengthInfoSupported

FileInfo_Set_FileValidDataLengthInformation_File_IsSupported
DescriptionTo test the FileValidDataLengthInformation for different file systems.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileValidDataLengthInformation
Parameter combination
Parameter   | Expected Result
IsFileValidDataLengthInfoSupported == True | STATUS_SUCCESS
IsFileValidDataLengthInfoSupported == False | STATUS_INVALID_PARAMETER
Message SequenceCreateFile (DataFile)
SetInfo with FileInfoClass = FileValidDataLengthInformation
If (IsFileValidDataLengthInfoSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FileInfo_Set_FileValidDataLengthInformation_Dir_IsSupported
DescriptionTo test the FileValidDataLengthInformation for different file systems.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileValidDataLengthInformation
Parameter combination
Parameter   | Expected Result
IsFileValidDataLengthInfoSupported == True | STATUS_SUCCESS
IsFileValidDataLengthInfoSupported == False | STATUS_INVALID_PARAMETER
Message SequenceCreateFile (DirectoryFile)
SetInfo with FileInfoClass = FileValidDataLengthInformation
If (IsFileValidDataLengthInfoSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}

IsIntegritySupported

FileInfo_Query_FileBasicInfo_File_IsIntegritySupported (BVT)
DescriptionTo test if integrity is supported for different file systems.
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileBasicInformation
Expected Result:
If the object store support this functionality, FILE_ATTRIBUTE_INTEGRITY_STREAM is set in OutputBuffer.FileAttributes.
If not support, FILE_ATTRIBUTE_INTEGRITY_STREAM is not set in OutputBuffer.FileAttributes.
Message SequenceCreateFile DataFile with FileAttribute.INTEGRITY_STREAM
QueryInfo with FileInfoClass = FileBasicInformation
If (IsIntegritySupported == True) {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is set.
} Else {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is not set.
}
FileInfo_Query_FileBasicInfo_Dir_IsIntegritySupported
DescriptionTo test if integrity is supported for different file systems.
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileBasicInformation
Expected Result:
If the object store support this functionality, FILE_ATTRIBUTE_INTEGRITY_STREAM is set in OutputBuffer.FileAttributes.
If not support, FILE_ATTRIBUTE_INTEGRITY_STREAM is not set in OutputBuffer.FileAttributes.
Message SequenceCreateFile DirectoryFile with FileAttribute.INTEGRITY_STREAM
QueryInfo with FileInfoClass = FileBasicInformation
If (IsIntegritySupported == True) {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is set.
} Else {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is not set.
}
FileInfo_Query_FileAttributeTagInfo_File_IsIntegritySupported
DescriptionTo test if integrity is supported for different file systems.
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileAttributeTagInformation
Expected Results:
If the file system is FAT32, the request will be failed with STATUS_INVALID_PARAMETER.
If the object store support this functionality, FILE_ATTRIBUTE_INTEGRITY_STREAM is set in OutputBuffer.FileAttributes.
If not support, FILE_ATTRIBUTE_INTEGRITY_STREAM is not set in OutputBuffer.FileAttributes.
Message SequenceCreateFile DataFile with FileAttribute.INTEGRITY_STREAM
QueryInfo with FileInfoClass = FileAttributeTagInformation
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
    Return;
}
If (IsIntegritySupported == True) {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is set.
} Else {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is not set.
}
FileInfo_Query_FileAttributeTagInfo_Dir_IsIntegritySupported
DescriptionTo test if integrity is supported for different file systems.
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileAttributeTagInformation
Expected Results:
If the file system is FAT32, the request will be failed with STATUS_INVALID_PARAMETER.
If the object store support this functionality, FILE_ATTRIBUTE_INTEGRITY_STREAM is set in OutputBuffer.FileAttributes.
If not support, FILE_ATTRIBUTE_INTEGRITY_STREAM is not set in OutputBuffer.FileAttributes.
Message SequenceCreateFile DirectoryFile with FileAttribute.INTEGRITY_STREAM
QueryInfo with FileInfoClass = FileAttributeTagInformation
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
    Return;
}
If (IsIntegritySupported == True) {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is set.
} Else {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is not set.
}
FileInfo_Query_FileNetworkOpenInfo_File_IsIntegritySupported
DescriptionTo test if integrity is supported for different file systems.
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileNetworkOpenInformation
Expected Results:
If the object store support this functionality, FILE_ATTRIBUTE_INTEGRITY_STREAM is set in OutputBuffer.FileAttributes.
If not support, FILE_ATTRIBUTE_INTEGRITY_STREAM is not set in OutputBuffer.FileAttributes.
Message SequenceCreateFile DataFile with FileAttribute.INTEGRITY_STREAM
QueryInfo with FileInfoClass = FileNetworkOpenInformation
If (IsIntegritySupported == True) {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is set.
} Else {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is not set.
}
FileInfo_Query_FileNetworkOpenInfo_Dir_IsIntegritySupported
DescriptionTo test if integrity is supported for different file systems.
Note: Only ReFS supports integrity.
Test environment: FAT32, NTFS, ReFS
Input parameter: FileInfoClass.FileNetworkOpenInformation
Expected Results:
If the object store support this functionality, FILE_ATTRIBUTE_INTEGRITY_STREAM is set in OutputBuffer.FileAttributes.
If not support, FILE_ATTRIBUTE_INTEGRITY_STREAM is not set in OutputBuffer.FileAttributes.
Message SequenceCreateFile DirectoryFile with FileAttribute.INTEGRITY_STREAM
QueryInfo with FileInfoClass = FileNetworkOpenInformation
If (IsIntegritySupported == True) {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is set.
} Else {
    Verify OutputBuffer.FileAttributes.FILE_ATTRIBUTE_INTEGRITY_STREAM is not set.
}

IsFileIdInformationSupported

FileInfo_Query_FileIdInformation_File
DescriptionTo test if FileIdInformation supported for different file system.
Test environment: NTFS, ReFS
Input parameter: FileInfoClass.FileIdInformation
Expected Results:
If supported, The operation returns STATUS_SUCCESS.
And FileId of FileIdInformation is verified by sending FSCTL_READ_FILE_USN_DATA, VolumeSerialNumber of FileIdInformation is verified by sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA.
Message SequenceCreateFile DataFile
QueryInfo with FileInfoClass.FileIdInformation
Get FileReferenceNumber by sending FSCTL_READ_FILE_USN_DATA to server.
Verify FileId when querying FileIdInformation should be the same with FileReferenceNumber when sending FSCTL_READ_FILE_USN_DATA.
Get VolumeSerialNumber by sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA to server.
Verify VolumeSerialNumber when querying FileIdInformation should be the same with VolumeSerialNumber when sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA.
FileInfo_Query_FileIdInformation_Dir
DescriptionTo test if FileIdInformation supported for different file system.
Test environment: NTFS, ReFS
Input parameter: FileInfoClass.FileIdInformation
Expected Results:
If supported, The operation returns STATUS_SUCCESS.
And FileId of FileIdInformation is verified by sending FSCTL_READ_FILE_USN_DATA, VolumeSerialNumber of FileIdInformation is verified by sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA.
Message SequenceCreateFile DirectoryFile
QueryInfo with FileInfoClass.FileIdInformation
Get FileReferenceNumber by sending FSCTL_READ_FILE_USN_DATA to server.
Verify FileId when querying FileIdInformation should be the same with FileReferenceNumber when sending FSCTL_READ_FILE_USN_DATA.
Get VolumeSerialNumber by sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA to server.
Verify VolumeSerialNumber when querying FileIdInformation should be the same with VolumeSerialNumber when sending FSCTL_GET_NTFS_VOLUME_DATA or FSCTL_GET_REFS_VOLUME_DATA.

FileNormalizedNameInformation

FileInfo_Query_FileNormalizedNameInfo_File
DescriptionTo test if query FileNormalizedNameInformation on file is supported for different file systems.
Note: Windows 10 v1709, Windows Server v1709 operating system and prior do not support the FileNormalizedNameInformation information class.
File information class: FileNormalizedNameInformation
Message SequenceCreateFile (DataFile)
QueryInfo request with FileNormalizedNameInformation
If (status == STATUS_NOT_SUPPORTED) {
    Assert.Inconclusive();
} Else If (status == STATUS_SUCCESS) {
    Verify OutputBuffer as FileNameInformation;
} Else {
    Assert.Fail();
}
FileInfo_Query_FileNormalizedNameInfo_Dir
DescriptionTo test if query FileNormalizedNameInformation on directory is supported for different file systems.
Note: Windows 10 v1709, Windows Server v1709 operating system and prior do not support the FileNormalizedNameInformation information class.
File information class: FileNormalizedNameInformation
Message SequenceCreateFile (DirectoryFile)
QueryInfo request with FileNormalizedNameInformation
If (status == STATUS_NOT_SUPPORTED) {
    Assert.Inconclusive();
} Else If (status == STATUS_SUCCESS) {
    Verify OutputBuffer as FileNameInformation;
} Else {
    Assert.Fail();
}

FileAccessInformation

FileInfo_Query_FileAccessInformation_DataSuffix
DescriptionTo test if FileAccessInformation is supported for a file with ::$DATA as suffix.
Message SequenceCreateFile with ::$Data as file name suffix.
QueryInfo with FileInfoClass.FileAccessInformation
Verify server responses accordingly.

FileAlignmentInformation

FileInfo_Query_FileAlignmentInformation
DescriptionThe test case is used to query the buffer alignment required by the underlying device.
Message SequenceCreateFile with normal file name.
QueryInfo with FileInfoClass.FileAlignmentInformation
Verify server returned status and returned AlignmentRequirement and bytecount accordingly.

FileAlternateNameInformation

FileInfo_Query_FileAlternateNameInformation
DescriptionTo test if SUT (NTFS) supports the alternate name and then query file alternate name info.
Message SequenceCreateFile with file name not compliant with restrictions for file names under MS-DOS and 16-bit Window (logger than 8).
QueryInfo with FileInfoClass.FileAlternateNameInformation
Verify server returned status and altername accordingly.

FileInternalInformation

FileInfo_Query_FileInternalInformation
DescriptionTo test is used to query the file system's 8-byte file reference number for a file.
Message SequenceCreateFile with normal file name.
QueryInfo with FileInfoClass.FileInternalInformation
Verify server returned status accordingly.

FileModeInformation

FileInfo_Query_FileModeInformation
DescriptionThe case is used to query the mode of the file.
Message SequenceCreateFile with normal file name and mode NO_INTERMEDIATE_BUFFERING, WRITE_THROUGH.
QueryInfo with FileInfoClass.FileModeInformation
Verify server returned status and verify the mode of FileModeInformation accordingly.

FilePositionInformation

FileInfo_Query_FilePositionInformation
DescriptionThe case is used to query the position of the file pointer within a file.
Message SequenceCreateFile with normal file name.
SetFilePositionInfo to file on server and verify the return value.
QueryInfo with FileInfoClass.FilePositionInformation
Verify server returned satus.

FileBasicInformation

FileInfo_Set_FileBasicInformation_File_Negative
DescriptionTo test if setting invalid values for file basic information attributes are handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
SetInfo with FileInfoClass.FileBasicInformation where InputBufferSize less than sizeOf(FILE_BASIC_INFORMATION)
Verify status returned is STATUS_INFO_LENGTH_MISMATCH
SetInfo with FileInfoClass.FileBasicInformation where InputBuffer.FileAttributes.FILE_ATTRIBUTE_DIRECTORY is TRUE
Verify status returned is STATUS_INVALID_PARAMETER
FileInfo_Set_FileBasicInformation_Dir_Negative
DescriptionTo test if setting invalid values for file basic information attributes are handled by different file systems for directory
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
SetInfo with FileInfoClass.FileBasicInformation where InputBufferSize less than sizeOf(FILE_BASIC_INFORMATION)
Verify status returned should be STATUS_INFO_LENGTH_MISMATCH
SetInfo with FileInfoClass.FileBasicInformation where InputBuffer.FileAttributes.FILE_ATTRIBUTE_TEMPORARY is TRUE
Verify status returned should be STATUS_INVALID_PARAMETER
FileInfo_Set_FileBasicInformation_File_LastWriteTime
DescriptionTo test if setting LastWriteTime with FileBasicInformation are supported by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
SetInfo with FileInfoClass.FileBasicInformation where LastWriteTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for LastWriteTime
Verify returned values for LastWriteTime matches set values
FileInfo_Set_FileBasicInformation_Dir_LastWriteTime
DescriptionTo test if setting LastWriteTime with FileBasicInformation are supported by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
SetInfo with FileInfoClass.FileBasicInformation where LastWriteTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for LastWriteTime
Verify returned values for LastWriteTime matches set values
FileInfo_Set_FileBasicInformation_File_CreationTime
DescriptionTo test if setting CreationTime with FileBasicInformation are supported by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
SetInfo with FileInfoClass.FileBasicInformation where CreationTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for CreationTime
Verify returned values for CreationTime matches set values
FileInfo_Set_FileBasicInformation_Dir_CreationTime
DescriptionTo test if setting CreationTime with FileBasicInformation are supported by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
SetInfo with FileInfoClass.FileBasicInformation where CreationTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for CreationTime
Verify returned values for CreationTime matches set values
FileInfo_Set_FileBasicInformation_File_ChangeTime
DescriptionTo test if setting ChangeTime with FileBasicInformation are supported by different file systems for data file
Note: The FAT32 file system doesn’t process the ChangeTime field
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
SetInfo with FileInfoClass.FileBasicInformation where ChangeTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for ChangeTime
Verify returned values for ChangeTime matches set values
FileInfo_Set_FileBasicInformation_Dir_ChangeTime
DescriptionTo test if setting ChangeTime with FileBasicInformation are supported by different file systems for directory file
Note: The FAT32 file system doesn’t process the ChangeTime field
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
SetInfo with FileInfoClass.FileBasicInformation where ChangeTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for ChangeTime
Verify returned values for ChangeTime matches set values
FileInfo_Set_FileBasicInformation_File_LastAccessTime
DescriptionTo test if setting LastAccessTime with FileBasicInformation are supported by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
SetInfo with FileInfoClass.FileBasicInformation where LastAccessTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for LastAccessTime
Verify returned values for LastAccessTime matches set values
FileInfo_Set_FileBasicInformation_Dir_LastAccessTime
DescriptionTo test if setting LastAccessTime with FileBasicInformation are supported by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
SetInfo with FileInfoClass.FileBasicInformation where LastAccessTime is set to valid timestamp
QueryInfo with FileInfoClass.FileBasicInformation for LastAccessTime
Verify returned values for LastAccessTime matches set values

CreationTime

FileInfo_Query_FileBasicInformation_File_CreationTime
DescriptionTo test if CreationTime is handled by different file systems for data file using FileBasicInformation
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query CreationTime
Write to file
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileBasicInformation_Dir_CreationTime
DescriptionTo test if CreationTime is handled by different file systems for directory file using FileBasicInformation
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Create file into directory
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileBasicInformation_File_CreationTime_Zero
DescriptionTo test if CreationTime is handled by different file systems for data file when CreationTime is set to 0
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query CreationTime
Set CreationTime to 0
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileBasicInformation_Dir_CreationTime_Zero
DescriptionTo test if CreationTime is handled by different file systems for directory file when CreationTime is set to 0
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Set CreationTime to 0
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileBasicInformation_File_CreationTime_MinusTwo
DescriptionTo test if CreationTime is handled by different file systems for data file when CreationTime is set to -2
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query CreationTime
Set CreationTime to -1
Write to file
Query CreationTime
Verify CreationTime was not changed
Set CreationTime to -2
Write to file
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileBasicInformation_Dir_CreationTime_MinusTwo
DescriptionTo test if CreationTime is handled by different file systems for directory file when CreationTime is set to -2
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Set CreationTime to -1
Create file into directory
Query CreationTime
Verify CreationTime was not changed
Set CreationTime to -2
Create file into directory
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileBasicInformation_File_CreationTime_Negative
DescriptionTo test if CreationTime value less than -2 is handled by different file systems for data file using FileBasicInformation
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Set CreationTime to -3
Verify status returned should be STATUS_INVALID_PARAMETER
FileInfo_Query_FileBasicInformation_Dir_CreationTime_Negative
DescriptionTo test if CreationTime value less than -2 is handled by different file systems for directory using FileBasicInformation
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Set CreationTime to -3
Verify status returned should be STATUS_INVALID_PARAMETER
FileInfo_Query_FileBothDirectoryInformation_Dir_CreationTime
DescriptionTo test if CreationTime is handled by different file systems for directory file using FileBothDirectoryInformation
File information class: FileBothDirectoryInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Create file into directory
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileFullDirectoryInformation_Dir_CreationTime
DescriptionTo test if CreationTime is handled by different file systems for directory file using FileFullDirectoryInformation
File information class: FileFullDirectoryInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Create file into directory
Query CreationTime
Verify CreationTime was not changed
FileInfo_Query_FileIdGlobalTxDirectoryInformation_Dir_CreationTime
DescriptionTo test if CreationTime is handled by different file systems for directory file using FileIdGlobalTxDirectoryInformation
File information class: FileIdGlobalTxDirectoryInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Create file into directory
Query CreationTime
Verify CreationTime was not changed

FileInfo_Set_FileBasicInformation_Timestamp_Zero

FileInfo_Set_FileBasicInformation_Timestamp_Zero_File_ChangeTime
DescriptionTo test if setting ChangeTime value to 0 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query ChangeTime
Set ChangeTime to 0
Query ChangeTime
Verify ChangeTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Zero_Dir_ChangeTime
DescriptionTo test if setting ChangeTime value to 0 is handled by different file systems for directory
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query ChangeTime
Set ChangeTime to 0
Query ChangeTime
Verify ChangeTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Zero_File_LastWriteTime
DescriptionTo test if setting LastWriteTime value to 0 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query LastWriteTime
Set LastWriteTime to 0
Query LastWriteTime
Verify LastWriteTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Zero_Dir_LastWriteTime
DescriptionTo test if setting LastWriteTime value to 0 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query LastWriteTime
Set LastWriteTime to 0
Query LastWriteTime
Verify LastWriteTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Zero_File_LastAccessTime
DescriptionTo test if setting LastAccessTime value to 0 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query LastAccessTime
Set LastAccessTime to 0
Query LastAccessTime
Verify LastAccessTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Zero_Dir_LastAccessTime
DescriptionTo test if setting LastAccessTime value to 0 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query LastAccessTime
Set LastAccessTime to 0
Query LastAccessTime
Verify LastAccessTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Zero_File_CreationTime
DescriptionTo test if setting CreationTime value to 0 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query CreationTime
Set CreationTime to 0
Query CreationTime
Verify CreationTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Zero_Dir_CreationTime
DescriptionTo test if setting CreationTime value to 0 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Set CreationTime to 0
Query CreationTime
Verify CreationTime was not changed

FileInfo_Set_FileBasicInformation_Timestamp_MinusOne

FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_File_ChangeTime
DescriptionTo test if setting ChangeTime value to -1 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query ChangeTime
Set ChangeTime to -1
Write to file
Query ChangeTime
Verify ChangeTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_Dir_ChangeTime
DescriptionTo test if setting ChangeTime value to -1 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query ChangeTime
Set ChangeTime to -1
Write to file
Query ChangeTime
Verify ChangeTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_File_LastWriteTime
DescriptionTo test if setting LastWriteTime value to -1 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query LastWriteTime
Set LastWriteTime to -1
Write to file
Query LastWriteTime
Verify LastWriteTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_Dir_LastWriteTime
DescriptionTo test if setting LastWriteTime value to -1 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query LastWriteTime
Set LastWriteTime to -1
Write to file
Query LastWriteTime
Verify LastWriteTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_File_LastAccessTime
DescriptionTo test if setting LastAccessTime value to -1 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query LastAccessTime
Set LastAccessTime to -1
Write to file
Query LastAccessTime
Verify LastAccessTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_Dir_LastAccessTime
DescriptionTo test if setting LastAccessTime value to -1 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query LastAccessTime
Set LastAccessTime to -1
Write to file
Query LastAccessTime
Verify LastAccessTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_File_CreationTime
DescriptionTo test if setting CreationTime value to -1 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query CreationTime
Set CreationTime to -1
Write to file
Query CreationTime
Verify CreationTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusOne_Dir_CreationTime
DescriptionTo test if setting CreationTime value to -1 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query CreationTime
Set CreationTime to -1
Write to file
Query CreationTime
Verify CreationTime was not changed

FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo

FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo_File_ChangeTime
DescriptionTo test if setting ChangeTime value to -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query ChangeTime
Set ChangeTime to -1
Write to file
Query ChangeTime
Verify ChangeTime was not changed
Set ChangeTime to -2
Write to file
Query ChangeTime
Verify ChangeTime was updated to current time
FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo_Dir_ChangeTime
DescriptionTo test if setting ChangeTime value to -2 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query ChangeTime
Set ChangeTime to -1
Write to AlternativeDataStream
Query ChangeTime
Verify ChangeTime was not changed
Set ChangeTime to -2
Write to AlternativeDataStream
Query ChangeTime
Verify ChangeTime was updated to current time
FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo_File_LastWriteTime
DescriptionTo test if setting LastWriteTime value to -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query LastWriteTime
Set LastWriteTime to -1
Write to file
Query LastWriteTime
Verify LastWriteTime was not changed
Set LastWriteTime to -2
Write to file
Query LastWriteTime
Verify LastWriteTime was updated to current time
FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo_Dir_LastWriteTime
DescriptionTo test if setting LastWriteTime value to -2 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Query LastWriteTime
Set LastWriteTime to -1
Write to AlternateDataStream
Query LastWriteTime
Verify LastWriteTime was not changed
Set LastWriteTime to -2
Write to AlternateDataStream
Query LastWriteTime
Verify LastWriteTime was updated to current time
FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo_File_LastAccessTime
DescriptionTo test if setting LastAccessTime value to -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query LastAccessTime
Set LastAccessTime to -1
Write to file
Query LastAccessTime
Verify LastAccessTime was not changed
Set LastAccessTime to -2
Write to file
Query LastAccessTime
Verify LastAccessTime was updated to current time
FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo_File_CreationTime
DescriptionTo test if setting CreationTime value to -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query CreationTime
Set CreationTime to -1
Write to file
Query CreationTime
Verify CreationTime was not changed
Set CreationTime to -2
Write to file
Query CreationTime
Verify CreationTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_MinusTwo_Dir_CreationTime
DescriptionTo test if setting CreationTime value to -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Query CreationTime
Set CreationTime to -1
Write to file
Query CreationTime
Verify CreationTime was not changed
Set CreationTime to -2
Write to file
Query CreationTime
Verify CreationTime was not changed
FileInfo_Set_FileBasicInformation_Timestamp_Negative_File_LastAccessTime
DescriptionTo test if setting LastAccessTime value less than -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Set LastAccessTime to -3
Verify STATUS_INVALID_PARAMETER is returned
FileInfo_Set_FileBasicInformation_Timestamp_Negative_Dir_LastAccessTime
DescriptionTo test if setting LastAccessTime value less than -2 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Set LastAccessTime to -3
Verify STATUS_INVALID_PARAMETER is returned
FileInfo_Set_FileBasicInformation_Timestamp_Negative_File_LastWriteTime
DescriptionTo test if setting LastWriteTime value less than -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Set LastWriteTime to -3
Verify STATUS_INVALID_PARAMETER is returned
FileInfo_Set_FileBasicInformation_Timestamp_Negative_Dir_LastWriteTime
DescriptionTo test if setting LastAccessTime value less than -2 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Set LastWriteTime to -3
Verify STATUS_INVALID_PARAMETER is returned
FileInfo_Set_FileBasicInformation_Timestamp_Negative_File_ChangeTime
DescriptionTo test if setting ChangeTime value less than -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Set ChangeTime to -3
Verify STATUS_INVALID_PARAMETER is returned
FileInfo_Set_FileBasicInformation_Timestamp_Negative_Dir_ChangeTime
DescriptionTo test if setting ChangeTime value less than -2 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Set ChangeTime to -3
Verify STATUS_INVALID_PARAMETER is returned
FileInfo_Set_FileBasicInformation_Timestamp_Negative_File_CreationTime
DescriptionTo test if setting CreationTime value less than -2 is handled by different file systems for data file
File information class: FileBasicInformation
Message SequenceCreateFile (DataFile).
Set CreationTime to -3
Verify STATUS_INVALID_PARAMETER is returned
FileInfo_Set_FileBasicInformation_Timestamp_Negative_Dir_CreationTime
DescriptionTo test if setting CreationTime value less than -2 is handled by different file systems for directory file
File information class: FileBasicInformation
Message SequenceCreateFile (DirectoryFile).
Set CreationTime to -3
Verify STATUS_INVALID_PARAMETER is returned

Test cases for FileSystemInformation

IsObjectIdSupported

FsInfo_Query_FileFsObjectIdInformation_File_IsObjectIdSupported (BVT)
DescriptionTo test if object id is supported for different file systems.
Note: ReFS does not support object IDs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsObjectIdSupported == True | STATUS_SUCCESS
IsObjectIdSupported == False | STATUS_INVALID_PARAMETER
Message SequenceCreateFile (DataFile)
QueryInfo with FsInfoClass.FileFsObjectIdInformation
If (IsObjectIdSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FsInfo_Query_FileFsObjectIdInformation_Dir_IsObjectIdSupported
DescriptionTo test if object id is supported for different file systems.
Note: ReFS does not support object IDs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsObjectIdSupported == True | STATUS_SUCCESS
IsObjectIdSupported == False | STATUS_INVALID_PARAMETER
Message SequenceCreateFile (DirectoryFile)
QueryInfo with FsInfoClass.FileFsObjectIdInformation
If (IsObjectIdSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FsInfo_Query_FileFsObjectIdInformation_File_OutputBufferSize_TooSmall
DescriptionTo test the response if object id is supported and the output buffer is set too small.
Note: ReFS does not support object IDs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
OutputBufferSize < sizeof(FILE_FS_OBJECT_ID_INFORMATION) | STATUS_INFO_LENGTH_MISMATCH
Message SequenceCreateFile (DataFile)
QueryInfo with FsInfoClass.FileFsObjectIdInformation and OutputBufferSize < sizeof(FILE_FS_OBJECT_ID_INFORMATION)
Assert.AreEqual(STATUS_INFO_LENGTH_MISMATCH, ActualResult);
FsInfo_Query_FileFsObjectIdInformation_Dir_OutputBufferSize_TooSmall
DescriptionTo test the response if object id is supported and the output buffer is set too small.
Note: ReFS does not support object IDs.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
OutputBufferSize < sizeof(FILE_FS_OBJECT_ID_INFORMATION) | STATUS_INFO_LENGTH_MISMATCH
Message SequenceCreateFile (DirectoryFile)
QueryInfo with FsInfoClass.FileFsObjectIdInformation and OutputBufferSize < sizeof(FILE_FS_OBJECT_ID_INFORMATION)
Assert.AreEqual(STATUS_INFO_LENGTH_MISMATCH, ActualResult);

IsFsSectorSizeInformationSupported

FsInfo_Query_FileFsSectorSizeInformation_File_OutputBufferSize (3TCs, 1BVT)
DescriptionTo query FileFsSectorSizeInformation with different buffer sizes.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) - 1 | STATUS_INFO_LENGTH_MISMATCH
OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) | STATUS_SUCCESS
OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) + 1 | STATUS_SUCCESS
Message SequenceCreateFile (DataFile)
QueryInfo with FileSystemInfoClass.File_FsSectorSizeInformation
If (OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) - 1) {
    Assert.AreEqual(STATUS_INFO_LENGTH_MISMATCH, ActualResult);
}
If (OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION)) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
}
If (OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) + 1) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
}
FsInfo_Query_FileFsSectorSizeInformation_Dir_OutputBufferSize (3TCs)
DescriptionTo query FileFsSectorSizeInformation with different buffer sizes.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) - 1 | STATUS_INFO_LENGTH_MISMATCH
OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) | STATUS_SUCCESS
OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) + 1 | STATUS_SUCCESS
Message SequenceCreateFile (DirectoryFile)
QueryInfo with FileSystemInfoClass.File_FsSectorSizeInformation
If (OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) - 1) {
    Assert.AreEqual(STATUS_INFO_LENGTH_MISMATCH, ActualResult);
}
If (OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION)) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
}
If (OutputBufferSize == sizeof(FILE_FS_SECTOR_SIZE_INFORMATION) + 1) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
}
FsInfo_Query_FileFsSectorSizeInformation_File_OutputValue_Common
DescriptionTo test the output buffer for FILE_FS_SECTOR_SIZE_INFORMATION.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
QueryInfo with FileSystemInfoClass.FileFsSectorSizeInformation
Verify LogicalBytesPerSector is correctly set.
Verify PhysicalBytesPerSectorForAtomicity is correctly set.
Verify PhysicalBytesPerSectorForPerformance is correctly set.
Verify FileSystemEffectivePhysicalBytesPerSectorForAtomicity is correctly set.
FsInfo_Query_FileFsSectorSizeInformation_Dir_OutputValue_Common
DescriptionTo test the output buffer for FILE_FS_SECTOR_SIZE_INFORMATION.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (Directory)
QueryInfo with FileSystemInfoClass.FileFsSectorSizeInformation
Verify LogicalBytesPerSector is correctly set.
Verify PhysicalBytesPerSectorForAtomicity is correctly set.
Verify PhysicalBytesPerSectorForPerformance is correctly set.
Verify FileSystemEffectivePhysicalBytesPerSectorForAtomicity is correctly set.
FsInfo_Set_FileFsSectorSizeInformation_File_InvalidInfoClass
DescriptionTo test invalid operation for setting FILE_FS_SECTOR_SIZE_INFORMATION.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
SetInfo with FileSystemInfoClass.FileFsSectorSizeInformation
Assert.AreEqual(STATUS_INVALID_INFO_CLASS, ActualResult);
FsInfo_Set_FileFsSectorSizeInformation_Dir_InvalidInfoClass
DescriptionTo test invalid operation for setting FILE_FS_SECTOR_SIZE_INFORMATION.
Test environment: NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
SetInfo with FileSystemInfoClass.FileFsSectorSizeInformation
Assert.AreEqual(STATUS_INVALID_INFO_CLASS, ActualResult);

IsFsAttributeInformationSupported

FsInfo_Query_FileFsAttributeInformation_File_IsCompressionSupported (BVT)
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsCompressionSupported == True) {
    Verify FileAttribute.FILE_FILE_COMPRESSION is set.
} Else {
    Verify FileAttribute.FILE_FILE_COMPRESSION is not set.
}
FsInfo_Query_FileFsAttributeInformation_Dir_IsCompressionSupported
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsCompressionSupported == True) {
    Verify FileAttribute.FILE_FILE_COMPRESSION is set.
} Else {
    Verify FileAttribute.FILE_FILE_COMPRESSION is not set.
}
FsInfo_Query_FileFsAttributeInformation_File_IsIntegritySupported (BVT)
DescriptionTo test if Integrity is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsIntegritySupported == True) {
    Verify FileAttribute.FILE_SUPPORT_INTEGRITY_STREAMS is set.
} Else {
    Verify FileAttribute.FILE_SUPPORT_INTEGRITY_STREAMS is not set.
}
FsInfo_Query_FileFsAttributeInformation_Dir_IsIntegritySupported
DescriptionTo test if Integrity is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsIntegritySupported == True) {
    Verify FileAttribute.FILE_SUPPORT_INTEGRITY_STREAMS is set.
} Else {
    Verify FileAttribute.FILE_SUPPORT_INTEGRITY_STREAMS is not set.
}
FsInfo_Query_FileFsAttributeInformation_File_IsEncryptionSupported (BVT)
DescriptionTo test if Encryption is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsEncryptionSupported == True) {
    Verify FileAttribute.FILE_SUPPORTS_ENCRYPTION is set.
} Else {
    Verify FileAttribute.FILE_SUPPORTS_ENCRYPTION is not set.
}
FsInfo_Query_FileFsAttributeInformation_Dir_IsEncryptionSupported
DescriptionTo test if Encryption is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsEncryptionSupported == True) {
    Verify FileAttribute.FILE_SUPPORTS_ENCRYPTION is set.
} Else {
    Verify FileAttribute.FILE_SUPPORTS_ENCRYPTION is not set.
}
FsInfo_Query_FileFsAttributeInformation_File_IsObjectIDsSupported (BVT)
DescriptionTo test if ObjectIDs is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsObjectIDsSupported == True) {
    Verify FileAttribute.FILE_FILE_SUPPORTS_OBJECT_IDS is set.
} Else {
    Verify FileAttribute.FILE_FILE_SUPPORTS_OBJECT_IDS is not set.
}
FsInfo_Query_FileFsAttributeInformation_Dir_IsObjectIDsSupported
DescriptionTo test if ObjectIDs is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
QueryInfo for FileInfoClass.FileFsAttributeInformation
If (IsObjectIDsSupported == True) {
    Verify FileAttribute.FILE_FILE_SUPPORTS_OBJECT_IDS is set.
} Else {
    Verify FileAttribute.FILE_FILE_SUPPORTS_OBJECT_IDS is not set.
}

IsFsSizeInformationSupported

FsInfo_Query_FileFsSizeInformation_File_SectorsPerAllocationUnit (BVT)
DescriptionTo test cluster size for different file systems.
For ClusterSize:
FAT32 uses a default cluster size of 4KB.
NTFS uses a default cluster size of 4KB.
ReFS uses a default cluster size of 64KB.
For LogicalBytesPerSector:
MUST be greater than or equal to 512 bytes.
For FileFsSizeInformation:
OutputBuffer.SectorsPerAllocationUnit set to Open.File.Volume.ClusterSize / Open.File.Volume.LogicalBytesPerSector
So for FAT32, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For NTFS, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For ReFS, SectorsPerAllocationUnit = 64KB/512 bytes = 128.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
FileSystem == FAT32 | SectorsPerAllocationUnit = 8
FileSystem == NTFS | SectorsPerAllocationUnit = 8
FileSystem == ReFS | SectorsPerAllocationUnit = 128
Message SequenceCreateFile (DataFile)
QueryInfo with FsInfoClass.FileFsSizeInformation
Verify the OutputBuffer.SectorsPerAllocationUnit is correctly set according to default cluster size.
If (FileSystem == FAT32) {
    ExpectedUnits = FAT32.DefaultClusterSize / LogicalBytesPerSector;
    Assert.AreEqual(ExpectedUnits, OutputBuffer.SectorsPerAllocationUnit);
} Else If (FileSystem == NTFS) {
    ExpectedUnits = NTFS.DefaultClusterSize / LogicalBytesPerSector;
    Assert.AreEqual(ExpectedUnits, OutputBuffer.SectorsPerAllocationUnit);
} Else If (FileSystem == ReFS) {
    ExpectedUnits = ReFS.DefaultClusterSize / LogicalBytesPerSector;
    Assert.AreEqual(ExpectedUnits, OutputBuffer.SectorsPerAllocationUnit);
}
FsInfo_Query_FileFsSizeInformation_Dir_SectorsPerAllocationUnit
DescriptionTo test cluster size for different file systems.
For ClusterSize:
FAT32 uses a default cluster size of 4KB.
NTFS uses a default cluster size of 4KB.
ReFS uses a default cluster size of 64KB.
For LogicalBytesPerSector:
MUST be greater than or equal to 512 bytes.
For FileFsSizeInformation:
OutputBuffer.SectorsPerAllocationUnit set to Open.File.Volume.ClusterSize / Open.File.Volume.LogicalBytesPerSector
So for FAT32, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For NTFS, SectorsPerAllocationUnit = 4KB/512 bytes = 8.
For ReFS, SectorsPerAllocationUnit = 64KB/512 bytes = 128.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
FileSystem == FAT32 | SectorsPerAllocationUnit = 8
FileSystem == NTFS | SectorsPerAllocationUnit = 8
FileSystem == ReFS | SectorsPerAllocationUnit = 128
Message SequenceCreateFile (DirectoryFile)
QueryInfo with FsInfoClass.FileFsSizeInformation
Verify the OutputBuffer.SectorsPerAllocationUnit is correctly set according to default cluster size.
If (FileSystem == FAT32) {
    ExpectedUnits = FAT32.DefaultClusterSize / LogicalBytesPerSector;
    Assert.AreEqual(ExpectedUnits, OutputBuffer.SectorsPerAllocationUnit);
} Else If (FileSystem == NTFS) {
    ExpectedUnits = NTFS.DefaultClusterSize / LogicalBytesPerSector;
    Assert.AreEqual(ExpectedUnits, OutputBuffer.SectorsPerAllocationUnit);
} Else If (FileSystem == ReFS) {
    ExpectedUnits = ReFS.DefaultClusterSize / LogicalBytesPerSector;
    Assert.AreEqual(ExpectedUnits, OutputBuffer.SectorsPerAllocationUnit);
}

Test cases for FsControlRequest

IsAllocatedRangesSupported

FsCtl_Query_AllocatedRanges_File_IsAllocatedRangesSupported
DescriptionTo test if FSCTL_QUERY_ALLOCATED_RANGES is supported for different file systems.
Note: This is only implemented by the ReFS and NTFS file systems.
Test environment: FAT32, NTFS, ReFS
FsCtl Request: FSCTL_QUERY_ALLOCATED_RANGES
Parameter combination
Parameter | Expected Result
IsAllocatedRangesSupported == True | STATUS_SUCCESS
IsAllocatedRangesSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FsCtl request with FSCTL_QUERY_ALLOCATED_RANGES
If (IsAllocatedRangesSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Query_AllocatedRanges_Dir_IsAllocatedRangesSupported
DescriptionTo test if FSCTL_QUERY_ALLOCATED_RANGES is supported for different file systems.
Note: This is only implemented by the ReFS and NTFS file systems.
Test environment: FAT32, NTFS, ReFS
FsCtl Request: FSCTL_QUERY_ALLOCATED_RANGES
Parameter combination
Parameter | Expected Result
IsAllocatedRangesSupported == True | STATUS_INVALID_PARAMETER
IsAllocatedRangesSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FsCtl request with FSCTL_QUERY_ALLOCATED_RANGES
If (IsAllocatedRangesSupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER,ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST,ActualResult);
}

IsReparsePointSupported

FsCtl_Get_ReparsePoint_IsReparsePointSupported
DescriptionTo test if FSCTL_GET_REPARSE_POINT is supported for different file systems.
Note: This is only implemented by the ReFS and NTFS file systems.
Test environment: FAT32, NTFS, ReFS
FsCtl Request: FSCTL_GET_REPARSE_POINT
Parameter combination
Parameter | Expected Result
IsReparsePointSupported == True | STATUS_SUCCESS
IsReparsePointSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FsCtl request with FSCTL_GET_REPARSE_POINT
If (IsReparsePointSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}

IsSparseFileSupported

FsCtl_Set_Sparse_File_IsSparseFileSupported
DescriptionTo test if FSCTL_SET_SPARSE is supported for different file systems.
Note: This is only implemented by the NTFS file system.
Test environment: FAT32, NTFS, ReFS
FsCtl: FSCTL_SET_SPARSE
Parameter combination
Parameter | Expected Result
FileSystem == FAT32 | STATUS_INVALID_DEVICE_REQUEST
IsSparseFileSupported == True | STATUS_SUCCESS
IsSparseFileSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FsCtl request with FSCTL_SET_SPARSE
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
If (IsSparseFileSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Set_Sparse_Dir_IsSparseFileSupported
DescriptionTo test if FSCTL_SET_SPARSE is supported for different file systems.
Note: This is only implemented by the NTFS file system.
Test environment: FAT32, NTFS, ReFS
FsCtl: FSCTL_SET_SPARSE
Parameter combination
Parameter | Expected Result
FileSystem == FAT32 | STATUS_INVALID_DEVICE_REQUEST
FileSystem == CSVFS | STATUS_NOT_IMPLEMENTED
Other combinations | STATUS_INVALID_PARAMETER
Message SequenceCreateFile (DirectoryFile)
FsCtl request with FSCTL_SET_SPARSE
If (FileSystem == FAT32) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
If (FileSystem == CSVFS) {
    Assert.AreEqual(STATUS_NOT_IMPLEMENTED, ActualResult);
} Else {
    Assert.AreEqual(INVALID_PARAMETER, ActualResult);
}

IsZeroDataSupported

FsCtl_Set_ZeroData_File_IsZeroDataSupported
DescriptionTo test if FSCTL_SET_ZERO_DATA is supported for different file systems.
Note: This is only implemented by the ReFS and NTFS file systems.
Test environment: FAT32, NTFS, ReFS
FsCtl Request: FSCTL_SET_ZERO_DATA
Parameter combination
Parameter | Expected Result
IsSetZeroDataSupported == True | STATUS_SUCCESS
IsSetZeroDataSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FsCtl request with FSCTL_SET_ZERO_DATA
If (IsZeroDataSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Set_ZeroData_Dir_IsZeroDataSupported
DescriptionTo test if FSCTL_SET_ZERO_DATA is supported for different file systems.
Note: This is only implemented by the ReFS and NTFS file systems.
Test environment: FAT32, NTFS, ReFS
FsCtl Request: FSCTL_SET_ZERO_DATA
Parameter combination
Parameter | Expected Result
IsSetZeroDataSupported == True && FileSystem == CSVFS | STATUS_NOT_IMPLEMENTED
IsSetZeroDataSupported == True | INVALID_PARAMETER
IsSetZeroDataSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FsCtl request with FSCTL_SET_ZERO_DATA
If (IsSetZeroDataSupported == True) {
    If (FileSystem == CSVFS) {
        Assert.AreEqual(STATUS_NOT_IMPLEMENTED, ActualResult);
    } Else {
        Assert.AreEqual(INVALID_PARAMETER, ActualResult);
    }
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}

IsDuplicateExtentsToFileExSupported

BVT_FsCtl_DuplicateExtentsToFileEx_IsBasicSupported
DescriptionTo test if FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX without additional flags is supported.
Note: This is only implemented by the REFS file system.
Test environment: ReFS
FsCtl: FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX
Message SequenceCreate test file (DataFile) and fill up first two clusters with random data.
FsCtl request with FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX and no additional flags to duplicate the file extent of first cluster to the second.
Verify returned NTSTATUS code and file content by checking the following:
1. The returned status is STATUS_SUCCESS.
2. The file content of the second cluster is the same as the first.
BVT_FsCtl_DuplicateExtentsToFileEx_IsSourceAtomicSupported
DescriptionTo test if FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX with DUPLICATE_EXTENTS_DATA_EX_SOURCE_ATOMIC is supported.
Note: This is only implemented by the REFS file system.
Test environment: ReFS
FsCtl: FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX
Message SequenceCreate test file (DataFile) and fill up first two clusters with random data.
FsCtl request with FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX and DUPLICATE_EXTENTS_DATA_EX_SOURCE_ATOMIC to duplicate the file extent of first cluster to the second.
Verify returned NTSTATUS code and file content by checking the following:
1. The returned status is STATUS_SUCCESS.
2. The file content of the second cluster is the same as the first.

IsGetIntegrityInformationSupported

FsCtl_Get_IntegrityInformation_File_IsIntegritySupported (BVT)
DescriptionTo test if FSCTL request FSCTL_GET_INTEGRITY_INFORMATION is supported
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_SUCCESS
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Get_IntegrityInformation_Dir_IsIntegritySupported (BVT)
DescriptionTo test if FSCTL request FSCTL_GET_INTEGRITY_INFORMATION is supported
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_SUCCESS
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Get_IntegrityInformation_File_InvalidParameter (2TCs)
Test caseFsCtl_Get_IntegrityInformation_File_OutputBufferSizeLessThanIntegrityBuffer
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_INVALID_PARAMETER
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FsCtl request FSCTL_GET_INTEGRITY_INFORMATION with OutputBufferSize = sizeof(FSCTL_GET_INTEGRITY_INFORMATION_BUFFER) -1
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test caseFsCtl_Get_IntegrityInformation_File_SystemFile
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_SUCCESS
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile) with FileAttributes.FILE_ATTRIBUTE_SYSTEM
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Get_IntegrityInformation_Dir_InvalidParameter (2TCs)
Test caseFsCtl_Get_IntegrityInformation_Dir_OutputBufferSizeLessThanIntegrityBuffer
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_INVALID_PARAMETER
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FsCtl request FSCTL_GET_INTEGRITY_INFORMATION with OutputBufferSize = sizeof(FSCTL_GET_INTEGRITY_INFORMATION_BUFFER) -1
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test caseFsCtl_Get_IntegrityInformation_Dir_SystemFile
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_SUCCESS
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile) with FileAttributes.FILE_ATTRIBUTE_SYSTEM
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Get_IntegrityInformation_File_OutputValue (2TCs)
Test caseFsCtl_Get_IntegrityInformation_File_OutputValue_Common
DescriptionTo test the output value for FSCTL_GET_INTEGRITY_INFORMATION.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
Send a valid FsControl request with FSCTL_GET_INTEGRITY_INFORMATION
Verify server returns STATUS_SUCCESS for supported file systems.
Or verify server returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.
Verify the following values are correct:
OutputBuffer.CheckSumAlgorithm is one of the values for ChecksumAlgorithm.
OutputBuffer.ClusterSizeInBytes is equal to Open.File.Volume.ClusterSizeInKB * 1024.
OutputBuffer.Flags is not set to CHECKSUM_ENFORCEMENT_OFF.
Test caseFsCtl_Get_IntegrityInformation_File_OutputValue_ChecksumEnforcement
DescriptionTo test the OutputBuffer.Flags for CHECKSUM_ENFORCEMENT_OFF.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile, StreamType is DataStream)
Send a valid FsControl request with FSCTL_SET_INTEGRITY_INFORMATION with Flags set to CHECKSUM_ENFORCEMENT_OFF.
Verify server returns STATUS_SUCCESS for supported file systems.
Or verify server returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.
Send a valid FsControl request with FSCTL_GET_INTEGRITY_INFORMATION.
Verify OutputBuffer.Flags is set to CHECKSUM_ENFORCEMENT_OFF.
FsCtl_Get_IntegrityInformation_Dir_OutputValue (2TCs)
Test caseFsCtl_Get_IntegrityInformation_Dir_OutputValue_Common
DescriptionTo test the output value for FSCTL_GET_INTEGRITY_INFORMATION.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
Send a valid FsControl request with FSCTL_GET_INTEGRITY_INFORMATION
Verify server returns STATUS_SUCCESS for supported file systems.
Or verify server returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.
Verify the following values are correct:
OutputBuffer.CheckSumAlgorithm is one of the values for ChecksumAlgorithm.
OutputBuffer.ClusterSizeInBytes is equal to Open.File.Volume.ClusterSizeInKB * 1024.
OutputBuffer.Flags is not set to CHECKSUM_ENFORCEMENT_OFF.
Test caseFsCtl_Get_IntegrityInformation_Dir_OutputValue_ChecksumEnforcement
DescriptionTo test the OutputBuffer.Flags for CHECKSUM_ENFORCEMENT_OFF.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile, StreamType is DataStream)
Send a valid FsControl request with FSCTL_SET_INTEGRITY_INFORMATION with Flags set to CHECKSUM_ENFORCEMENT_OFF.
Verify server returns STATUS_SUCCESS for supported file systems.
Or verify server returns STATUS_INVALID_DEVICE_REQUEST for unsupported file systems.
Send a valid FsControl request with FSCTL_GET_INTEGRITY_INFORMATION.
Verify OutputBuffer.Flags is set to CHECKSUM_ENFORCEMENT_OFF.

IsSetIntegrityInformationSupported

FsCtl_Set_IntegrityInformation_File_IsIntegritySupported (BVT)
DescriptionTo test if FSCTL request FSCTL_SET_INTEGRITY_INFORMATION is supported.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_SUCCESS
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FSCTL request with FSCTL_SET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Set_IntegrityInformation_Dir_IsIntegritySupported (BVT)
DescriptionTo test if FSCTL request FSCTL_SET_INTEGRITY_INFORMATION is supported.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_SUCCESS
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FSCTL request with FSCTL_SET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Set_IntegrityInformation_File_InvalidParameter (3TCs)
Test caseFsCtl_Set_IntegrityInformation_File_InputBufferSizeLessThanIntegrityBuffer
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_INVALID_PARAMETER
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION with InputBufferSize = sizeof(FSCTL_SET_INTEGRITY_INFORMATION_BUFFER) -1
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test caseFsCtl_Set_IntegrityInformation_File_UndefinedChecksumAlgorithm
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_INVALID_PARAMETER
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm = 0x0003
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test caseFsCtl_Set_IntegrityInformation_InvalidParameter_NonEmptyFile
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm = CHECKSUM_TYPE_CRC64
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
FsCtl request FSCTL_GET_INTEGRITY_INFORMATION
Verify InputBuffer.ChecksumAlgorithm is set to CHECKSUM_TYPE_CRC64
Write 1 KB data into this file to make sure it is not empty.
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm = CHECKSUM_TYPE_NONE
Assert.AreEqual(STATUS_SUCCESS,ActualResult);
FsCtl_Set_IntegrityInformation_Dir_InvalidParameter(2TCs)
Test caseFsCtl_Set_IntegrityInformation_File_InputBufferSizeLessThanIntegrityBuffer
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_INVALID_PARAMETER
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION with InputBufferSize = sizeof(FSCTL_SET_INTEGRITY_INFORMATION_BUFFER) -1
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test caseFsCtl_Set_IntegrityInformation_File_UndefinedChecksumAlgorithm
DescriptionTo test parameter check for invalid parameters.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_INVALID_PARAMETER
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DirectoryFile)
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm = 0x0003
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Set_IntegrityInformation_File_WriteProtected
DescriptionTry to set integrity information for a read only volume, it should fail with STATUS_MEDIA_WRITE_PROTECTED.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_MEDIA_WRITE_PROTECTED
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceConnect to a read only volume
OpenFile (DataFile)
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_MEDIA_WRITE_PROTECTED, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Set_IntegrityInformation_Dir_WriteProtected
DescriptionTry to set integrity information for a read only volume, it should fail with STATUS_MEDIA_WRITE_PROTECTED.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsIntegritySupported == True | STATUS_MEDIA_WRITE_PROTECTED
IsIntegritySupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceConnect to a read only volume
OpenFile (DirectoryFile)
FsCtl request FSCTL_SET_INTEGRITY_INFORMATION
If (IsIntegritySupported == True) {
    Assert.AreEqual(STATUS_MEDIA_WRITE_PROTECTED, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Set_IntegrityInformation_File_ChecksumAlgorithm (2TCs)
Test CaseFsCtl_Set_IntegrityInformation_File_ChecksumTypeNoneAndUnchanged
DescriptionTo set integrity information with different checksumAlgorithms.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_NONE and CHECKSUM_TYPE_UNCHANGED
Message SequenceCreateFile (DataFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_NONE
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_NONE, OutputBuffer.CheckSumAlgorithm);
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_UNCHANGED
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_NONE, OutputBuffer.CheckSumAlgorithm);
Test CaseFsCtl_Set_IntegrityInformation_File_ChecksumTypeCrc64AndUnchanged
DescriptionTo set integrity information with different checksumAlgorithms.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_CRC64 and CHECKSUM_TYPE_UNCHANGED
Message SequenceCreateFile (DataFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_CRC64
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_CRC64, OutputBuffer.CheckSumAlgorithm);
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_UNCHANGED
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_CRC64, OutputBuffer.CheckSumAlgorithm);
FsCtl_Set_IntegrityInformation_Dir_ChecksumAlgorithm (2TCs)
Test CaseFsCtl_Set_IntegrityInformation_File_ChecksumTypeNoneAndUnchanged
DescriptionTo set integrity information with different checksumAlgorithms.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_NONE and CHECKSUM_TYPE_UNCHANGED
Message SequenceCreateFile (DirectoryFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_NONE
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_NONE, OutputBuffer.CheckSumAlgorithm);
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_UNCHANGED
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_NONE, OutputBuffer.CheckSumAlgorithm);
Test CaseFsCtl_Set_IntegrityInformation_File_ChecksumTypeCrc64AndUnchanged
DescriptionTo set integrity information with different checksumAlgorithms.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_CRC64 and CHECKSUM_TYPE_UNCHANGED
Message SequenceCreateFile (DirectoryFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_CRC64
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    Return;
}
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_CRC64, OutputBuffer.CheckSumAlgorithm);
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.ChecksumAlgorithm set to CHECKSUM_TYPE_UNCHANGED
FSCTL request with FSCTL_GET_INTEGRITY_INFORMATION
Assert.AreEqual(CHECKSUM_TYPE_CRC64, OutputBuffer.CheckSumAlgorithm);
FsCtl_Set_IntegrityInformation_File_Flag_Invalid
Test CaseFsCtl_Set_IntegrityInformation_File_Flag_Invalid
DescriptionSet integrity information with invalid Flag value, check if server responds correctly.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.Flags set to invalid value
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FsCtl_Set_IntegrityInformation_Dir_Flag_Invalid
Test CaseFsCtl_Set_IntegrityInformation_Dir_Flag_Invalid
DescriptionSet integrity information with invalid Flag value, check if server responds correctly.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with InputBuffer.Flags set to invalid value
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FsCtl_Set_IntegrityInformation_File_CheckSumEnforcement_CheckSumType_None
Test CaseFsCtl_Set_IntegrityInformation_File_CheckSumEnforcement_CheckSumType_None
DescriptionSend FSCTL_SET_INTEGRITY_INFORMATION request to a file with ChecksumAlgorithm as CHECKSUM_TYPE_NONE and Flags as FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF, check if server responses correctly.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_NONE and FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
Message SequenceCreateFile (DataFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with ChecksumAlgorithm as CHECKSUM_TYPE_NONE and Flags as FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FsCtl_Set_IntegrityInformation_Dir_CheckSumEnforcement_CheckSumType_None
Test CaseFsCtl_Set_IntegrityInformation_Dir_CheckSumEnforcement_CheckSumType_None
DescriptionSend FSCTL_SET_INTEGRITY_INFORMATION request to a directory with ChecksumAlgorithm as CHECKSUM_TYPE_NONE and Flags as FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF, check if server responses correctly.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_NONE and FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
Message SequenceCreateFile (DirectoryFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with ChecksumAlgorithm as CHECKSUM_TYPE_NONE and Flags as FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FsCtl_Set_IntegrityInformation_File_CheckSumEnforcement_CheckSumType_Unchanged
Test CaseFsCtl_Set_IntegrityInformation_File_CheckSumEnforcement_CheckSumType_Unchanged
DescriptionSend FSCTL_SET_INTEGRITY_INFORMATION request to a file with ChecksumAlgorithm as CHECKSUM_TYPE_NONE and Flags FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF, check if server responses correctly.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_UNCHANGED and FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
Message SequenceCreateFile (DataFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with ChecksumAlgorithm as CHECKSUM_TYPE_UNCHANGED and Flags as FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}
FsCtl_Set_IntegrityInformation_Dir_CheckSumEnforcement_CheckSumType_Unchanged
Test CaseFsCtl_Set_IntegrityInformation_Dir_CheckSumEnforcement_CheckSumType_Unchanged
DescriptionSend FSCTL_SET_INTEGRITY_INFORMATION request to a directory with ChecksumAlgorithm as CHECKSUM_TYPE_NONE and Flags FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF, check if server responses correctly.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
To cover CHECKSUM_TYPE_UNCHANGED and FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
Message SequenceCreateFile (DirectoryFile)
FSCTL request FSCTL_SET_INTEGRITY_INFORMATION with ChecksumAlgorithm as CHECKSUM_TYPE_UNCHANGED and Flags as FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF
If (IsIntegritySupported == False) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} else {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
}

IsSIntegrityInformationExSupported

FsCtl_Set_IntegrityInformation_Ex_File_IsIntegritySupported
DescriptionTo test if FSCTL_SET_INTEGRITY_INFORMATION_Ex is supported.
Test environment: NTFS, ReFS
Test object: DataFile
Test coverage:
The only data item this message returns is a status code, as specified in section 2.2. Upon success,
the status code returned by the function that processes this FSCTL is STATUS_SUCCESS.
Message SequenceCreateFile(DataFile)
Set Integrity Info
Verify server responses accordingly.
FsCtl_Set_IntegrityInformation_Ex_File_IsIntegritySupported_InvalidRequest
DescriptionTo test parameter check for invalid parameters.
Test environment: NTFS, ReFS
Test object: DataFile
Test coverage:
If the input buffer length is less than the size, in bytes, of the FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX element;
the handle is not to a file or directory; or Version is not equal to 1 return STATUS_INVALID_PARAMETER.
Message SequenceCreateFile(DataFile)
Set Integrity Info
Verify server responses accordingly.
FsCtl_Set_IntegrityInformation_Ex_DirectoryFile_IsIntegritySupported
DescriptionTo test if FSCTL_SET_INTEGRITY_INFORMATION_Ex is supported.
Test environment: NTFS, ReFS
Test object: DirectoryFile
Test coverage:
The only data item this message returns is a status code, as specified in section 2.2. Upon success,
the status code returned by the function that processes this FSCTL is STATUS_SUCCESS.
Message SequenceCreateFile(DirectoryFile)
Set Integrity Info
Verify server responses accordingly.
FsCtl_Set_IntegrityInformation_Ex_DirectoryFile_IsIntegritySupported_InvalidRequest
DescriptionTo test parameter check for invalid parameters.
Test environment: NTFS, ReFS
Test object: DirectoryFile
Test coverage:
The only data item this message returns is a status code, as specified in section 2.2. Upon success,
the status code returned by the function that processes this FSCTL is STATUS_SUCCESS.
Message SequenceCreateFile(DirectoryFile)
Set Integrity Info
Verify server responses accordingly.

IsOffloadReadSupported

FsCtl_Offload_Read_File_IsOffloadSupported (BVT)
DescriptionSupport for this read operation is optional. If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsOffloadSupported == True | STATUS_SUCCESS
IsOffloadSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FSCTL request with FSCTL_OFFLOAD_READ
If (IsOffloadSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}

IsOffloadWriteSupported

FsCtl_Offload_Write_File_IsOffloadSupported (BVT)
DescriptionSupport for this read operation is optional. If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_DEVICE_REQUEST.
Note: Only ReFS supports integrity
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsOffloadSupported == True | STATUS_SUCCESS
IsOffloadSupported == False | STATUS_INVALID_DEVICE_REQUEST
Message SequenceCreateFile (DataFile)
FSCTL request with FSCTL_OFFLOAD_WRITE
If (IsOffloadSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}

IsSetCompressionSupported

FsCtl_Set_Compression_File_IsCompressionSupported
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsCompressionSupported == True | STATUS_SUCCESS
IsCompressionSupported == False | STATUS_INVALID_DEVICE_REQUEST
IsCompressionSupported == False && FileSystem == ReFS | STATUS_NOT_SUPPORTED
Message SequenceCreateFile (DataFile)
FsCtl request with FSCTL_SET_COMPRESSION
If (IsCompressionSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    If (FileSystem == ReFS) {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    }
}
FsCtl_Set_Compression_Dir_IsCompressionSupported
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsCompressionSupported == True | STATUS_SUCCESS
IsCompressionSupported == True && FileSystem == CSVFS | STATUS_ACCESS_DENIED
IsCompressionSupported == False | STATUS_INVALID_DEVICE_REQUEST
IsCompressionSupported == False && FileSystem == ReFS | STATUS_NOT_SUPPORTED
Message SequenceCreateFile (DirectoryFile)
FsCtl request with FSCTL_SET_COMPRESSION
If (IsCompressionSupported == True) {
    If (FileSystem == CSVFS) {
        Assert.AreEqual(STATUS_ACCESS_DENIED, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_SUCCESS, ActualResult);
    }
} Else {
    If (FileSystem == ReFS) {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    }
}

IsGetCompressionSupported

FsCtl_Get_Compression_File_IsCompressionSupported
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile)
FsCtl request with FSCTL_GET_COMPRESSION
If (FileSystem == NTFS || FileSystem == ReFS) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
FsCtl_Get_Compression_Dir_IsCompressionSupported
DescriptionTo test if compression is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
FsCtl request with FSCTL_GET_COMPRESSION
If (FileSystem == NTFS || FileSystem == ReFS) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}

IsGetVolumeDataSupported

FsCtl_Get_REFS_Volume_Data_File
DescriptionTo test if FSCTL_GET_REFS_VOLUME_DATA is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_GET_REFS_VOLUME_DATA
Message SequenceCreate test file (DataFile).
Query FileIdInformation.
Query FileFsFullSizeInformation.
FSCTL request with FSCTL_GET_REFS_VOLUME_DATA.
Verify returned STATUS_SUCCESS and Verify returned REFS_VOLUME_DATA_BUFFER:
1. VolumeSerialNumber of REFS_VOLUME_DATA_BUFFER should be the same with VolumeSerialNumber of FileIdInformation.
2. TotalClusters of REFS_VOLUME_DATA_BUFFER should be the same with TotalAllocationUnits of FileFsFullSizeInformation.
3. BytesPerSector of REFS_VOLUME_DATA_BUFFER should be the same with BytesPerSector of FileFsFullSizeInformation.
FsCtl_Get_REFS_Volume_Data_Dir
DescriptionTo test if FSCTL_GET_REFS_VOLUME_DATA is supported.
Note: This is only implemented by the REFS file system file system.
FsCtl: FSCTL_GET_REFS_VOLUME_DATA
Message SequenceCreate test file directory (DirectoryFile).
Query FileIdInformation.
Query FileFsFullSizeInformation.
FSCTL request with FSCTL_GET_REFS_VOLUME_DATA.
Verify returned STATUS_SUCCESS and Verify returned REFS_VOLUME_DATA_BUFFER:
1. VolumeSerialNumber of REFS_VOLUME_DATA_BUFFER should be the same with VolumeSerialNumber of FileIdInformation.
2. TotalClusters of REFS_VOLUME_DATA_BUFFER should be the same with TotalAllocationUnits of FileFsFullSizeInformation.
3. BytesPerSector of REFS_VOLUME_DATA_BUFFER should be the same with BytesPerSector of FileFsFullSizeInformation.
FsCtl_Get_NTFS_Volume_Data_File
DescriptionTo test if FSCTL_GET_NTFS_VOLUME_DATA is supported.
Note: This is only implemented by the NTFS file system file system.
Test environment: NTFS
FsCtl: FSCTL_GET_NTFS_VOLUME_DATA
Message SequenceCreate test file (DataFile).
Query FileIdInformation.
Query FileFsFullSizeInformation.
FSCTL request with FSCTL_GET_NTFS_VOLUME_DATA.
Verify returned STATUS_SUCCESS and Verify returned NTFS_VOLUME_DATA_BUFFER:
1. VolumeSerialNumber of NTFS_VOLUME_DATA_BUFFER should be the same with VolumeSerialNumber of FileIdInformation.
2. TotalClusters of NTFS_VOLUME_DATA_BUFFER should be the same with TotalAllocationUnits of FileFsFullSizeInformation.
3. BytesPerSector of NTFS_VOLUME_DATA_BUFFER should be the same with BytesPerSector of FileFsFullSizeInformation.
FsCtl_Get_NTFS_Volume_Data_Dir
DescriptionTo test if FSCTL_GET_NTFS_VOLUME_DATA is supported.
Note: This is only implemented by the NTFS file system file system.
Test environment: NTFS
FsCtl: FSCTL_GET_NTFS_VOLUME_DATA
Message SequenceCreate test file directory (DirectoryFile).
Query FileIdInformation.
Query FileFsFullSizeInformation.
FSCTL request with FSCTL_GET_NTFS_VOLUME_DATA.
Verify returned STATUS_SUCCESS and Verify returned NTFS_VOLUME_DATA_BUFFER:
1. VolumeSerialNumber of NTFS_VOLUME_DATA_BUFFER should be the same with VolumeSerialNumber of FileIdInformation.
2. TotalClusters of NTFS_VOLUME_DATA_BUFFER should be the same with TotalAllocationUnits of FileFsFullSizeInformation.
3. BytesPerSector of NTFS_VOLUME_DATA_BUFFER should be the same with BytesPerSector of FileFsFullSizeInformation.

IsQueryFileRegionsSupported

BVT_FsCtl_Query_File_Regions
DescriptionTo test if FSCTL_QUERY_FILE_REGIONS is supported.
Note: This is only implemented by the REFS file system and NTFS file system.
Test environment: NTFS, ReFS
FsCtl: FSCTL_QUERY_FILE_REGIONS
Message SequenceCreate test file (DataFile) and fill it up with random data.
FSCTL request with FSCTL_QUERY_FILE_REGIONS, not containing input data.
Verify returned STATUS_SUCCESS and Verify returned FILE_REGION_OUTPUT:
1. RegionEntryCount of the output data element should be 1.
2. TotalRegionEntryCount of the output data element should be 1.
3. FileOffset of the FILE_REGION_INFO data element should be zero.
4. Length of the FILE_REGION_INFO data element should be the size we wrote to the file.
5. FILE_REGION_USAGE_VALID_CACHED_DATA should be set for NTFS, or FILE_REGION_USAGE_VALID_NONCACHED_DATA should be set for REFS.
BVT_FsCtl_Query_File_Regions_WithInputData
DescriptionTo test if FSCTL_QUERY_FILE_REGIONS is supported.
Note: This is only implemented by the REFS file system and NTFS file system.
Test environment: ReFS and NTFS
FsCtl: FSCTL_QUERY_FILE_REGIONS
Message SequenceCreate test file (DataFile) and fill it up with random data.
FSCTL request with FSCTL_QUERY_FILE_REGIONS, containing input data.
Verify returned STATUS_SUCCESS and Verify returned FILE_REGION_OUTPUT:
1. RegionEntryCount of the output data element should be 1.
2. TotalRegionEntryCount of the output data element should be 1.
3. FileOffset of the FILE_REGION_INFO data element should be zero.
4. Length of the FILE_REGION_INFO data element should be the size we wrote to the file.
5. FILE_REGION_USAGE_VALID_CACHED_DATA should be set for NTFS, or FILE_REGION_USAGE_VALID_NONCACHED_DATA should be set for REFS.

RefsStreamSnapshotManagement

BVT_FsCtl_RefsStreamSnapshotManagement_Create_IsSupported
DescriptionTo test if FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT with operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE.
Verify returned NT_STATUS
If (IsRefsStreamSnapshotManagementSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    If (FileSystem != ReFS) {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    }
}
BVT_FsCtl_RefsStreamSnapshotManagement_List_IsSupported
DescriptionTo test if FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT with operation REFS_STREAM_SNAPSHOT_OPERATION_LIST is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_LIST.
Verify returned NT_STATUS
If (IsRefsStreamSnapshotManagementSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    If (FileSystem != ReFS) {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    }
}
BVT_FsCtl_RefsStreamSnapshotManagement_Query_Deltas_IsSupported
DescriptionTo test if FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT with operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS.
Verify returned NT_STATUS
If (IsRefsStreamSnapshotManagementSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    If (FileSystem != ReFS) {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    }
}
BVT_FsCtl_RefsStreamSnapshotManagement_Revert_IsSupported
DescriptionTo test if FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT with operation REFS_STREAM_SNAPSHOT_OPERATION_REVERT is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_REVERT.
Verify returned NT_STATUS
If (IsRefsStreamSnapshotManagementSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    If (FileSystem != ReFS) {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    }
}
BVT_FsCtl_RefsStreamSnapshotManagement_Set_ShadowBTree_IsSupported
DescriptionTo test if FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT with operation REFS_STREAM_SNAPSHOT_OPERATION_SET_SHADOW_BTREE is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_SET_SHADOW_BTREE.
Verify returned NT_STATUS
If (IsRefsStreamSnapshotManagementSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    If (FileSystem != ReFS) {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    }
}
BVT_FsCtl_RefsStreamSnapshotManagement_Clear_ShadowBTree_IsSupported
DescriptionTo test if FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT with operation REFS_STREAM_SNAPSHOT_OPERATION_CLEAR_SHADOW_BTREE is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CLEAR_SHADOW_BTREE.
Verify returned NT_STATUS
If (IsRefsStreamSnapshotManagementSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    If (FileSystem != ReFS) {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    }
}
BVT_FsCtl_RefsStreamSnapshotManagement_Invalid_IsSupported
DescriptionTo test if FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT with operation REFS_STREAM_SNAPSHOT_OPERATION_INVALID is supported.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_INVALID.
Verify returned NT_STATUS
If (IsRefsStreamSnapshotManagementSupported == True) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    If (FileSystem != ReFS) {
        Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
    } Else {
        Assert.AreEqual(STATUS_NOT_SUPPORTED, ActualResult);
    }
}
FsCtl_RefsStreamSnapshotManagement_BufferTooSmall_OperationInputBufferLengthNotZero
DescriptionSend invalid buffer size of FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_CREATE to a file and expect STATUS_BUFFER_TOO_SMALL.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE and invalid buffer size.
Verify returned NT_STATUS is STATUS_BUFFER_TOO_SMALL
FsCtl_RefsStreamSnapshotManagement_InvalidParameter_SnapshotNameLengthZero
DescriptionSend invalid SnapshotNameLength of FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_CREATE to a data file and expect NTSTATUS is STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE and SnapshotNameLength equals zero.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_InvalidParameter_SnapshotNameLengthNotAligned
DescriptionSend unaligned SnapshotNameLength of FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_CREATE to a data file and expect NTSTATUS is STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE and SnapshotNameLength not aligned.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_Create_InvalidParameter_OutputBufferSizeNotZero
DescriptionSend invalid OutputBufferSize of FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_CREATE to a data file and expect NTSTATUS STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE and OutputBufferSize equals zero.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_List_InvalidParameter_SnapshotNameLengthZero
DescriptionSend invalid SnapshotNameLength FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_LIST to a data file and expect NTSTATUS is STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_LIST and SnapshotNameLength equals zero.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_List_InvalidParameter_OutputBufferSizeZero
DescriptionSend invalid OutputBufferSize FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_LIST to a data file and expect NTSTATUS is STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_LIST and OutputBufferSize equals zero.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_QueryDeltas_InvalidParameter_SnapshotNameLengthZero
Description"Send invalid SnapshotNameLength of FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS to a file and expect NTSTATUS is STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS and SnapshotNameLength equals zero.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_QueryDeltas_InvalidParameter_OperationBufferLengthInvalid
Description"Send invalid OperationBufferLength of FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS to a file and expect NTSTATUS is STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS and invalid OperationBufferLength.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_QueryDeltas_InvalidParameter_OutputBufferSizeZero
Description"Send invalid OutputBufferSize of FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS to a file and expect NTSTATUS is STATUS_INVALID_PARAMETER.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS and OutputBufferSize equal to zero.
Verify returned NT_STATUS is STATUS_INVALID_PARAMETER
FsCtl_RefsStreamSnapshotManagement_List_AccessDenied_LacksReadAttribute
Description"Create data file without Read Attribute then send FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_LIST to the file and expect NTSTATUS is STATUS_ACCESS_DENIED.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile) without Read Attribute
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_LIST
Verify returned NT_STATUS is STATUS_ACCESS_DENIED
FsCtl_RefsStreamSnapshotManagement_QueryDeltas_AccessDenied_LacksReadAttribute
Description"Create data file without Read Attribute then send FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS to the file and expect NTSTATUS is STATUS_ACCESS_DENIED.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile) without Read Attribute
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS
Verify returned NT_STATUS is STATUS_ACCESS_DENIED
FsCtl_RefsStreamSnapshotManagement_Create_AccessDenied_LacksWriteAttribute
Description"Create data file without Write Attribute then send FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_CREATE to the file and expect NTSTATUS is STATUS_ACCESS_DENIED.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT
Message SequenceCreate test file (DataFile) without Write Attribute
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE
Verify returned NT_STATUS is STATUS_ACCESS_DENIED

RefsStreamSnapshotOperationCreate

BVT_FsCtl_RefsStreamSnapshotOperation_Create_Positive
DescriptionCreate snapshot with FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE then send FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST using snapshot name and expect one entry returned.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE.
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_LIST using snapshot name.
Verify returned NT_STATUS
Verify returned snapshot count is 1
FsCtl_RefsStreamSnapshotOperation_Create_Negative
DescriptionCreate two snapshots with FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE using the same snapshot name and expect STATUS_OBJECT_NAME_COLLISION.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE.
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE using the same snapshot name.
Verify returned NT_STATUS is OBJECT_NAME_COLLISION

RefsStreamSnapshotOperationQueryDeltas

BVT_FsCtl_RefsStreamSnapshotOperation_QueryDeltas_Positive
DescriptionSend FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS to modified data file and verify extent returned.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS
Message SequenceCreate test file (DataFile) and fill with random data
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS.
Verify returned NT_STATUS
Verify returned extent count is greater than 0
FsCtl_RefsStreamSnapshotOperation_QueryDeltas_Negative
DescriptionSend FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request with REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS to unmodified data file and verify no extent returned.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS.
Verify returned NT_STATUS
Verify returned extent count is 0

IsMarkHandleSupported

FsCtl_MarkHandle_File_IsSupported (4TCs)
Test CaseBVT_FsCtl_MarkHandle_File_IsSupported
DescriptionTo test if FSCTL_MARK_HANDLE is supported for different file systems.
Test environment: FAT32, NTFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test CaseFsCtl_MarkHandle_EmptyFile_IsSupported
DescriptionTo test if FSCTL_MARK_HANDLE on an empty file is supported for different file systems.
Test environment: FAT32, NTFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test CaseFsCtl_MarkHandle_NotEmptyFile_IsSupported
DescriptionTo test if FSCTL_MARK_HANDLE on a non empty file is supported for different file systems.
Test environment: FAT32, NTFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test CaseFsctl_MarkHandle_File_CompressedSupported
DescriptionTo test if FSCTL_MARK_HANDLE on a non empty file with Compression set is supported for different file systems.
Test environment: FAT32, NTFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_SET_COMPRESSION with CompressionState equal COMPRESSION_FORMAT_LZNT1
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Fsctl_MarkHandle_File_BufferedNotSupported
DescriptionTo test if FSCTL_MARK_HANDLE on a buffered file is supported for different file systems.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING not set
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS || FileSystem == ReFS) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Fsctl_MarkHandle_File_RedundantMedia (4TCs)
Test CaseFsctl_MarkHandle_File_RedundantMedia_CopyNumberLessThanDataCopies_EmptyFile
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response on a redundant media with CopyNumber set to less than or equal to the NumberOfDataCopies of the file.
Test environment: NTFS, ReFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE with CopyNumber > 1 && CopyNumber < NumberOfDataCopies
If (FileSystem != NTFS && FileSystem != ReFS) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} Else If (FileSystem == NTFS) {
    Assert.AreEqual(STATUS_RESIDENT_FILE_NOT_SUPPORTED, ActualResult);
} Else If (IsRedundantMedia) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_NOT_REDUNDANT_STORAGE, ActualResult);
}
Test CaseFsCtl_MarkHandle_File_RedundantMedia_CopyNumberLessThanDataCopies_NotEmptyFileSupported
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response on a redundant media with CopyNumber set to less than or equal to the NumberOfDataCopies of the file.
Test environment: NTFS, ReFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE with CopyNumber > 1 && CopyNumber < NumberOfDataCopies
If (FileSystem != NTFS && FileSystem != ReFS) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} Else If (IsRedundantMedia) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(STATUS_NOT_REDUNDANT_STORAGE, ActualResult);
}
Test CaseFsctl_MarkHandle_File_RedundantMedia_CompressedNotSupported
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response on a redundant media with Compression set, and CopyNumber set to less than or equal to the NumberOfDataCopies of the file.
Test environment: NTFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_SET_COMPRESSION with CompressionState equal COMPRESSION_FORMAT_LZNT1
FsCtl request with FSCTL_MARK_HANDLE with CopyNumber > 1 && CopyNumber < NumberOfDataCopies
If (FileSystem != NTFS && IsRedundantMedia) {
    Assert.AreEqual(STATUS_COMPRESSED_FILE_NOT_SUPPORTED, ActualResult);
}
Test CaseFsctl_MarkHandle_File_RedundantMedia_CopyNumberGreaterThanDataCopiesNotSupported
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response on a redundant media with CopyNumber set to greater than the NumberOfDataCopies of the file.
Test environment: NTFS, ReFS
Message SequenceCreateFile (DataFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE with CopyNumber > NumberOfDataCopies
If (FileSystem != NTFS && FileSystem != ReFS) {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
} Else If (IsRedundantMedia) {
    Assert.AreEqual(INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_NOT_REDUNDANT_STORAGE, ActualResult);
}
FsCtl_MarkHandle_Dir_NotSupported (4TCs)
Test CaseFsCtl_MarkHandle_Dir_NotSupported
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response for a directory.
Test environment: NTFS, ReFS
Message SequenceCreateFile (DirectoryFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS || FileSystem == ReFS) {
    Assert.AreEqual(STATUS_DIRECTORY_NOT_SUPPORTED, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test CaseFsctl_MarkHandle_Dir_BufferedNotSupported
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response for a buffered directory.
Test environment: NTFS, ReFS
Message SequenceCreateFile (DirectoryFile) with NO_INTERMEDIATE_BUFFERING not set
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS || FileSystem == ReFS) {
    Assert.AreEqual(STATUS_DIRECTORY_NOT_SUPPORTED, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}
Test CaseFsctl_MarkHandle_Dir_CompressedNotSupported
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response for a directory with compression set.
Test environment: NTFS
Message SequenceCreateFile (DirectoryFile) with NO_INTERMEDIATE_BUFFERING not set
FsCtl request with FSCTL_SET_COMPRESSION with CompressionState equal COMPRESSION_FORMAT_LZNT1
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS) {
    Assert.AreEqual(STATUS_DIRECTORY_NOT_SUPPORTED, ActualResult);
}
Test CaseFsctl_MarkHandle_Dir_RedundantMediaNotSupported
DescriptionTo test if FSCTL_MARK_HANDLE returns correct response for a directory on redundant media.
Test environment: NTFS, ReFS
Message SequenceCreateFile (DirectoryFile) with NO_INTERMEDIATE_BUFFERING set
FsCtl request with FSCTL_MARK_HANDLE
If (FileSystem == NTFS || FileSystem == ReFS) {
    Assert.AreEqual(STATUS_DIRECTORY_NOT_SUPPORTED, ActualResult);
} Else {
    Assert.AreEqual(STATUS_INVALID_DEVICE_REQUEST, ActualResult);
}

RefsStreamSnapshotOperationList

BVT_FsCtl_RefsStreamSnapshotOperation_List_SingleEntry
DescriptionCreate snapshot with FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE then send FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST and expect one entry returned.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE twice.
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_LIST and one snapshot name.
Verify returned NT_STATUS
Verify returned snapshot is 1
BVT_FsCtl_RefsStreamSnapshotOperation_List_MultipleEntry
DescriptionCreate snapshot with FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE then send FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST with asterisk and expect two entry returned.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE twice.
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST and asterisk.
Verify returned NT_STATUS
Verify returned snapshot is 2
FsCtl_RefsStreamSnapshotOperation_List_NoEntry
DescriptionCreate two snapshots with FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_CREATE then send FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST with wrong snapshot name and expect no entry returned.
Note: This is only implemented by the REFS file system file system.
Test environment: ReFS
FsCtl: FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST
Message SequenceCreate test file (DataFile)
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation REFS_STREAM_SNAPSHOT_OPERATION_CREATE twice.
FSCTL request with FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT using operation FSCTL_REFS_STREAM_SNAPSHOT_OPERATION_LIST and wrong snapshot name.
Verify returned NT_STATUS
Verify returned snapshot is 0

Test cases for QuotaInformation

IsQuotaInfoSupported

QuotaInfo_Query_QuotaInformation_IsQuotaInfoSupported
DescriptionTo test if quota info is supported for different file systems.
Note: Only NTFS supports quotas.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsQuotaInfoSupported == True | STATUS_SUCCESS
IsQuotaInfoSupported == False | STATUS_OBJECT_PATH_NOT_FOUND || OBJECT_NAME_NOT_FOUND
Message SequenceOpen Quota file
QueryInfo with FileInfoClass.FileQuotaInformation
If (IsQuotaInfoSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(True, ActualResult == STATUS_OBJECT_PATH_NOT_FOUND || ActualResult == OBJECT_NAME_NOT_FOUND);
}
QuotaInfo_Set_QuotaInformation_IsQuotaInfoSupported
DescriptionTo test if quota info is supported for different file systems.
Note: Only NTFS supports quotas.
Test environment: FAT32, NTFS, ReFS
Parameter combination
Parameter | Expected Result
IsQuotaInfoSupported == True | STATUS_SUCCESS
IsQuotaInfoSupported == False | STATUS_OBJECT_PATH_NOT_FOUND || OBJECT_NAME_NOT_FOUND
Message SequenceOpen Quota file
SetInfo with FileInfoClass.FileQuotaInformation
If (IsQuotaInfoSupported == True) {
    Assert.AreEqual(STATUS_SUCCESS, ActualResult);
} Else {
    Assert.AreEqual(True, ActualResult == STATUS_OBJECT_PATH_NOT_FOUND || ActualResult == OBJECT_NAME_NOT_FOUND);
}

Test cases for File Access

FileAccess_OpenExistingFile

FileAccess_WriteReadOnlyFile
DescriptionTo write a read only file and check the returned status code.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile
Test coverage:
If file type is DataFile, file attributes is read only and desired access is write data or append data, server will return STATUS_ACCESS_DENIED
Message SequenceCreate readonly data file.
Write the read only data file
Verify server responses accordingly.
FileAccess_DeleteReadOnlyDataFile
DescriptionTo delete a read only data file and check the returned status code.
Test environment: FAT32, NTFS, ReFS
Test object: DataFile
Test coverage:
If file attributes is read only and create options is FILE_DELETE_ON_CLOSE, server will return STATUS_CANNOT_DELETE.
Message SequenceCreate readonly data file.
Delete the read only data file
Verify server responses accordingly.

FileAccess_OpenNamedPipe

BVT_FileAccess_OpenNamedPipe
DescriptionTo test that server sends STATUS_SUCCESS when a named pipe is opened successfully
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate named pipe
Open named pipe
Verify server return with STATUS_SUCCESS
BVT_FileAccess_OpenNamedPipe_InvalidPathName
DescriptionTo test that server sends STATUS_OBJECT_NAME_NOT_FOUND when a named pipe open request is sent with invalid path name.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate named pipe
Open named pipe with invalid path name
Verify server return with STATUS_OBJECT_NAME_NOT_FOUND
BVT_FileAccess_OpenNamedPipe_DesiredAccessZero
DescriptionTo test that server sends STATUS_ACCESS_DENIED when a open named pipe request is sent with DesiredAccess as zero.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate named pipe
Open named pipe with DesiredAccess set to zero
Verify server return with STATUS_ACCESS_DENIED
BVT_FileAccess_OpenNamedPipe_InactiveListener
DescriptionTo test that server sends STATUS_PIPE_NOT_AVAILABLE when a open named pipe request is sent when named pipe has no active listener.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate named pipe
Open named pipe
Verify server return with STATUS_SUCCESS
Open named pipe
Verify server return with STATUS_PIPE_NOT_AVAILABLE
BVT_FileAccess_OpenNamedPipe_Inbound
DescriptionTo test that server sends STATUS_ACCESS_DENIED when a open named pipe request is sent with FILE_READ_DATA while it was created with FILE_PIPE_INBOUND.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate named pipe with direction FILE_PIPE_INBOUND
Open named pipe with AccessMask.GENERIC_READ
Verify server return with STATUS_ACCESS_DENIED
BVT_FileAccess_OpenNamedPipe_Outbound
DescriptionTo test that server sends STATUS_ACCESS_DENIED when a open named pipe request is sent with FILE_WRITE_DATA while it was created with FILE_PIPE_OUTBOUND.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate named pipe with direction FILE_PIPE_OUTBOUND
Open named pipe with AccessMask.GENERIC_WRITE
Verify server return with STATUS_ACCESS_DENIED
BVT_FileAccess_OpenNamedPipe_IsCaseInsensitive
DescriptionTo test that server sends STATUS_SUCCESS when a named pipe is opened using different path name case.
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate named pipe
Open named pipe using different path name case
Verify server return with STATUS_SUCCESS

Test cases for Alternate Data Stream

IsCreateStreamSupported

BVT_AlternateDataStream_CreateStream_File (BVT)
DescriptionTo test if Alternate Data Stream create is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (DataFile) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
Verify server return with STATUS_SUCCESS for supported file system
BVT_AlternateDataStream_CreateStream_Dir (BVT)
DescriptionTo test if Alternate Data Stream create is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (DirectoryFile)
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
Verify server return with STATUS_SUCCESS for supported file system

IsListStreamsSupported

BVT_AlternateDataStream_ListStreams_File (BVT)
DescriptionTo test if Alternate Data Stream list is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (DataFile) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
List all the Alternate Data Streams created on this file
Verify server return with STATUS_SUCCESS for supported file system
Verify server return with StreamName and StreamSize
BVT_AlternateDataStream_ListStreams_Dir (BVT)
DescriptionTo test if Alternate Data Stream list is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
List all the Alternate Data Streams created on this file
Verify server return with STATUS_SUCCESS for supported file system
Verify server return with StreamName and StreamSize

IsDeleteStreamSupported

BVT_AlternateDataStream_DeleteStream_File (BVT)
DescriptionTo test if Alternate Data Stream delete is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
Delete the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
List all the Alternate Data Streams created on this file
Verify server return with StreamName and StreamSize
BVT_AlternateDataStream_DeleteStream_Dir (BVT)
DescriptionTo test if Alternate Data Stream delete is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
Delete the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
List all the Alternate Data Streams created on this file
Verify server return with StreamName and StreamSize

IsRenameStreamSupported

BVT_AlternateDataStream_RenameStream_File (BVT)
DescriptionTo test if Alternate Data Stream rename is supported on a Data file
Test environment: NTFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
List all the Alternate Data Streams created on this file
Verify server return with StreamName and StreamSize
Rename the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
List all the Alternate Data Streams created on this file
Verify server return with StreamName and StreamSize
BVT_AlternateDataStream_RenameStream_Dir (BVT)
DescriptionTo test if Alternate Data Stream rename is supported on a Directory file
Test environment: NTFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
List all the Alternate Data Streams created on this file
Verify server return with StreamName and StreamSize
Rename the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
List all the Alternate Data Streams created on this file
Verify server return with StreamName and StreamSize

IsWriteAndReadSupported

BVT_AlternateDataStream_WriteAndRead_File (BVT)
DescriptionTo test if write and read from the Alternate Data Streams is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Read the bytes from the Alternate Data Streams created on this file
Verify server return with STATUS_SUCCESS for supported file system
Create another Alternate Data Stream and write 4096 bytes to the stream
Read the bytes from the Alternate Data Streams created on this file
Verify server return with STATUS_SUCCESS for supported file system
BVT_AlternateDataStream_WriteAndRead_Dir (BVT)
DescriptionTo test if write and read from the Alternate Data Streams is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Read the bytes from the Alternate Data Streams created on this file
Verify server return with STATUS_SUCCESS for supported file system
Create another Alternate Data Stream and write 4096 bytes to the stream
Read the bytes from the Alternate Data Streams created on this file
Verify server return with STATUS_SUCCESS for supported file system

IsLockAndUnlockSupported

BVT_AlternateDataStream_LockAndUnlock_File (BVT)
DescriptionTo test if lock and unlock a byte range of the Alternate Data Streams is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
Lock a byte range of the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
Unlock the byte range of the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
BVT_AlternateDataStream_LockAndUnlock_Dir (BVT)
DescriptionTo test if lock and unlock a byte range of the Alternate Data Streams is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Create another Alternate Data Stream and write 4096 bytes to the stream
Lock a byte range of the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
Unlock the byte range of the second Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system

IsQueryAndSetFileInformationSupported

AlternateDataStream_Query_FileAccessInformation_File
DescriptionTo test if the FileAccessInformation query of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_ACCESS_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
Verify returned FILE_ACCESS_INFORMATION is valid
AlternateDataStream_Query_FileAccessInformation_Dir
DescriptionTo test if the FileAccessInformation query of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_ACCESS_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
Verify returned FILE_ACCESS_INFORMATION structure is valid
AlternateDataStream_Query_FileBasicInformation_File
DescriptionTo test if the FileBasicInformation query of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_BASIC_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_Query_FileBasicInformation_Dir
DescriptionTo test if the FileBasicInformation query of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_BASIC_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_Query_FileCompressionInformation_File
DescriptionTo test if the FileCompressionInformation query of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_SET_COMPRESSION with CompressionState = COMPRESSION_FORMAT_LZNT1
Query the file information with FileInfoClass.FILE_COMPRESSION_INFORMATION on this Alternate Data Stream created on this file
If (IsCompressionSupported == True) {
    Verify OutputBuffer.CompressionFormat & COMPRESSION_FORMAT_LZNT1 == COMPRESSION_FORMAT_LZNT1
} Else {
    Verify OutputBuffer.CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1
}
AlternateDataStream_Query_FileCompressionInformation_Dir
DescriptionTo test if the FileCompressionInformation query of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_SET_COMPRESSION with CompressionState = COMPRESSION_FORMAT_LZNT1
Query the file information with FileInfoClass.FILE_COMPRESSION_INFORMATION on this Alternate Data Stream created on this file
If (IsCompressionSupported == True) {
    Verify OutputBuffer.CompressionFormat & COMPRESSION_FORMAT_LZNT1 == COMPRESSION_FORMAT_LZNT1
} Else {
    Verify OutputBuffer.CompressionFormat & COMPRESSION_FORMAT_LZNT1 != COMPRESSION_FORMAT_LZNT1
}
AlternateDataStream_Query_FileNetworkOpenInformation_File
DescriptionTo test if the FileNetworkOpenInformation query of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_NETWORKOPEN_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_Query_FileNetworkOpenInformation_Dir
DescriptionTo test if the FileNetworkOpenInformation query of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_NETWORKOPEN_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_Query_FileStandardInformation_File
DescriptionTo test if the FileStandardInformation query of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_STANDARD_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
Verify OutputBuffer.EndOfFile is equal to the bytes count written to the stream
AlternateDataStream_Query_FileStandardInformation_Dir
DescriptionTo test if the FileStandardInformation query of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Query the file information with FileInfoClass.FILE_STANDARD_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
Verify OutputBuffer.EndOfFile is equal to the bytes count written to the stream
AlternateDataStream_Set_FileEaInformation_File
DescriptionTo test if the FileEaInformation set of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Set the file information with FileInfoClass.FILE_EA_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_INVALID_INFO_CLASS for supported file system
AlternateDataStream_Set_FileEaInformation_Dir
DescriptionTo test if the FileEaInformation set of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Set the file information with FileInfoClass.FILE_EA_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_INVALID_INFO_CLASS for supported file system
AlternateDataStream_Set_FileShortNameInformation_File
DescriptionTo test if the FileShortNameInformation set of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Set the file information with FileInfoClass.FILE_SHORTNAME_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_INVALID_PARAMETER for supported file system
AlternateDataStream_Set_FileShortNameInformation_Dir
DescriptionTo test if the FileShortNameInformation set of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Set the file information with FileInfoClass.FILE_SHORTNAME_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_INVALID_PARAMETER for supported file system
AlternateDataStream_Set_FileValidDataLengthInformation_File
DescriptionTo test if the FileValidDataLengthInformation set of the Alternate Data Streams on a file is supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
Set the file information with FileInfoClass.FILE_VALIDDATALENGTH_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_Set_FileValidDataLengthInformation_Dir
DescriptionTo test if the FileValidDataLengthInformation set of the Alternate Data Streams on a file is supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
Set the file information with FileInfoClass.FILE_VALIDDATALENGTH_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system

IsFsControlSupported

AlternateDataStream_FsCtl_Get_Compression_File
DescriptionTo test if the FSCTL_GET_COMPRESSION request and response on the Alternate Data Streams are supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_SET_COMPRESSION with CompressionState = COMPRESSION_FORMAT_DEFAULT
FsCtl request with FSCTL_GET_COMPRESSION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
If (FileSystem == NTFS) {
    Verify OutputBuffer.CompressionState == COMPRESSION_FORMAT_LZNT1
}
AlternateDataStream_FsCtl_Get_Compression_Dir
DescriptionTo test if the FSCTL_GET_COMPRESSION request and response on the Alternate Data Streams are supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_SET_COMPRESSION with CompressionState = COMPRESSION_FORMAT_DEFAULT
FsCtl request with FSCTL_GET_COMPRESSION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
If (FileSystem == NTFS) {
    Verify OutputBuffer.CompressionState == COMPRESSION_FORMAT_LZNT1
}
AlternateDataStream_FsCtl_Get_IntegrityInformation_File
DescriptionTo test if the FSCTL_GET_INTEGRITY_INFORMATION request and response on the Alternate Data Streams are supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_GET_INTEGRITY_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_INVALID_DEVICE_REQUEST for supported file system
AlternateDataStream_FsCtl_Get_IntegrityInformation_Dir
DescriptionTo test if the FSCTL_GET_INTEGRITY_INFORMATION request and response on the Alternate Data Streams are supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_GET_INTEGRITY_INFORMATION on this Alternate Data Stream created on this file
Verify server return with STATUS_INVALID_DEVICE_REQUEST for supported file system
AlternateDataStream_FsCtl_Query_AllocatedRanges_File
DescriptionTo test if the FSCTL_QUERY_ALLOCATED_RANGES request and response on the Alternate Data Streams are supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_QUERY_ALLOCATED_RANGES on this Alternate Data Stream created on this file
Verify OutputBuffer.Length is equal to the bytes count written to the stream
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_FsCtl_Query_AllocatedRanges_Dir
DescriptionTo test if the FSCTL_QUERY_ALLOCATED_RANGES request and response on the Alternate Data Streams are supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_QUERY_ALLOCATED_RANGES on this Alternate Data Stream created on this file
Verify OutputBuffer.Length is equal to the bytes count written to the stream
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_FsCtl_Set_Compression_File
DescriptionTo test if the FSCTL_SET_COMPRESSION request and response on the Alternate Data Streams are supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_SET_COMPRESSION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_FsCtl_Set_Compression_Dir
DescriptionTo test if the FSCTL_SET_COMPRESSION request and response on the Alternate Data Streams are supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl request with FSCTL_SET_COMPRESSION on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_FsCtl_Set_ZeroData_File
DescriptionTo test if the FSCTL_SET_ZERO_DATA request and response on the Alternate Data Streams are supported on a Data file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Data) and write 1024 bytes to the file
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl Request with FSCTL_SET_ZERO_DATA on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system
AlternateDataStream_FsCtl_Set_ZeroData_Dir
DescriptionTo test if the FSCTL_SET_ZERO_DATA request and response on the Alternate Data Streams are supported on a Directory file
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory)
Create an Alternate Data Stream and write 2048 bytes to the stream
FsCtl Request with FSCTL_SET_ZERO_DATA on this Alternate Data Stream created on this file
Verify server return with STATUS_SUCCESS for supported file system

Test cases for Create and Query Directory Scenarios

Query Directory

Fs_CreateDirectory_QueryDirectory_Suffix_I30_INDEX_ALLOCATION
DescriptionTo test if Create and Query directory with stream type and stream name suffix :I30:I30:INDEX_ALLOCATION is supported.
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory) with suffix :I30:I30:INDEX_ALLOCATION
Verify server return with STATUS_SUCCESS for supported file system
Query server directory with created directory name
Verify server return with STATUS_SUCCESS for supported file system
Fs_CreateDirectory_QueryDirectory_Suffix_INDEX_ALLOCATION
DescriptionTo test if Create and Query directory with stream type suffix ::$INDEX_ALLOCATION is supported.
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory) with suffix ::$INDEX_ALLOCATION
Verify server return with STATUS_SUCCESS for supported file system
Query server directory with created directory name
Verify server return with STATUS_SUCCESS for supported file system
Fs_CreateFiles_QueryDirectory_With_Single_Entry_Flag
DescriptionCreate a lot of files and then query the directory info one by one with flag SMB2_RETURN_SINGLE_ENTRY.
Test environment: NTFS, ReFS
Message SequenceCreateFile (Directory) in share
Verify server return with STATUS_SUCCESS for supported file system
Create a lot of files under the share folder
Verify server return with STATUS_SUCCESS for each file created in supported file system
Query server directory for each entry under the directory
Verify server behavior with different result for supported file system
BVT_QueryDirectory_FileNamesInformation
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation
Verify each entry of the response
BVT_QueryDirectory_FileDirectoryInformation
PrerequisitesThe Clock of SUT and Driver computers should be the same. Otherwise the verifycation to CreationTime/LastAccessTime/ChangeTime/LastWriteTime may fail.
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation
Verify each entry of the response
BVT_QueryDirectory_FileFullDirectoryInformation
PrerequisitesThe Clock of SUT and Driver computers should be the same. Otherwise the verifycation to CreationTime/LastAccessTime/ChangeTime/LastWriteTime may fail.
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation
Verify each entry of the response
BVT_QueryDirectory_FileIdFullDirectoryInformation
PrerequisitesThe Clock of SUT and Driver computers should be the same. Otherwise the verifycation to CreationTime/LastAccessTime/ChangeTime/LastWriteTime may fail.
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation
Verify each entry of the response
BVT_QueryDirectory_FileBothDirectoryInformation
PrerequisitesThe Clock of SUT and Driver computers should be the same. Otherwise the verifycation to CreationTime/LastAccessTime/ChangeTime/LastWriteTime may fail.
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation
Verify each entry of the response
BVT_QueryDirectory_FileIdBothDirectoryInformation
PrerequisitesThe Clock of SUT and Driver computers should be the same. Otherwise the verifycation to CreationTime/LastAccessTime/ChangeTime/LastWriteTime may fail.
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileBothDirectoryInformation_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileBothDirectoryInformation_SpecialCase_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileBothDirectoryInformation_WildCard_QuestionMark
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation and check if FileName is in expression ? (Question Mark) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation and check if FileName is in expression special case ? (Question Mark) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileBothDirectoryInformation_AsteriskInStringWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileBothDirectoryInformation_DOS_STAR_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileBothDirectoryInformation_DOS_QM_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileBothDirectoryInformation_DOS_DOT_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileBothDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileBothDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileDirectoryInformation_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation and check if FileName is in expression * (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation and check if FileName is in expression * (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileDirectoryInformation_SpecialCase_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileDirectoryInformation_WildCard_QuestionMark
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation and check if FileName is in expression ? (Question Mark) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation and check if FileName is in expression special case ? (Question Mark) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileDirectoryInformation_AsteriskInStringWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileDirectoryInformation_DOS_STAR_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileDirectoryInformation_DOS_QM_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileDirectoryInformation_DOS_DOT_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileFullDirectoryInformation_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileFullDirectoryInformation_SpecialCase_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileFullDirectoryInformation_WildCard_QuestionMark
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation and check if FileName is in expression ? (Question Mark) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation and check if FileName is in expression special case ? (Question Mark) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileFullDirectoryInformation_AsteriskInStringWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileFullDirectoryInformation_DOS_STAR_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileFullDirectoryInformation_DOS_QM_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileFullDirectoryInformation_DOS_DOT_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileFullDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileFullDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdBothDirectoryInformation_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdBothDirectoryInformation_SpecialCase_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdBothDirectoryInformation_WildCard_QuestionMark
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation and check if FileName is in expression ? (Question Mark) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation and check if FileName is in expression special case ? (Question Mark) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdBothDirectoryInformation_AsteriskInStringWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdBothDirectoryInformation_DOS_STAR_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdBothDirectoryInformation_DOS_QM_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdBothDirectoryInformation_DOS_DOT_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdBothDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdBothDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdFullDirectoryInformation_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdFullDirectoryInformation_SpecialCase_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation and check if FileName is in expression special case *.* (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdFullDirectoryInformation_WildCard_QuestionMark
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation and check if FileName is in expression ? (Question Mark) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation and check if FileName is in expression special case ? (Question Mark) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdFullDirectoryInformation_AsteriskInStringWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation and check if FileName is in expression * (Asterisk) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdFullDirectoryInformation_DOS_STAR_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation and check if FileName is in expression < (DOS Star) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdFullDirectoryInformation_DOS_QM_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation and check if FileName is in expression > (DOS QM) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileIdFullDirectoryInformation_DOS_DOT_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileIdFullDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileIdFullDirectoryInformation and check if FileName is in expression " (DOS DOT) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileNamesInformation_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation and check if FileName is in expression * (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation and check if FileName is in expression * (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileNamesInformation_SpecialCase_AsteriskWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation and check if FileName is in expression special case *.* (Asterisk) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation and check if FileName is in expression special case *.* (Asterisk) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileNamesInformation_WildCard_QuestionMark
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation and check if FileName is in expression ? (Question Mark) wild card.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation and check if FileName is in expression special case ? (Question Mark) wild card
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileNamesInformation_AsteriskInStringWildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation and check if FileName is in expression * (Asterisk) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation and check if FileName is in expression * (Asterisk) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileNamesInformation_DOS_STAR_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation and check if FileName is in expression < (DOS Star) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation and check if FileName is in expression < (DOS Star) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileNamesInformation_DOS_QM_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation and check if FileName is in expression > (DOS QM) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation and check if FileName is in expression > (DOS QM) wild card in string
Verify each entry of the response
BVT_QueryDirectoryBySearchPattern_FileNamesInformation_DOS_DOT_WildCard
DescriptionCreate a directory and a file and then query the directory info with FileInfoClass FileNamesInformation and check if FileName is in expression " (DOS DOT) wild card in string.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory in share
Verify server returns with STATUS_SUCCESS for supported file system
Create a file under the newly created directory folder
Verify server returns with STATUS_SUCCESS for supported file system
Query the created directory with FileNamesInformation and check if FileName is in expression " (DOS DOT) wild card in string
Verify each entry of the response

Test cases for File and Directory Leasing

Compare Lease Keys

Comparing_Same_File_LeaseKeysV1
DescriptionCompare the server returned lease keys of two opens of the same file using the same lease key.
This value is not valid for the SMB 2.0.2 dialect
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a file in share
Verify LeaseOpen equals OperationOpen
Verify LeaseBreakNotification not received
Verify LeaseOpen.LeaseKey == OperationOpen.LeaseKey
Comparing_Same_Directory_LeaseKeysV1
DescriptionCompare the server returned lease keys of two opens of the same directory file using the same lease key.
This value is not valid for the SMB 2.0.2 dialect
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory file in share
Verify LeaseOpen equals OperationOpen
Verify LeaseBreakNotification not received
Verify LeaseOpen.LeaseKey == OperationOpen.LeaseKey
Comparing_Same_LeaseKeysV2
DescriptionCompare the server returned lease keys of two opens of the same file using the same lease key.
This is valid only for the SMB 3.x dialect family.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a file in share
Verify LeaseOpen equals OperationOpen
Verify LeaseBreakNotification not received
Verify LeaseOpen.LeaseKey == OperationOpen.LeaseKey
Verify LeaseOpen.ParentLeaseKey == OperationOpen.ParentLeaseKey
Compare_Zero_LeaseFlag_ParentLeaseKey
DescriptionThe server should return an empty parentLeaseKey when leaseFlag is set to zero.
This is valid only for the SMB 3.x dialect family.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a file in share
Verify LeaseRequest.ParentLeaseKey should not be empty
Verify LeaseOpen.ParentLeaseKey MUST be empty if LeaseFlag is set to Zero
DirectoryComparing_LeaseKeysV2
DescriptionCompare the returned lease keys of two opens to the same directory file.
This is valid only for the SMB 3.x dialect family.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory file in share
Verify LeaseOpen equals OperationOpen
Verify LeaseBreakNotification not received
Verify LeaseOpen.LeaseKey == OperationOpen.LeaseKey
Verify LeaseOpen.ParentLeaseKey == OperationOpen.ParentLeaseKey
DirectoryComparing_ParentLeaseKey_ChildLeaseKey
DescriptionCompare the returned lease keys of two opens of a parent directory file and a child file.
This is valid only for the SMB 3.x dialect family.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory file in share and a file in that directory
Verify LeaseOpen.LeaseKey MUST be equal to OperationOpen.ParentLeasekey
Verify LeaseBreakNotification not received
DirectoryComparing_Child_Invalid_ParentLeaseKeys
DescriptionCompare lease keys of parent directory file and a child file with an invalid parent lease key
This is valid only for the SMB 3.x dialect family.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory file in share and a file in that directory
If request.ParentLeaseKey is empty
Verify response.ParentLeaseKey MUST be empty
Verify LeaseBreakNotification is received

Test cases for Other Scenarios

IsCreateFileSupported

CreateFile_InvalidStreamName
DescriptionTry to create a directory with invalid stream name and expect failure.
Note: Only the NTFS and ReFS file systems support complex name suffixes and StreamTypeNames. File systems that do not support this return STATUS_OBJECT_NAME_INVALID.
Test environment: FAT32, NTFS, ReFs
Message SequenceCreateFile (DirectoryFile)
If (FileSystem == NTFS || FileSystem == REFS) {
    Assert.AreEqual(STATUS_INVALID_PARAMETER, ActualResult);
} Else {
    Assert.AreEqual(STATUS_OBJECT_NAME_INVALID, ActualResult);
}

CreateFile_InvalidColon

CreateDirectory_InvalidColon
DescriptionTry to create a directory with invalid colon and expect failure.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory file with invalid colon
Verify server returns with STATUS_OBJECT_NAME_INVALID for supported file system
CreateFile_InvalidColon
DescriptionTry to create a data with invalid colon and expect failure.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a data file with invalid colon
Verify server returns with STATUS_OBJECT_NAME_INVALID for supported file system

CreateFile_BackSlash

CreateDirectory_EndWithBackSlash
DescriptionTry to create a directory end with backslash and expect success.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a directory end with with backslash.
Verify server returns with STATUS_SUCCESS for supported file system
CreateFile_EndWithInvalidBackSlash
DescriptionTry to create a file end with invalid backslash and expect failure.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a data file end with invalid backslash.
Verify server returns with STATUS_OBJECT_NAME_INVALID for supported file system
CreateFile_WithDoubleBackSlashInMiddle
DescriptionTry to create a file with double backslash in the middle and expect failure.
Test environment: NTFS, ReFS, FAT32
Message SequenceCreate a file with double backslash in the middle.
Verify server returns with STATUS_OBJECT_PATH_NOT_FOUND for supported file system

CreateFile_FindAllFiles

CreateFile_CheckNoFilesFound
DescriptionCreate a directory file and confirm that FoundFiles count is zero
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate a directory
Query the directory
Verify that no file is returned
CreateFile_CheckSingleFileFound
DescriptionCreate a data file under a directory file and confirm that FoundFiles count is one
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate a directory
Create a file under the directory
Query the directory
Verify that only the created file is returned
CreateFile_CheckSubDirAndSingleFileFound
DescriptionCreate a data file under a subdirectory and confirm FoundFiles count
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate a root directory
Create a directory file as subdirectory under the root directory
Create a data file under the subdirectory
Query the root directory
Verify that number of files returned is 2
CreateFile_CheckMultipleFilesFound
DescriptionCreate a data file under a subdirectory and verify FoundFiles count for the root directory and subdirectory
Test environment: FAT32, NTFS, ReFS
Message SequenceCreate a root directory
Create a directory file as subdirectory under the directory
Create a data file under the subdirectory
Query the root directory
Query the subdirectory
Verify that number of files returned by root directory is 2
Verify that number of files returned by subdirectory is 1

MBT Test Design

Model Design

Here is a list for Win8 newly added algorithms, the designed scenarios are based on them.

Adapter Design

The MS-FSA test suite implements 2 adapters:

  • Protocol Adapter

  • Transport adapter (SMB_TransportAdapter or SMB2_TransportAdapter).

Protocol Adapter

The MS-FSA Protocol adapter is called FSAAdapter in the Test Suite. It implements the interface IFSAAdapter. Its functionality is to communicate with the transport adapter, where called relevant methods to interact with the file system. Another functionality of the Protocol Adapter is when the server replies, it parses the messages, set the output value for test.

Class Diagram

image3.png

Transport Adapter

There are 3 transport adapters implement the interface ITransportAdapter.

  • SMBTransportAdapter

    It uses SMB SDK to send/receive SMB packet to/from SMB server.

    It uses SMB dialects for negotiation.

  • SMB2TransportAdapter

    It uses SMB2 SDK to send/receive SMB packet to/from SMB server.

    It uses SMB2 dialects for negotiation including 0x0202 and 0x0210.

  • SMB3TransportAdapter

    It uses SMB3 SDK to send/receive SMB packet to/from SMB server.

    It uses SMB3 dialects for negotiation including 0x0224 and 0x0300.

Class Diagram

image4.png

Message Sequence

Below diagram shows the message sequence between FSA adapter, transport adapter and SMB server.

image5.png

Scenarios

Here is a list for MBT scenarios:

ScenarioDescription
S1_MS-FSA_CreateFileTo test all requirements of creating a file.
S2_MS-FSA_OpenFileTo test all requirements of opening a file.
S3_MS-FSA_ReadFileTo test all requirements of reading a file.
S4_MS-FSA_WriteFileTo test all requirements of writing a file.
S5_MS-FSA_CloseOpenTo test all requirements of closing a file.
S6_MS-FSA_QueryDirectoryTo test all requirements of querying a directory.
S7_MS-FSA_FlushCacheTo test all requirements of flushing cache.
S8_MS-FSA_ByteRangeLockAndUnlockTo test all requirements of locking and unlocking Byte Range.
S9_MS-FSA_FsControlTo test all requirements of Controlling File System.
S10_MS-FSA_ChangeNotificationTo test all requirements of change notifications.
S11_MS-FSA_QueryFileInfoTo test all requirements of querying file information.
S12_MS-FSA_QueryFSInfoTo test all requirements of querying file system information.
S13_MS-FSA_QuerySecurityInfoTo test all requirements of querying security information.
S14_MS-FSA_SetFileInfoTo test all requirements of setting file information.
S15_MS-FSA_SetFSInfoTo test all requirements of setting file system information.
S16_MS-FSA_SetSecurityInfoTo test all requirements of setting security information.
S17_MS-FSA_OplockTo test all requirements of oplock.