[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 11/11] tests/qtest: add tests for am53c974 device
From: |
Alexander Bulekov |
Subject: |
Re: [PATCH v3 11/11] tests/qtest: add tests for am53c974 device |
Date: |
Thu, 1 Apr 2021 12:55:59 -0400 |
On 210401 0849, Mark Cave-Ayland wrote:
> Use the autogenerated fuzzer test cases as the basis for a set of am53c974
> regression tests.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> MAINTAINERS | 1 +
> tests/qtest/am53c974-test.c | 216 ++++++++++++++++++++++++++++++++++++
> tests/qtest/meson.build | 1 +
> 3 files changed, 218 insertions(+)
> create mode 100644 tests/qtest/am53c974-test.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 554be84b32..675f35d3af 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1776,6 +1776,7 @@ F: include/hw/scsi/*
> F: hw/scsi/*
> F: tests/qtest/virtio-scsi-test.c
> F: tests/qtest/fuzz-virtio-scsi-test.c
> +F: tests/qtest/am53c974-test.c
> T: git https://github.com/bonzini/qemu.git scsi-next
>
> SSI
> diff --git a/tests/qtest/am53c974-test.c b/tests/qtest/am53c974-test.c
> new file mode 100644
> index 0000000000..9c4285d0c0
> --- /dev/null
> +++ b/tests/qtest/am53c974-test.c
> @@ -0,0 +1,216 @@
> +/*
> + * QTest testcase for am53c974
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or
> + * later. See the COPYING file in the top-level directory.
> + */
> +
> +#include "qemu/osdep.h"
> +
> +#include "libqos/libqtest.h"
> +
> +
> +static void test_cmdfifo_underflow_ok(void)
> +{
> + QTestState *s = qtest_init(
> + "-device am53c974,id=scsi "
> + "-device scsi-hd,drive=disk0 -drive "
> + "id=disk0,if=none,file=null-co://,format=raw -nodefaults");
> + qtest_outl(s, 0xcf8, 0x80001004);
> + qtest_outw(s, 0xcfc, 0x01);
> + qtest_outl(s, 0xcf8, 0x8000100e);
> + qtest_outl(s, 0xcfc, 0x8a000000);
> + qtest_outl(s, 0x8a09, 0x42000000);
> + qtest_outl(s, 0x8a0d, 0x00);
> + qtest_outl(s, 0x8a0b, 0x1000);
> + qtest_quit(s);
> +}
> +
Hi Mark,
> +/* Reported as crash_1548bd10e7 */
^^^
These numbers were just the filename/hash of the crashing test-case. I'm
not sure if they are useful to keep them around - I just needed some way
to name a bunch of functions :)
-Alex
- Re: [PATCH v3 06/11] esp: ensure cmdfifo is not empty and current_dev is non-NULL, (continued)
- [PATCH v3 07/11] esp: don't underflow cmdfifo in do_cmd(), Mark Cave-Ayland, 2021/04/01
- [PATCH v3 08/11] esp: don't overflow cmdfifo in get_cmd(), Mark Cave-Ayland, 2021/04/01
- [PATCH v3 09/11] esp: don't overflow cmdfifo if TC is larger than the cmdfifo size, Mark Cave-Ayland, 2021/04/01
- [PATCH v3 10/11] esp: don't reset async_len directly in esp_select() if cancelling request, Mark Cave-Ayland, 2021/04/01
- [PATCH v3 11/11] tests/qtest: add tests for am53c974 device, Mark Cave-Ayland, 2021/04/01
- Re: [PATCH v3 11/11] tests/qtest: add tests for am53c974 device,
Alexander Bulekov <=
- Re: [PATCH v3 00/11] esp: fix asserts/segfaults discovered by fuzzer, Alexander Bulekov, 2021/04/01