Share via


CD.DVD-ROM File System Driver Test (Compact 7)

3/12/2014

The CD/DVD-ROM File System Driver Test assesses the Compact Disc File System (CDFS) or Universal Disc File System (UDFS) that runs on top of a CD/DVD-ROM block driver. You can use this test to verify that a CDFS or UDFS file system driver operates correctly.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following table shows the hardware requirement for the CD/DVD-ROM File System Driver Test.

Requirement Description

CD/DVD-ROM drive

A CD/DVD-ROM drive with a CD or DVD loaded in the drive. The CD/DVD drive can be connected via ATA or USB bus.

Disc

The disc can be CD ROM, CD-R, DVD ROM, DVD+R, DVD-R, audio CD, DVD.

The following table shows the software requirements for the CD/DVD-ROM File System Driver Test.

Requirements Description

Tux.exe

Test harness, required for executing the test

Kato.dll

Logging engine, required for logging test data

Udftest.dll

Library containing the test cases

Subtests

The table below lists the subtests included in this test.

SubTest ID Description

5000

Attributes

Tests the GetFileAttributes function on each file on the CD or DVD. This test fails if the GetFileAttributes function returns 0xFFFFFFFF for any file or if the file attributes that the function returns differ from the attributes in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5001

AttributesEx

Tests the GetFileAttributesEx function on each file on the CD or DVD. This test fails if the GetFileAttributesEx function call fails or returns information in the WIN32_FILE_ATTRIBUTE_DATA structure that differs from the information in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function. The test compares file attributes, times, and sizes.

5002

Free Disk Space

Tests the GetDiskFreeSpaceEx function on each file on the CD or DVD. This test fails if the GetDiskFreeSpaceEx function call fails on a directory or succeeds on a non-directory file.

5003

Information By Handle

Tests the GetInformationByHandle function on each non-directory file on the CD or DVD. This test fails if the CreateFile or GetFileInformationByHandle function calls fail for any file, or if the GetFileInformationByHandle function returns information in the BY_HANDLE_FILE_INFORMATION structure that differs from the information in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function. The test compares file attributes, times, and sizes.

5004

File Size

Tests the GetFileSize function on each non-directory file on the CD or DVD. This test fails if the CreateFile function call fails or if the GetFileSize function returns a file size that differs from the file size specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5005

File Time

Tests the GetFileTime function on each non-directory file on the CD or DVD. This test fails if the CreateFile or GetFileTime function calls fail on any file or if the times returned by GetFileTime function differ from the times specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5010

Remove Directory

Tests the RemoveDirectory function on each file and directory on the CD or DVD. This test fails if the RemoveDirectory function call succeeds on any file. The test also fails if the function call fails with an error code other than ERROR_ACCESS_DENIED for a directory or ERROR_DIRECTORY for a non-directory file.

5011

Create Directory

Tests the CreateDirectory function by attempting to create a new directory in each subdirectory on the CD or DVD. This test fails if the CreateDirectory function call succeeds in any subdirectory or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5012

Create New File

Tests the CreateFile function by attempting to create a new file in each subdirectory on the CD or DVD with the dwCreationDisposition parameter set to a value of CREATE_NEW, CREATE_ALWAYS, or TRUNCATE_EXISTING. This test fails if the CreateFile function call succeeds in any subdirectory or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5013

Create File For Write

Tests the CreateFile function by attempting to open each file on the CD or DVD for GENERIC_WRITE access and FILE_SHARE_WRITE sharing. This test fails if the CreateFile function call succeeds on any file or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5014

Delete File

Tests the DeleteFile function by attempting to delete each file and directory on the CD or DVD. This test fails if the DeleteFile function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5015

Delete and Rename File

Tests the DeleteAndRenameFile function by attempting to delete and rename each file and directory on the CD or DVD. This test fails if the DeleteAndRenameFile function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5016

Move File

Tests the MoveFile function by attempting to move each file and directory on the CD or DVD. This test fails if the MoveFile function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5017

Set File Attributes

Tests the SetFileAttributes function by attempting to set the file attributes of each file and directory on the CD or DVD to FILE_ATTRIBUTE_NORMAL. This test fails if the SetFileAttributes function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5018

Set End of File

Tests the SetEndOfFile function by opening each non-directory file on the CD or DVD and then attempting to set the end of the file. This test fails if the SetEndOfFile function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5019

Write File

Tests the WriteFile function by opening each non-directory file on the CD or DVD and then attempting to write to the file. This test fails if the WriteFile function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5020

Flush File Buffers

Tests the FlushFileBuffers function by opening each non-directory file on the CD or DVD and then attempting to flush the buffers for the file. This test fails if the FlushFileBuffers function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5021

Set File Time

Tests the SetFileTime function by opening each non-directory file on the media and then attempting to set the time for the file. This test fails if the SetFileTime function call succeeds or if the function call fails with an error code other than ERROR_ACCESS_DENIED.

5030

Read 1K Buffer

Tests the ReadFile function by opening each non-directory file on the CD or DVD and reading the entire file using a 1-kilobyte (KB) read buffer. This test fails if the total number of bytes read from a file does not match the size of the file specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5031

Read 2K Buffer

Tests the ReadFile function by opening each non-directory file on the CD or DVD and reading the entire file using a 2-KB read buffer. A CD sector is 2 KB in size. This test fails if the total number of bytes read from a file does not match the size of the file specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5032

Read 2040B Buffer

Tests the ReadFile function by opening each non-directory file on the CD or DVD and reading the entire file using a 2040-byte read buffer. A CD sector is slightly larger than 2040 bytes in size. This test fails if the total number of bytes read from a file does not match the size of the file specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5033

Read 2050B Buffer

Tests the ReadFile function by opening each non-directory file on the CD or DVD and reading the entire file using a 2050-byte read buffer. A CD sector is slightly smaller than 2050 bytes in size. This test fails if the total number of bytes read from a file does not match the size of the file specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5034

Read 64K Buffer

Tests the ReadFile function by opening each non-directory file on the CD or DVD and reading the entire file using a 64-KB read buffer. The filesys module allocates a buffer that is 64 KB in size for a file copy operation. This test fails if the total number of bytes read from a file does not match the size of the file specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

5035

Memory Mapped I/O Test

Tests the CreateFileForMapping, CreateFileMapping, and MapViewOfFile functions by mapping and reading every non-directory file on the CD or DVD. This test fails if the file mapping fails or if the number of byes read from the mapped file is smaller than the size of the file specified in the WIN32_FIND_DATA structure returned by the FindFirstFile or FindNextFile function.

Setting Up the Test

The test device must have a CD or DVD drive attached.

The drive must also have a disc with data written on it.

The image must be built with SYSGEN_UDFS=1 set.

Running the Test

The CD/DVD-ROM File System Driver Test executes the tux -o -d udftest -c "-p \CDROM Drive" command line on default execution. If your system mounts the CD/DVD drive using a different name, you can modify the command line to point to the different path.

The following table shows the command line parameter for the CD/DVD-ROM File System Driver Test.

Command line parameter Description

-p path

Specifies a path to test.

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all sub-tests.

Troubleshooting the Test

1. Determine that the UDFS and CDFS drivers are loaded into the image.

2. The CD or DVD used must be a data disk type with files and directories. Preferably no audio or ISO disks.

For additional platform specific issues, consult the CTK articles on the TechNet wiki.

See Also

Other Resources

Storage Media - CD/DVD Tests