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

lib: dts-lib.robot: Fix Boot Dasharo Tools Suite keyword failures on laptops #317

Open m-iwanicki opened 2 weeks ago

m-iwanicki commented 2 weeks ago

On laptops Read From Terminal Until Enter an option: should fail in 20 seconds and then try to blindly start ssh server and connect via ssh. On other platforms keyword should succeed much faster. Not sure if waiting 20 seconds is ok, too long or too short

macpijan commented 1 week ago

Do we have some test log? How we have verified it works correctly?

m-iwanicki commented 1 week ago

@macpijan Only tested on MSI to check if I didn't mess anything up, couldn't test on laptop as lab testing station wasn't working. On MSI:

robot -v snipeit:yes -L TRACE -v rte_ip:192.168.10.199 -v device_ip:192.168.10.80 -v config:msi-pro-z690-a-wifi-ddr4 -t "DTS003.001*" dasharo-compatibility/dasharo-tools-suite.robot
==============================================================================
Dasharo-Tools-Suite
==============================================================================
DTS003.001 DTS option reboot DUT works correctly :: This test aims... | PASS |
------------------------------------------------------------------------------
Dasharo-Tools-Suite                                                   | PASS |
1 test, 1 passed, 0 failed
==============================================================================

And now that I'm looking at it I thought that I managed to fix this problem in this PR https://github.com/Dasharo/open-source-firmware-validation/pull/276. It was merged 2 weeks ago at contained similar fix, this one is just faster on non laptop versions and should work better on iPXE if downloading takes longer due to slower network connection. But I'm not sure how, possibly by force push, that whole PR is not on develop. Last change to dts-lib.robot was 4 months ago.

macpijan commented 6 days ago

@m-iwanicki What do you suggest? We stll need this MR, or we should close it?

m-iwanicki commented 6 days ago

@macpijan I think this way is more robust now and less prone to errors. Without changes in this PR, keyword waits for 10 seconds after booting before trying to blindly enable SSH. In case of iPXE, download + boot might take longer than that. With this PR waiting only starts after DTS finished downloading and starts booting. Additionally in case of platforms that have output from Linux, keyword won't have to wait 20 seconds but only until it reads DTS menu.