Files
qemu/tests/qtest/fuzz-e1000e-test.c
Philippe Mathieu-Daudé 9eef3854d3 tests/qtest: Do not use versioned pc-q35-5.0 machine anymore
As of QEMU v10.2.0, the v5.0.0 machines are not usable anymore.

Use the latest x86 q35 machine instead, otherwise we get:

  $ qemu-system-x86_64 -M pc-q35-5.0
  qemu-system-x86_64: unsupported machine type: "pc-q35-5.0"
  Use -machine help to list supported machines

See commit a35f8577a0 ("include/hw: add macros for deprecation
& removal of versioned machines") and f59ee04406 ("include/hw/boards:
cope with dev/rc versions in deprecation checks") for explanation
on automatically removed versioned machines.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/qemu-devel/20251224085714.83169-1-philmd@linaro.org
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-12-26 12:06:46 -03:00

54 lines
1.3 KiB
C

/*
* QTest testcase for e1000e device generated by fuzzer
*
* Copyright (c) 2021 Red Hat, Inc.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include "libqtest.h"
/*
* https://bugs.launchpad.net/qemu/+bug/1879531
*/
static void test_lp1879531_eth_get_rss_ex_dst_addr(void)
{
QTestState *s;
s = qtest_init("-nographic -monitor none -serial none -M q35");
qtest_outl(s, 0xcf8, 0x80001010);
qtest_outl(s, 0xcfc, 0xe1020000);
qtest_outl(s, 0xcf8, 0x80001004);
qtest_outw(s, 0xcfc, 0x7);
qtest_writeb(s, 0x25, 0x86);
qtest_writeb(s, 0x26, 0xdd);
qtest_writeb(s, 0x4f, 0x2b);
qtest_writel(s, 0xe1020030, 0x190002e1);
qtest_writew(s, 0xe102003a, 0x0807);
qtest_writel(s, 0xe1020048, 0x12077cdd);
qtest_writel(s, 0xe1020400, 0xba077cdd);
qtest_writel(s, 0xe1020420, 0x190002e1);
qtest_writel(s, 0xe1020428, 0x3509d807);
qtest_writeb(s, 0xe1020438, 0xe2);
qtest_writeb(s, 0x4f, 0x2b);
qtest_quit(s);
}
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
g_test_init(&argc, &argv, NULL);
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
qtest_add_func("fuzz/test_lp1879531_eth_get_rss_ex_dst_addr",
test_lp1879531_eth_get_rss_ex_dst_addr);
}
return g_test_run();
}