Dasharo / open-source-firmware-validation

OSFV infrastructure with automated tests and scripts for managing test results
Apache License 2.0
6 stars 1 forks source link

Execute Command In Terminal not working in UEFI Shell #265

Open PLangowski opened 2 months ago

PLangowski commented 2 months ago

Device

Minnowboard Turbot

RTE version

0.7.5

Affected component(s) or functionality

No response

Brief summary

Execute Command in Terminal fails in UEFI Shell.

How reproducible

No response

How to reproduce

robot -v snipeit:no -L TRACE -v rte_ip:192.168.10.112 -v config:minnowboard-turbot assessment/txe-secure-boot.robot

Expected behavior

The keyword should execute the command and return the output.

Actual behavior

The keyword fails - for some reason it waits for an empty string instead instead of prompt.

Link to screenshots or logs

image

Additional context

As of now, executing commands in UEFI Shell requires running the following 3 keywords (after previously setting the prompt):

Write Bare Into Terminal    <command>
Press Enter
${out}=    Read From Terminal Until Prompt

A new keyword should be defined, which achieves the above.

Solutions you've tried

No response

macpijan commented 1 month ago

We enter into UEFI shell in these cases:

./dasharo-security/secure-boot.robot:150:    Enter UEFI Shell
./dasharo-security/secure-boot.robot:167:    Enter UEFI Shell
./dasharo-security/secure-boot.robot:184:    Enter UEFI Shell
./dasharo-security/secure-boot.robot:226:    Enter UEFI Shell
./dasharo-security/secure-boot.robot:238:    Enter UEFI Shell
./lib/secure-boot-lib.robot:219:Enter UEFI Shell
./assessment/txe-secure-boot.robot:35:    Enter UEFI Shell

But it seems we only execute some commands in shell in the last two, so only these should be fixed.

Steps to solve this:

JanPrusinowski commented 1 month ago

Fix availible at: Dasharo/open-source-firmware-validation/pull/302