Skip to contentSkip to conversation

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

PATCH In review Navid Emamdoost 2 participants 2 messages Oct 6, 2025 – Oct 7, 2025

lore
Share & tools
lore
#0 lore raw

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

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
---
 tests/qtest/fuzz/generic_fuzz_configs.h | 4 ++++
 1 file changed, 4 insertions(+)
tests/qtest/fuzz/generic_fuzz_configs.h +4 -0
index ef0ad95712..fd2ae47ca4 100644
@@ -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*",
     }
 };
 
Signature · 1 line
2.51.0.618.g983fd99d29-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Navid Emamdoost

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.

Quoted 6 lines

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

Thank you

Quoted 22 lines
---
 tests/qtest/fuzz/generic_fuzz_configs.h | 4 ++++
 1 file changed, 4 insertions(+)
tests/qtest/fuzz/generic_fuzz_configs.h +4 -1
index ef0ad95712..fd2ae47ca4 100644
@@ -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