Re: [kvm-unit-tests PATCH v2 03/18] arm64: efi: Don't create dummy test

Nikos Nikoleris
2024-03-03T21:57:04Z

On 27/02/2024 19:21, Andrew Jones wrote:
> The purpose of the _NO_FILE_4Uhere_ kernel is to check that all the
> QEMU command line options that have been pulled together by the
> scripts will work. Since booting with UEFI and the -kernel command
> line is supported by QEMU, then we don't need to create a dummy
> test for _NO_FILE_4Uhere_ and go all the way into UEFI's shell and
> execute it to prove the command line is OK, since we would have
> failed much before all that if it wasn't. Just run QEMU "normally",
> i.e. no EFI_RUN=y, but add the UEFI -bios and its file system command
> line options, in order to check the full command line.
>
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>

> ---
> arm/efi/run | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/arm/efi/run b/arm/efi/run
> index 6872c337c945..e629abde5273 100755
> --- a/arm/efi/run
> +++ b/arm/efi/run
> @@ -53,7 +53,14 @@ while (( "$#" )); do
> done
>
> if [ "$EFI_CASE" = "_NO_FILE_4Uhere_" ]; then
> - EFI_CASE=dummy
> + EFI_CASE_DIR="$EFI_TEST/dummy"
> + mkdir -p "$EFI_CASE_DIR"
> + $TEST_DIR/run \
> + $EFI_CASE \
> + -bios "$EFI_UEFI" \
> + -drive file.dir="$EFI_CASE_DIR/",file.driver=vvfat,file.rw=on,format=raw,if=virtio \
> + "${qemu_args[@]}"
> + exit
> fi
>
> : "${EFI_CASE_DIR:="$EFI_TEST/$EFI_CASE"}"