qemu-e2k/tests/qtest/fuzz-xlnx-dp-test.c
Marc-André Lureau 907b5105f1 tests: move libqtest.h back under qtest/
Since commit a2ce7dbd91 ("meson: convert tests/qtest to meson"),
libqtest.h is under libqos/ directory, while libqtest.c is still in
qtest/. Move back to its original location to avoid mixing with libqos/.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2022-05-03 15:16:51 +04:00

34 lines
720 B
C

/*
* QTest fuzzer-generated testcase for xlnx-dp display device
*
* Copyright (c) 2021 Qiang Liu <cyruscyliu@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include "libqtest.h"
/*
* This used to trigger the out-of-bounds read in xlnx_dp_read
*/
static void test_fuzz_xlnx_dp_0x3ac(void)
{
QTestState *s = qtest_init("-M xlnx-zcu102 -display none ");
qtest_readl(s, 0xfd4a03ac);
qtest_quit(s);
}
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
g_test_init(&argc, &argv, NULL);
if (strcmp(arch, "aarch64") == 0) {
qtest_add_func("fuzz/test_fuzz_xlnx_dp/3ac", test_fuzz_xlnx_dp_0x3ac);
}
return g_test_run();
}