ppc_hv_tests.py:HypervisorTest.test_hv_pseries test fails if xorriso is not present rather than skipping
I ran a full "make check-avocado" on an all-targets build, and it failed with:
(177/300) tests/avocado/ppc_hv_tests.py:HypervisorTest.test_hv_pseries: ERROR: [Errno 2] No such file or directory: 'xorriso' (0.14 s)
It looks like this test wants the host system to have the 'xorriso' binary. The test should be set up to SKIP if the prerequisites aren't present on the host, not to ERROR. The acpi-bits test is an example that gets this right:
(001/300) tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits: SKIP: unsupported platform or dependencies (xorriso,mformat) not installed
Full log from the avocado logfile for the test:
2024-03-25 11:31:51,635 test L0303 INFO | INIT 177-tests/avocado/ppc_hv_tests.py:HypervisorTest.test_hv_pseries
2024-03-25 11:31:51,635 parameters L0142 DEBUG| PARAMS (key=timeout, path=*, default=1000) => 1000
2024-03-25 11:31:51,636 test L0333 DEBUG| Test metadata:
2024-03-25 11:31:51,636 test L0335 DEBUG| filename: /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/tests/avocado/ppc_hv_tests.py
2024-03-25 11:31:51,636 test L0341 DEBUG| teststmpdir: /var/tmp/avocado_e9isouxp
2024-03-25 11:31:51,636 test L0342 DEBUG| workdir: /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/tests/results/job-2024-03-25T11.01-98d1ac3/test-results/tmp_dir7gx2z35o/177-tests_avocado_ppc_hv_tests.py_HypervisorTest.test_hv_pseries
2024-03-25 11:31:51,636 test L0520 INFO | START 177-tests/avocado/ppc_hv_tests.py:HypervisorTest.test_hv_pseries
2024-03-25 11:31:51,636 test L0205 DEBUG| DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)
2024-03-25 11:31:51,637 parameters L0142 DEBUG| PARAMS (key=arch, path=*, default=ppc64) => 'ppc64'
2024-03-25 11:31:51,637 parameters L0142 DEBUG| PARAMS (key=cpu, path=*, default=None) => None
2024-03-25 11:31:51,637 parameters L0142 DEBUG| PARAMS (key=qemu_bin, path=*, default=./qemu-system-ppc64) => './qemu-system-ppc64'
2024-03-25 11:31:51,760 parameters L0142 DEBUG| PARAMS (key=machine, path=*, default=pseries) => 'pseries'
2024-03-25 11:31:51,770 stacktrace L0039 ERROR|
2024-03-25 11:31:51,770 stacktrace L0041 ERROR| Reproduced traceback from: /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/pyvenv/lib/python3.10/site-packages/avocado/core/test.py:759
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| Traceback (most recent call last):
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/tests/avocado/ppc_hv_tests.py", line 93, in setUp
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| self.vmlinuz = self.extract_from_iso(iso_path, '/boot/vmlinuz-lts')
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/tests/avocado/ppc_hv_tests.py", line 71, in extract_from_iso
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| subprocess.run(cmd.split(),
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| File "/usr/lib/python3.10/subprocess.py", line 503, in run
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| with Popen(*popenargs, **kwargs) as process:
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
2024-03-25 11:31:51,773 stacktrace L0045 ERROR| self._execute_child(args, executable, preexec_fn, close_fds,
2024-03-25 11:31:51,774 stacktrace L0045 ERROR| File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
2024-03-25 11:31:51,774 stacktrace L0045 ERROR| raise child_exception_type(errno_num, err_msg, err_filename)
2024-03-25 11:31:51,774 stacktrace L0045 ERROR| FileNotFoundError: [Errno 2] No such file or directory: 'xorriso'
2024-03-25 11:31:51,774 stacktrace L0046 ERROR|
2024-03-25 11:31:51,775 test L0932 ERROR| ERROR 177-tests/avocado/ppc_hv_tests.py:HypervisorTest.test_hv_pseries -> TestSetupFail: [Errno 2] No such file or directory: 'xorriso'
Edited by Peter Maydell