15. Protocols Compression Test#

15.1. EFI_DECOMPRESS_PROTOCOL Test#

Reference Document:

UEFI Specification, EFI_DECOMPRESS_PROTOCOL Section.

15.1.1. GetInfo()#

Number GUID Assertion Test Description
5.13.1.1.1 0xb4929cbe, 0x0d83, 0x481f, 0x89, 0xc7, 0xb8, 0xbd, 0x49, 0x05, 0x7c, 0xae EFI_DECOMPRESS_PROTOCOL.GetInfo - Calling GetInfo() returns EFI_SUCCESS.

1. Get the Compressed file name and uncompressed file size from the profile.

2. Read the Compressed file into memory

3. Call GetInfo() to retrieve the decompression info.

The returned status should be EFI_SUCCESS.

5.13.1.1.2 0x1c5d4afb, 0x66b2, 0x4ff3, 0xb9, 0x20, 0x6a, 0x21, 0x32, 0x62, 0x9f, 0xae EFI_DECOMPRESS_PROTOCOL.GetInfo - Calling GetInfo() returns a DestinationSize that is equal to the Uncompressed File Size.

1. Get the Compressed file name and uncompressed file size from the profile.

2. Read the Compressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

The returned DestinationSize should equal the Uncompressed File Size gotten from the profile.

5.13.1.1.3 0x01a92787, 0x0d15, 0x4213, 0x92, 0x06, 0x8a, 0x3a, 0xb4, 0xa3, 0xba, 0x54 EFI_DECOMPRESS_PROTOCOL.GetInfo - Calling GetInfo() the second time returns EFI_SUCCESS.

1. Get the Compressed file name and uncompressed file size from the profile.

2. Read the Compressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

4. Call GetInfo() again.

The returned status should be EFI_SUCCESS.

5.13.1.1.4 0xb80b38e3, 0x3f4c, 0x43e0, 0xb8, 0x6d, 0x5b, 0x01, 0x38, 0xbd, 0x0f, 0x3e EFI_DECOMPRESS_PROTOCOL.GetInfo - Calling GetInfo() the second time returns a DestinationSize that is equal to the DestinationSize returned after the first call.

1. Get the Compressed file name and uncompressed file size from the profile.

2. Read the Compressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

4. Call GetInfo() again.

The returned DestinationSize should be the same value as the first time.

5.13.1.1.5 0x43ee9ff0, 0x4867, 0x4fe6, 0xac, 0x09, 0x72, 0x0a, 0x33, 0x8b, 0x80, 0xd8 EFI_DECOMPRESS_PROTOCOL.GetInfo - Calling GetInfo() the second time returns a ScratchSize that is equal to the ScratchSize returned after the first call.

1. Get the Compressed file name and uncompressed file size from the profile.

2. Read the Compressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

4. Call GetInfo() again.

The returned ScratchSize should be the same value as the first time.

5.13.1.1.6 0x66c06d59, 0x77ab, 0x4bc6, 0x98, 0x20, 0xbf, 0x01, 0x60, 0xd6, 0x1e, 0x6a EFI_DECOMPRESS_PROTOCOL.GetInfo - Calling GetInfo() with SourceSize < 8 returns EFI_INVALID_PARAMETER.

Call GetInfo() with SourceSize < 8.

The returned status should be EFI_INVALID_PARAMETER.

15.1.2. Decompress()#

Number GUID Assertion Test Description
5.13.1.2.1 0x37d2514e, 0x27f0, 0x4182, 0xb7, 0x13, 0x14, 0xf4, 0xbf, 0x53, 0xbb, 0xae EFI_DECOMPRESS_PROTOCOL.Decompress – Calling Decompress() on a 0 length file returns EFI_SUCCESS.

1. Get the Compressed file name and uncompressed file name from the profile.

2. Read the Compressed file and uncompressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

4. Call Decompress() with the compressed file buffer.

The returned status should be EFI_SUCCESS.

5.13.1.2.2 0xf2665735, 0x8992, 0x47bc, 0xb2, 0x99, 0x8a, 0x00, 0x32, 0xab, 0x59, 0x93 EFI_DECOMPRESS_PROTOCOL.Decompress - Calling Decompress() on a 0 length file does not modify the buffer.

1. Get the Compressed file name and uncompressed file name from the profile.

2. Read the Compressed file and uncompressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

4. Call Decompress() with the compressed file buffer.

If the uncompressed file size is 0, the destination buffer should not be modified.

5.13.1.2.3 0x8eceea13, 0x34ce, 0x43af, 0xbf, 0x9c, 0xb8, 0x3d, 0xe6, 0x32, 0x29, 0x69 EFI_DECOMPRESS_PROTOCOL.Decompress - Calling Decompress() on a non‑0 file returns EFI_SUCCESS.

1. Get the Compressed file name and uncompressed file name from the profile.

2. Read the Compressed file and uncompressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

4. Call Decompress() with the compressed file buffer.

The returned status should be EFI_SUCCESS.

5.13.1.2.4 0xd8aa9038, 0xc3d1, 0x4f9c, 0x9d, 0xbb, 0x3c, 0xc8, 0x6d, 0xee, 0xd1, 0xe6 EFI_DECOMPRESS_PROTOCOL.Decompress – After calling Decompress() on a non‑0 file, the Decompressed data is equal to the Uncompressed data.

1. Get the Compressed file name and uncompressed file name from the profile.

2. Read the Compressed file and uncompressed file into memory.

3. Call GetInfo() to retrieve the decompression info.

4. Call Decompress() with the compressed file buffer.

If the uncompressed file size is non-0, the Decompressed data should be equal to the Uncompressed file data.

5.13.1.2.5 0x9e6e6f21, 0x15f3, 0x4b0c, 0x9a, 0x9a, 0x17, 0xfc, 0xab, 0x5c, 0x54, 0x23 EFI_DECOMPRESS_PROTOCOL.Decompress - After calling Decompress() with an invalid compressed file, the returned status is EFI_INVALID_PARAMETER.

1. Get the invalid compressed format file name from the profile.

2. Call GetInfo() to retrieve the decompression info.

3. Call Decompress() with an invalid compress format buffer.

The returned status should be EFI_INVALID_PARAMETER.

5.13.1.2.6 0xe145f85e, 0xcc48, 0x42d4, 0xab, 0x48, 0xb5, 0x16, 0x2f, 0xc3, 0xef, 0xae EFI_DECOMPRESS_PROTOCOL.Decompress - Calling Decompress() with an incorrect SourceSize ( SourceSize - 1 ) returns EFI_INVALID_PARAMETER.

1. Read the Compressed file into memory and save the buffer pointer.

2. Call GetInfo() to retrieve the decompression info.

3. Call Decompress() with incorrect SourceSize ( SourceSize - 1 )

The returned status should be EFI_INVALID_PARAMETER.

5.13.1.2.7 0xfdc75fd3, 0x3a02, 0x48e5, 0x8d, 0x7f, 0x0b, 0x14, 0x75, 0xb5, 0xcf, 0x1c EFI_DECOMPRESS_PROTOCOL.Decompress - Calling Decompress() with SourceSize < 8 returns EFI_INVALID_PARAMETER.

1. Read the Compressed file into memory and save the buffer pointer.

2. Call GetInfo() to retrieve the decompression info.

3. Call Decompress() with SourceSize < 8.

The returned status should be EFI_INVALID_PARAMETER.