[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] riscv: Suppress the error report for QEMU testing with r
From: |
Anup Patel |
Subject: |
Re: [PATCH 5/5] riscv: Suppress the error report for QEMU testing with riscv_find_firmware() |
Date: |
Sun, 3 May 2020 10:14:33 +0530 |
On Fri, May 1, 2020 at 9:25 PM Bin Meng <address@hidden> wrote:
>
> From: Bin Meng <address@hidden>
>
> We only ship plain binary bios images in the QEMU source. With Spike
> machine that uses ELF images as the default bios, running QEMU test
> will complain hence let's suppress the error report for QEMU testing.
>
> Signed-off-by: Bin Meng <address@hidden>
>
> ---
>
> hw/riscv/boot.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c
> index b76b2f3..adb421b 100644
> --- a/hw/riscv/boot.c
> +++ b/hw/riscv/boot.c
> @@ -65,9 +65,17 @@ char *riscv_find_firmware(const char *firmware_filename)
>
> filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, firmware_filename);
> if (filename == NULL) {
> - error_report("Unable to load the RISC-V firmware \"%s\"",
> - firmware_filename);
> - exit(1);
> + if (!qtest_enabled()) {
> + /*
> + * We only ship plain binary bios images in the QEMU source.
> + * With Spike machine that uses ELF images as the default bios,
> + * running QEMU test will complain hence let's suppress the error
> + * report for QEMU testing.
> + */
> + error_report("Unable to load the RISC-V firmware \"%s\"",
> + firmware_filename);
> + exit(1);
> + }
> }
>
> return filename;
> --
> 2.7.4
>
>
Looks good to me.
Reviewed-by: Anup Patel <address@hidden>
Regards,
Anup