2021-10-07 16:08:12 +03:00
|
|
|
if not get_option('fuzzing')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2020-08-03 18:04:25 +03:00
|
|
|
specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c',
|
|
|
|
'qtest_wrappers.c'), qos)
|
|
|
|
|
|
|
|
# Targets
|
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_I440FX', if_true: files('i440fx_fuzz.c'))
|
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio_net_fuzz.c'))
|
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuzz.c'))
|
2020-11-09 14:25:50 +03:00
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio_blk_fuzz.c'))
|
2020-10-23 18:07:31 +03:00
|
|
|
specific_fuzz_ss.add(files('generic_fuzz.c'))
|
2020-08-03 18:04:25 +03:00
|
|
|
|
|
|
|
fork_fuzz = declare_dependency(
|
2021-10-07 16:08:12 +03:00
|
|
|
link_args: fuzz_exe_ldflags +
|
2020-09-02 20:36:51 +03:00
|
|
|
['-Wl,-wrap,qtest_inb',
|
2020-08-03 18:04:25 +03:00
|
|
|
'-Wl,-wrap,qtest_inw',
|
|
|
|
'-Wl,-wrap,qtest_inl',
|
|
|
|
'-Wl,-wrap,qtest_outb',
|
|
|
|
'-Wl,-wrap,qtest_outw',
|
|
|
|
'-Wl,-wrap,qtest_outl',
|
|
|
|
'-Wl,-wrap,qtest_readb',
|
|
|
|
'-Wl,-wrap,qtest_readw',
|
|
|
|
'-Wl,-wrap,qtest_readl',
|
|
|
|
'-Wl,-wrap,qtest_readq',
|
|
|
|
'-Wl,-wrap,qtest_writeb',
|
|
|
|
'-Wl,-wrap,qtest_writew',
|
|
|
|
'-Wl,-wrap,qtest_writel',
|
|
|
|
'-Wl,-wrap,qtest_writeq',
|
|
|
|
'-Wl,-wrap,qtest_memread',
|
|
|
|
'-Wl,-wrap,qtest_bufread',
|
|
|
|
'-Wl,-wrap,qtest_memwrite',
|
|
|
|
'-Wl,-wrap,qtest_bufwrite',
|
|
|
|
'-Wl,-wrap,qtest_memset']
|
|
|
|
)
|
|
|
|
|
|
|
|
specific_fuzz_ss.add(fork_fuzz)
|