boot_from_usb_device.cfg: Update regex #5877
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem
The test guest_os_booting.boot_order.usb_device.block_device looks for a regex to see if the usb boot device is being booted first.
If the usb device is blank, edk2 will reorder the boot order, to deprioritize the usb device. And it won't print it first in the boot order.
The Solution
We can see that it attempts to boot from the usb if we see edk2 printing the "USB_BOOT_TEST_UNIT_READY" command output.
Cmd 0x0: Test Unit Ready Opcode (See usb protocol documentation)
Result = 1: The unit was ready for further commands
This is printed when edk2 is asking the USB device if it is ready to recieve further commands. We can simply test for this output to see if edk2 considered the usb device for booting.
Evidence
The test passing with the change