[PATCH] tests/qtest/fuzz: Add generic fuzzer for pcie-root-port

Navid Emamdoost posted 1 patch 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251006222642.691067-1-navidem@google.com
Maintainers: Alexander Bulekov <alxndr@bu.edu>, Paolo Bonzini <pbonzini@redhat.com>, Bandan Das <bsd@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Fabiano Rosas <farosas@suse.de>, Darren Kenny <darren.kenny@oracle.com>, Qiuhao Li <Qiuhao.Li@outlook.com>, Laurent Vivier <lvivier@redhat.com>
tests/qtest/fuzz/generic_fuzz_configs.h | 4 ++++
1 file changed, 4 insertions(+)
[PATCH] tests/qtest/fuzz: Add generic fuzzer for pcie-root-port
Posted by Navid Emamdoost 1 month, 1 week ago
Add a new generic fuzz target for the 'pcie-root-port' device. This
allows the generic fuzzer to directly target the device's interfaces,
which is not sufficiently covered by existing fuzz targets.

---

This new target significantly improves code coverage for the PCIe Root
Port implementation. The baseline coverage shown below was generated by
running all existing fuzz targets with the oss-fuzz corpus.

File                     New Target      Baseline       Change
-----------------------------------------------------------------
pcie_root_port.c         67.7% (86/127)  10.2% (13/127)  +73 lines
gen_pcie_root_port.c     68.2% (45/66)   28.8% (19/66)   +26 lines

Signed-off-by: Navid Emamdoost <navidem@google.com>
---
 tests/qtest/fuzz/generic_fuzz_configs.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h
index ef0ad95712..fd2ae47ca4 100644
--- a/tests/qtest/fuzz/generic_fuzz_configs.h
+++ b/tests/qtest/fuzz/generic_fuzz_configs.h
@@ -247,6 +247,10 @@ const generic_fuzz_config predefined_configs[] = {
         .args = "-machine q35 -nodefaults "
         "-parallel file:/dev/null",
         .objects = "parallel*",
+    },{
+        .name = "pcie-root-port",
+        .args = "-machine q35 -nodefaults -device pcie-root-port",
+        .objects = "pcie-root*",
     }
 };
 
-- 
2.51.0.618.g983fd99d29-goog
Re: [PATCH] tests/qtest/fuzz: Add generic fuzzer for pcie-root-port
Posted by Alexander Bulekov 1 month, 1 week ago
On 251006 2226, Navid Emamdoost wrote:
> Add a new generic fuzz target for the 'pcie-root-port' device. This
> allows the generic fuzzer to directly target the device's interfaces,
> which is not sufficiently covered by existing fuzz targets.
>
> ---
>
> This new target significantly improves code coverage for the PCIe Root
> Port implementation. The baseline coverage shown below was generated by
> running all existing fuzz targets with the oss-fuzz corpus.
>
> File                     New Target      Baseline       Change
> -----------------------------------------------------------------
> pcie_root_port.c         67.7% (86/127)  10.2% (13/127)  +73 lines
> gen_pcie_root_port.c     68.2% (45/66)   28.8% (19/66)   +26 lines
>
> Signed-off-by: Navid Emamdoost <navidem@google.com>

Reviewed-by: Alexander Bulekov <alxndr@bu.edu>

Thank you

> ---
>  tests/qtest/fuzz/generic_fuzz_configs.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h
> index ef0ad95712..fd2ae47ca4 100644
> --- a/tests/qtest/fuzz/generic_fuzz_configs.h
> +++ b/tests/qtest/fuzz/generic_fuzz_configs.h
> @@ -247,6 +247,10 @@ const generic_fuzz_config predefined_configs[] = {
>          .args = "-machine q35 -nodefaults "
>          "-parallel file:/dev/null",
>          .objects = "parallel*",
> +    },{
> +        .name = "pcie-root-port",
> +        .args = "-machine q35 -nodefaults -device pcie-root-port",
> +        .objects = "pcie-root*",
>      }
>  };
>
> --
> 2.51.0.618.g983fd99d29-goog
>