]> git.proxmox.com Git - mirror_qemu.git/blame - tests/qtest/fuzz-test.c
tests/qtest: Only run fuzz-virtio-scsi when virtio-scsi is available
[mirror_qemu.git] / tests / qtest / fuzz-test.c
CommitLineData
d8dd1095
LQ
1/*
2 * QTest testcase for fuzz case
3 *
4 * Copyright (c) 2020 Li Qiang <liq3ea@gmail.com>
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
9
10#include "qemu/osdep.h"
11
12#include "libqos/libqtest.h"
13
fd250172
AB
14static void test_lp1878642_pci_bus_get_irq_level_assert(void)
15{
16 QTestState *s;
17
18 s = qtest_init("-M pc-q35-5.0 "
c8ffacbf 19 "-nographic -monitor none -serial none");
fd250172
AB
20
21 qtest_outl(s, 0xcf8, 0x8400f841);
22 qtest_outl(s, 0xcfc, 0xebed205d);
23 qtest_outl(s, 0x5d02, 0xebed205d);
6536c9e0 24 qtest_quit(s);
fd250172
AB
25}
26
d8dd1095
LQ
27int main(int argc, char **argv)
28{
29 const char *arch = qtest_get_arch();
30
31 g_test_init(&argc, &argv, NULL);
32
33 if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
fd250172
AB
34 qtest_add_func("fuzz/test_lp1878642_pci_bus_get_irq_level_assert",
35 test_lp1878642_pci_bus_get_irq_level_assert);
d8dd1095
LQ
36 }
37
38 return g_test_run();
39}