Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Seabios support for network boot tests #619

Open
wants to merge 14 commits into
base: seabios-support
Choose a base branch
from

Conversation

pietrushnic
Copy link
Contributor

@pietrushnic pietrushnic commented Dec 3, 2024

Currently with this changes I can get following results:

% ssh -t [email protected] 'cd /tmp/osfv && source venv/bin/activate && ./scripts/ci/qemu-self-test-seabios.sh'
Warning: remote port forwarding failed for listen path /run/user/1000/gnupg/S.gpg-agent
==============================================================================
Network-Boot
==============================================================================
PXE001.001 Dasharo Network Boot is available :: This test aims to ... | PASS |
------------------------------------------------------------------------------
PXE002.001 Dasharo network boot menu boot options order is correct... | PASS |
------------------------------------------------------------------------------
PXE003.001 Autoboot option is available and works correctly :: Thi... | PASS |
------------------------------------------------------------------------------
PXE004.001 DTS option is available and works correctly :: This tes... | FAIL |
No match found for 'Enter an option' in 5 minutes. Output:
------------------------------------------------------------------------------
PXE005.001 OS installation option is available and works correctly... | FAIL |
Failure occurred and exit-on-failure mode is in use.
------------------------------------------------------------------------------
PXE006.001 iPXE shell option is available and works correctly :: T... | FAIL |
Failure occurred and exit-on-failure mode is in use.
------------------------------------------------------------------------------
PXE007.001 Dasharo Network Boot over https not http :: This test a... | FAIL |
Failure occurred and exit-on-failure mode is in use.
------------------------------------------------------------------------------
Network-Boot                                                          | FAIL |
7 tests, 3 passed, 4 failed
==============================================================================
Output:  /tmp/osfv/logs/2024.12.17_00.50.00/network-boot/output.xml
Log:     /tmp/osfv/logs/2024.12.17_00.50.00/network-boot/log.html
Report:  /tmp/osfv/logs/2024.12.17_00.50.00/network-boot/report.html
Connection to 192.168.1.81 closed.
zsh: exit 1     ssh -t [email protected]

@pietrushnic pietrushnic requested a review from macpijan December 3, 2024 00:15
This commit introduces a new feature that allows users to run tests on a
remote machine. This is particularly useful when running QEMU on the
local machine is not desirable due to security concerns or memory
limitations.

The changes include updates to the documentation to explain the new
feature and a new script, `remote-runner.sh`, which handles the
synchronization of a local directory to a remote machine and the
execution of QEMU based on parameters on the remote machine.

Signed-off-by: Piotr Król <[email protected]>
This commit refactors the qemu-run.sh and remote-runner.sh scripts to
improve their flexibility and usability.

In qemu-run.sh, the ACTION parameter has been split into ACTION and
FIRMWARE parameters. This allows the user to specify the action (os or
os_install) and the firmware (uefi or seabios) separately, providing
more flexibility in the configuration of the QEMU instance. The usage
instructions have been updated accordingly. Now we are not limited to
run tests or install only on uefi.

In remote-runner.sh, the number of required parameters has been
increased from 4 to 5 to accommodate the new FIRMWARE parameter in
qemu-run.sh. The usage instructions and error messages have been updated
to reflect this change.

Additionally, the shebang in remote-runner.sh has been changed from
different systems.

Signed-off-by: Piotr Król <[email protected]>
It is very interesting that incorrect pattern fails because of
underlying logic:

KEYWORD ${matches} = BuiltIn . Run Keyword And Return Status Should Match, ${item}, *${option}*
Documentation:

23:12:21.311 	TRACE 	Arguments: [ '2. AHCI/0: QEMU HARDDISK ATA-7 Hard-Disk (20480 MiBytes)' | '*[setup]*' ]
23:12:21.311 	TRACE 	Return: None
23:12:21.311 	TRACE 	Return: True
23:12:21.311 	INFO 	${matches} = True

So this one return True, but following one return False:

KEYWORD ${matches} = BuiltIn . Run Keyword And Return Status Should Match, ${item}, *${option}*
Documentation:

Fails if the given string does not match the given pattern.
Start / End / Elapsed: 	20241216 23:12:21.307 / 20241216 23:12:21.309 / 00:00:00.002
23:12:21.307 	TRACE 	Arguments: [ '1. DVD/CD [AHCI/2: QEMU DVD-ROM ATAPI-4 DVD/CD]' | '*[setup]*' ]
23:12:21.308 	FAIL 	'1. DVD/CD [AHCI/2: QEMU DVD-ROM ATAPI-4 DVD/CD]' does not match '*[setup]*'
23:12:21.309 	DEBUG 	Traceback (most recent call last):
  None
AssertionError: '1. DVD/CD [AHCI/2: QEMU DVD-ROM ATAPI-4 DVD/CD]' does not match '*[setup]*'
23:12:21.309 	TRACE 	Return: False
23:12:21.309 	INFO 	${matches} = False

Signed-off-by: Piotr Król <[email protected]>
This patch fix the problem where virtio-net by delivering its pxe rom
interfere with the fact that seabios needs empty romfile and use built
in iPXE to do network boot and work with developed tests.

Signed-off-by: Piotr Król <[email protected]>
…ers in env variables no mater the QEMU_FW_FILE

Signed-off-by: Piotr Król <[email protected]>
@pietrushnic pietrushnic force-pushed the seabios-support-for-network-boot-tests branch from 37fdea6 to 9ab33ff Compare December 16, 2024 23:20
The current PXE003.01 test, which is supposed to check the functionality
of autoboot, does not perform as expected. The test passes based on the
appearance of a follow-up menu "Please select boot device", which varies
under SeaBIOS.

The issue arises from the lack of DHCP returning the necessary
information, leading to the "Nothing to boot iPXE error:
https://ipxe.org/err/2d03e1".

To correct this, DHCP should return a root-path and possibly combine
it with TFTP to retrieve the file. This approach is feasible in a QEMU
environment with customizable DHCP and TFTP. However, it might be more
challenging in a lab setting.

To fix above issue this commit change description of the test and make
it work for both uefi and seabios firmware.

Signed-off-by: Piotr Król <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant