qemu/tests/qtest/fuzz/Makefile.include
Alexander Bulekov d92e1b6d54 fuzz: skip QTest serialization
The QTest server usually parses ASCII commands from clients. Since we
fuzz within the QEMU process, skip the QTest serialization and server
for most QTest commands. Leave the option to use the ASCII protocol, to
generate readable traces for crash reproducers.

Inspired-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200529221450.26673-2-alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-06-15 18:26:46 +02:00

40 lines
1.4 KiB
Makefile

QEMU_PROG_FUZZ=qemu-fuzz-$(TARGET_NAME)$(EXESUF)
fuzz-obj-y += tests/qtest/libqtest.o
fuzz-obj-y += $(libqos-obj-y)
fuzz-obj-y += tests/qtest/fuzz/fuzz.o # Fuzzer skeleton
fuzz-obj-y += tests/qtest/fuzz/fork_fuzz.o
fuzz-obj-y += tests/qtest/fuzz/qos_fuzz.o
fuzz-obj-y += tests/qtest/fuzz/qtest_wrappers.o
# Targets
fuzz-obj-$(CONFIG_PCI_I440FX) += tests/qtest/fuzz/i440fx_fuzz.o
fuzz-obj-$(CONFIG_VIRTIO_NET) += tests/qtest/fuzz/virtio_net_fuzz.o
fuzz-obj-$(CONFIG_SCSI) += tests/qtest/fuzz/virtio_scsi_fuzz.o
FUZZ_CFLAGS += -I$(SRC_PATH)/tests -I$(SRC_PATH)/tests/qtest
# Linker Script to force coverage-counters into known regions which we can mark
# shared
FUZZ_LDFLAGS += -Xlinker -T$(SRC_PATH)/tests/qtest/fuzz/fork_fuzz.ld
FUZZ_LDFLAGS += -Wl,-wrap,qtest_inb
FUZZ_LDFLAGS += -Wl,-wrap,qtest_inw
FUZZ_LDFLAGS += -Wl,-wrap,qtest_inl
FUZZ_LDFLAGS += -Wl,-wrap,qtest_outb
FUZZ_LDFLAGS += -Wl,-wrap,qtest_outw
FUZZ_LDFLAGS += -Wl,-wrap,qtest_outl
FUZZ_LDFLAGS += -Wl,-wrap,qtest_readb
FUZZ_LDFLAGS += -Wl,-wrap,qtest_readw
FUZZ_LDFLAGS += -Wl,-wrap,qtest_readl
FUZZ_LDFLAGS += -Wl,-wrap,qtest_readq
FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeb
FUZZ_LDFLAGS += -Wl,-wrap,qtest_writew
FUZZ_LDFLAGS += -Wl,-wrap,qtest_writel
FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeq
FUZZ_LDFLAGS += -Wl,-wrap,qtest_memread
FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufread
FUZZ_LDFLAGS += -Wl,-wrap,qtest_memwrite
FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufwrite
FUZZ_LDFLAGS += -Wl,-wrap,qtest_memset