From 2d2c8127146d008e1fde7ed7efe68abe305f91b0 Mon Sep 17 00:00:00 2001 From: Alami-Amine Date: Wed, 25 Sep 2024 13:04:55 +0200 Subject: [PATCH 1/4] update submodules required for fuzztest --- third_party/abseil-cpp/src | 2 +- third_party/fuzztest | 2 +- third_party/googletest | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/abseil-cpp/src b/third_party/abseil-cpp/src index 3ab97e7212bff9..e9ca8d1ca225ef 160000 --- a/third_party/abseil-cpp/src +++ b/third_party/abseil-cpp/src @@ -1 +1 @@ -Subproject commit 3ab97e7212bff931a201c794fa1331960158bbfa +Subproject commit e9ca8d1ca225ef94fd20890b5440b22f490a410a diff --git a/third_party/fuzztest b/third_party/fuzztest index 6eb010c7223a6a..b7257a64c701fc 160000 --- a/third_party/fuzztest +++ b/third_party/fuzztest @@ -1 +1 @@ -Subproject commit 6eb010c7223a6aa609b94d49bfc06ac88f922961 +Subproject commit b7257a64c701fc30265eb91179bf9310549bf440 diff --git a/third_party/googletest b/third_party/googletest index 1d17ea141d2c11..6dae7eb4a5c3a1 160000 --- a/third_party/googletest +++ b/third_party/googletest @@ -1 +1 @@ -Subproject commit 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2 +Subproject commit 6dae7eb4a5c3a169f3e298392bff4680224aa94a From de46080949f6c030ed51a54b623b48096d613b1d Mon Sep 17 00:00:00 2001 From: Alami-Amine Date: Thu, 26 Sep 2024 19:13:12 +0200 Subject: [PATCH 2/4] Doc: Clarifying issue related to submodule version of fuzztest and abseil --- docs/guides/BUILDING.md | 6 +++++- docs/testing/fuzz_testing.md | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 0cbd2fc3c64920..6fc46950465fb9 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -401,7 +401,11 @@ Tests will be located in: `chip_pw_fuzztest` is the name of the toolchain used. - Details on How To Run Fuzz Tests in - [Running FuzzTests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md) + [Running FuzzTests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md#running-fuzztests) + +FAQ: In the event of a build failure related to missing files or dependencies +for pw_fuzzer, check the +[FuzzTest FAQ](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md#FAQ) ## Build custom configuration diff --git a/docs/testing/fuzz_testing.md b/docs/testing/fuzz_testing.md index 7660e18032ef9a..02c6e248ef83ea 100644 --- a/docs/testing/fuzz_testing.md +++ b/docs/testing/fuzz_testing.md @@ -256,6 +256,25 @@ $ ./fuzz-chip-cert-pw --fuzz=ChipCert.DecodeChipCertFuzzer ``` +### FAQ + +#### What revision should the FuzzTest and Abseil submodules be for running `pw_fuzzer` with FuzzTest? + +- Google FuzzTest is integrated into Matter using `pw_fuzzer`, which has + several dependencies. These dependencies are listed here: + [## Step 0: Set up FuzzTest for your project](https://pigweed.dev/pw_fuzzer/guides/fuzztest.html#step-0-set-up-fuzztest-for-your-project). +- Matter integrates these dependencies as submodules, including Google + FuzzTest and Abseil. +- Since FuzzTest and Abseil only support the `bazel` and `CMake` build systems + and do not support GN, Pigweed maintainers use a script to generate GN files + for these dependencies. +- the revision of FuzzTest and Abseil submodules in Matter should match or at + least be as new as the specific version (SHA1) used when generating these GN + files. +- You can find the version used for the generated GN files here: + [FuzzTest Version](https://pigweed.dev/third_party/fuzztest/#version) and + [Abseil Version](https://pigweed.dev/third_party/abseil-cpp/#version). + #### TO ADD: - More Information on Test Fixtures (After issues are resolved) From f91d75a65f0e249c35cda0d787c7630fbc139518 Mon Sep 17 00:00:00 2001 From: Alami-Amine Date: Thu, 26 Sep 2024 19:13:12 +0200 Subject: [PATCH 3/4] Doc: Clarifying issue related to submodule version of fuzztest and abseil --- docs/guides/BUILDING.md | 5 ++++- docs/testing/fuzz_testing.md | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 0cbd2fc3c64920..e91fb9840fd8a9 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -401,7 +401,10 @@ Tests will be located in: `chip_pw_fuzztest` is the name of the toolchain used. - Details on How To Run Fuzz Tests in - [Running FuzzTests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md) + [Running FuzzTests](../testing/fuzz_testing.md#running-fuzztests) + +FAQ: In the event of a build failure related to missing files or dependencies +for pw_fuzzer, check the [FuzzTest FAQ](../testing/fuzz_testing.md#FAQ) ## Build custom configuration diff --git a/docs/testing/fuzz_testing.md b/docs/testing/fuzz_testing.md index 7660e18032ef9a..68f08f4885c48e 100644 --- a/docs/testing/fuzz_testing.md +++ b/docs/testing/fuzz_testing.md @@ -256,6 +256,25 @@ $ ./fuzz-chip-cert-pw --fuzz=ChipCert.DecodeChipCertFuzzer ``` +### FAQ + +#### What revision should the FuzzTest and Abseil submodules be for running `pw_fuzzer` with FuzzTest? + +- Google FuzzTest is integrated into Matter using `pw_fuzzer`, which has + several dependencies. These dependencies are listed here: + [Step 0: Set up FuzzTest for your project](https://pigweed.dev/pw_fuzzer/guides/fuzztest.html#step-0-set-up-fuzztest-for-your-project). +- Matter integrates these dependencies as submodules, including Google + FuzzTest and Abseil. +- Since FuzzTest and Abseil only support the `bazel` and `CMake` build systems + and do not support GN, Pigweed maintainers use a script to generate GN files + for these dependencies. +- the revision of FuzzTest and Abseil submodules in Matter should match or at + least be as new as the specific version (SHA1) used when generating these GN + files. +- You can find the version used for the generated GN files here: + [FuzzTest Version](https://pigweed.dev/third_party/fuzztest/#version) and + [Abseil Version](https://pigweed.dev/third_party/abseil-cpp/#version). + #### TO ADD: - More Information on Test Fixtures (After issues are resolved) From be151d882b26e9f2e883575632ee8e6f6fd90f68 Mon Sep 17 00:00:00 2001 From: Alami-Amine Date: Thu, 26 Sep 2024 19:42:51 +0200 Subject: [PATCH 4/4] fix documentation build error --- docs/guides/BUILDING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index e91fb9840fd8a9..6fc46950465fb9 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -401,10 +401,11 @@ Tests will be located in: `chip_pw_fuzztest` is the name of the toolchain used. - Details on How To Run Fuzz Tests in - [Running FuzzTests](../testing/fuzz_testing.md#running-fuzztests) + [Running FuzzTests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md#running-fuzztests) FAQ: In the event of a build failure related to missing files or dependencies -for pw_fuzzer, check the [FuzzTest FAQ](../testing/fuzz_testing.md#FAQ) +for pw_fuzzer, check the +[FuzzTest FAQ](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md#FAQ) ## Build custom configuration