Large File Support Tests for Hard Drive (Compact 7)
3/12/2014
The Large File Support Tests are intended to test large files over 4GB. To address files that are over 4GB, 64-bit file addresses are required. This requires exFAT format since the older FAT file system does not support 64-bit addressing. The test can be run on any large storage device that is at least 8GB in size.
This test will use the following file system APIs with 64-bit addressing:
* GetFileSize
* SetFilePointer
* FindFirstFile
* FindNextFile
* GetFileInformationByHandle
* ReadFile
* WriteFile
* ReadFileWithSeek
* WriteFileWithSeek
* CopyFile
Test Prerequisites
Your device must meet the following requirements before you run this test.
The following table shows the hardware requirement for the Large File Support Tests.
Requirement | Description |
---|---|
Large storage device |
A large storage device (e.g. hard drive) that can be formatted with exFAT or texFAT. The size of the storage device should be greater than 15 GB if all tests are run consecutively. |
The following table shows the software requirements for the File System Driver Test.
Requirements | Description |
---|---|
Tux.exe |
Tux Test Harness, required for executing the test |
Kato.dll |
Kato logging engine, required for logging test data |
fsLargeFiles.dll |
Library containing the tests |
Subtests
The table below lists the subtests included in this test.
SubTest ID | Description |
---|---|
1001 |
Create large files. This test creates a 6GB file and performs various file pointer operations and verifies the results. |
1002 |
Test SetFilePointer on a large file. This test opens the large file created in test 1001, sets file pointers to 1GB, 3GB, 4GB, and 5GB and verifies the data. It also sets the file pointer by 3GB from the end of the large file. |
1003 |
Copy large file This test copies the large file created in test 1001 to another file. Then it verifies the size and content of the copied file. |
1004 |
Test GetFileInformationByHandle This test calls GetFileInformationByHandle on a large file created in test 1001 and verifies the file information. |
1005 |
Test FindFirst/NextFile This test populates the storage device with some files, and then calls FindFirstFile and FindNextFile. The files are displayed and the information should be verified manually. |
1006 |
Test Read/WriteFileWithSeek This test calls WriteFileWithSeek on the large file created in test 1001 and writes on the boundary conditions at addresses such as: * 1GB+1024KB * 5GB+1024KB * 4GB |
1007 |
Test create a very large file This test creates a file whose size is up to the free disk space. Once complete, it verifies the size and advances the file pointer towards the end of the file while verifying the data. |
5001 |
Test SetFilePointer from 2GB This test uses the large file created in test 1001. It sets the file pointer to 2GB address and then moves the file pointer -1 byte and again by +1 byte. Then it increments the file pointer 1GB at a time, while verifying the file data. |
Setting Up the Test
The test requires a large storage device that is partitioned and formatted with exFAT or texFAT. For a hard drive, it may be connected to the device in one of many ways - ATAPI, PATA, SATA, or USB. The image must include SYSGEN_EXFAT=1.
Specific sysgens are necessary for the hard drive:
* SYSGEN_ATAPI=1 for ATAPI, PATA, or SATA connection.
* SYSGEN_USB=1 and SYSGEN_USB_STORAGE=1 for USB connection.
By default, the test will expect the storage directory to be available through "\Hard Disk" path name. If this not the case, the name of the directory must be known so that it can be given as a parameter to the test. The removable USB storage device must be formatted so and mounted. There are two ways to format the USB storage device:
1. The storage device can be partitioned and formatted using the Storage Manager Control Panel Applet. This applet can be added to the image using SYSGEN_STOREMGR_CPL. After the image has been built, the storage manager applet can be accessed by My Device->Control Panel->Storage Manager.
2. The storage device can be formatted using a Windows based desktop machines' built-in formatting application. This assumes the use of one partition.
Running the Test
This is a fully automated test once the hard drive is mounted and available for access. Tests 1001, 1003, and 1007, which create the large test files, will take between 30 minutes to 1 hour each to complete.
SYNTAX:
tux -o -d fsLargeFiles.dll -c "/path <pathname>"
Parameters | Description |
---|---|
/path <pathname> |
This specifies the specific folder name used in the file system when the large storage device (e.g. hard drive) is mounted. The default is "\Hard Disk", specified in the registry, HKLM\System\StorageManager\Profiles\HDProfile Folder="Hard Disk". |
By default, the command line will execute is:
tux -o -d fsLargeFiles.dll -x1001-1006,5001
Note:Test 1007 was omitted because of the long duration it can take to write the file whose size is up to the free disk space. You can modify the Current Command Line to include this test if desired. To run all of the tests, the command line is: tux.exe -o -d fsLargeFiles.
Verifying the Test
When the test completes running, verify that "PASS" appears in the test log for all sub-tests.
There are no other verification steps needed.
Troubleshooting the Test
1. Make sure the storage device has enough free space to store all of the test files that are created by tests 1001, 1003, and 1007.
2. Make sure the storage device has been partitioned and formatted with exFAT or texFAT. Other formats such as FAT or TFAT will fail since FAT does not support 64-bit addresses.
3. The test uses the default of "\Hard Disk" to access the hard drive volume. If your implementation uses a different path for the hard drive, you can specify the path via the "/path" option in the command line.
For additional platform specific issues, consult the CTK articles on the TechNet wiki.