summaryrefslogtreecommitdiff
path: root/fuzz/fuzz_common.go
AgeCommit message (Collapse)Author
2025-02-25Convert ccRustFuzzPackager to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I156341b32a0db554602b6bd1e8f4dbb87dcabd6f
2025-02-18Implement host_common_data property for cc, java, rust and sh test modules Colin Cross
Implement the host_common_data property that will copy a host common module into the test data directory. This property can be used to copy a custom Tradefed test runner jar alongside the test. Bug: 262397555 Test: TestHostCommonData Change-Id: Iacef0778254a3dda400c9e221f442c47d8db7b02
2024-12-06Fix missing data when using device_common_data on fuzz modules Cole Faust
Fuzz modules didn't have the device_common_data, but since cc_defaults allows properties from a bunch of different types of cc modules, cc_defaults had a device_common_data that would be ignored when applying that defaults module to a fuzz module. Bug: 356184033 Bug: 372091092 Test: SANTIZE_HOST=address m libart_verify_classes_fuzzer && ls out/host/linux-x86/fuzz/x86_64/libart_verify_classes_fuzzer/data/ Change-Id: I4f0158ae2ee96df903ceb2c9b023c21e30ed127c
2024-10-21Add new properties to aid in removing the 1-variant fallback Cole Faust
These new properties are essentially methods to specify "outgoing transitions" in blueprint files. There are lots of host tests that want to include apps built for device in their data, so they need a property that adds dependencies based on the device variants instead of copying the same host variants. After this cl is submitted, I'll do an LSC to update all the usages that are relying on the 1-variant fallback to use these properties instead. Bug: 372091092 Test: m nothing --no-skip-soong-tests Change-Id: I45b8fb024da120ad61606e3a21de86e4392be2a4
2024-10-09Convert fuzzMutatorDeps to a transition mutator Colin Cross
fuzzMutatorDeps was modifying dependencies, which prevents incremental analysis. Use a transition mutator instead. Bug: 319288033 Test: m haiku Flag: EXEMPT refactor Change-Id: I1a518ad633bea06c618148f05ffe1434ed8c79ea
2024-09-11Rename ConfigAndErrorContext to ConfigurableEvaluatorContext Cole Faust
I'm going to be adding some methods to this interface, give it a name based on how it's going to be used, not based on what methods it contains. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I9bba04ba756c4dbe00625e2d04af81e78a11cae9
2024-05-02Make the enabled property configurable Cole Faust
This allows using select statements with it. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191 Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
2023-12-27Fix condition that misses packaging some fuzzers hamzeh
Fuzzers that are host only were not packaged in the haiku zip. Bug: 316399445 Test: make haiku Change-Id: I54f1cd3f446667b940063f16599de4139a7a7ade
2023-11-30Move test data installation to Soong Colin Cross
To generate module-info.json in Soong for b/309006256 Soong needs to know the test data paths. Moving test data installation into Soong will also help later for test suite packaging. Add ModuleContext.InstallTestData that installs the files listed in a []DataPath alongside the test. The files will also be passed to Make to allow it to continue packaging them into the test suites for now. Update the module types that are producing LOCAL_TEST_DATA entries in their Android.mk files to go through InstallTestData instead. Bug: 311428265 Test: atest --host toybox-gtests --test-timeout=120000 Change-Id: Ia8b964f86e584ea464667fd86a48d754d118bead
2023-07-18Add new options for defining paths to exclude in report gen Cory Barker
Test: built locally and verified results Bug: 290337392 Change-Id: I382fe922e74d74b26ebbb2b477877b2a61015b87
2023-06-28Added fuzz_config field to include targets in presubmits David Fu
Change-Id: I2da23288919520807982d177af646669aa740bfb
2023-06-02Add use_platform_libs to fuzz config Mark
BUG: b/279082026 TEST: mma <java_fuzz> Change-Id: Ia3dba44f66ec18d1076f1b13cc654a35b31c02d4 WANT_LGTM=ccross
2023-05-09Propagate shared library destination path through FilesToZip Colin Cross
Shared libraries in fuzz zip files may have a different filename than their source file, for example when the source file is a prebuilt in the source tree. Propagate the computed library name through FilesToZip to soong_zip to use the correct name in the zip file. Bug: 254867347 Test: builds Change-Id: Ib0def8decdbec7842b8e1a9056fac373d743bac0
2023-04-26Changed assignee to triage_assignee in fuzzconfig David Fu
Change-Id: Ifdf4e8a3d855c414c906d249674411f4f4b88396
2023-04-18Added assignee field to FuzzConfig. David Fu
Change-Id: Ia8cff7fa0980674ef6ed64922b6895b61c1e41a4
2023-02-22Aligning cc_fuzz variable with fuzzer proto hamzeh
Test: make haiku Change-Id: I29971cdb043929b87130b4dd7b3c0589ab4b4fee
2023-02-21spelling/grammar fix Jon Bottarini
Test: Presubmit Change-Id: I4522ec1c457c7d98adc2820faa457b2bb7cb517a Merged-In: I4522ec1c457c7d98adc2820faa457b2bb7cb517a
2022-10-10Merge changes Ib951c4f5,Iacdccb8f Mark Teffeteller
* changes: Include target_mods field Test: build a module with target_mods populated in cc_fuzz Update cc_fuzz rule - add library_path param Test: make haiku
2022-10-06Include target_mods field Mark
Test: build a module with target_mods populated in cc_fuzz Change-Id: Ib951c4f551db27f67e2cc18717e52763a99907a3
2022-10-04Move fuzzer's CollectAllSharedDependencies into GenerateAndroidBuildActions Colin Cross
Make rust and cc fuzzers collect their shared libraries once in GenerateAndroidBuildActions and store it for later use by the packaging singleton. Also use android.OutputFileForModule to get the paths. Together this will fix fuzzers that depend on architecture specific prebuilt shared libraries that are missing a prebuilt for an architecture when building with AllowMissingDependencies. Bug: 250918230 Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing Change-Id: I154a6f3a767c883e9fe7067003615db73ee78e2d
2022-09-26Update cc_fuzz rule - add library_path param Mark
Test: make haiku Change-Id: Iacdccb8fbc4a0937693a41ddc2107b4584203b94
2022-08-08Revert^2 "Update the way we build AFL++ fuzz binaries" Cory Barker
Test: Built AFL fuzzers individually and built all using haiku command and built libfuzzers individually and also by using haiku command. Ran selected fuzzers manually to ensure fuzzing still worked. Description: Previously we needed to add cc_afl_fuzz to build an afl fuzz binary, however, to turn current libFuzzers into AFL fuzzers this would required an update to each Android.bp file which is a lot of work, and would also require an approval from each Android.bp file owner, which is even more work. To get around this (and also to match how AFL fuzzers are built in G3) we will build AFL++ fuzz binaries by command line option FUZZ_FRAMEWORK. When FUZZ_FRAMEWORK=AFL is set, all cc_fuzz modules will be built for AFL rather than libFuzzer. Devs can also specify if a cc_fuzz module is only for libFuzzer or AFL by using fuzzing_frameworks. If fuzzing_frameworks is left blank then it will be assumed that the cc_fuzz module can be built for all available fuzzing frameworks. Change-Id: If57d3038f05e52775177eaeb26f8ed2bdc73443a
2022-08-08Merge "Revert "Updated the way we build AFL++ fuzz binaries"" Cory Barker
2022-08-08Revert "Updated the way we build AFL++ fuzz binaries" Cory Barker
Revert submission 2164482-Build AFL from Command line option Reason for revert: Unit test fails on MAC builds Reverted Changes: Ia7a822462:Updated the way we build AFL++ fuzz binaries I994bde63b:Updated the way we build AFL++ fuzz binaries Ie863853b4:Updated the way we build AFL++ fuzz binaries I577d6ae7b:Updated the way we build AFL++ fuzz binaries Ic4fd34f8d:Updated the way we build AFL++ fuzz binaries Change-Id: Ic2cda7733d206d7ed178f1db5e38268bc915e57b
2022-08-08Merge "Updated the way we build AFL++ fuzz binaries" Cory Barker
2022-08-05Updated the way we build AFL++ fuzz binaries Cory Barker
Test: Built AFL fuzzers individually and built all using haiku command and built libfuzzers individually and also by using haiku command. Ran selected fuzzers manually to ensure fuzzing still worked. Description: Previously we needed to add cc_afl_fuzz to build an afl fuzz binary, however, to turn current libFuzzers into AFL fuzzers this would required an update to each Android.bp file which is a lot of work, and would also require an approval from each Android.bp file owner, which is even more work. To get around this (and also to match how AFL fuzzers are built in G3) we will build AFL++ fuzz binaries by command line option FUZZ_FRAMEWORK. When FUZZ_FRAMEWORK=AFL is set, all cc_fuzz modules will be built for AFL rather than libFuzzer. Devs can also specify if a cc_fuzz module is only for libFuzzer or AFL by using fuzzing_frameworks. If fuzzing_frameworks is left blank then it will be assumed that the cc_fuzz module can be built for all available fuzzing frameworks. Change-Id: Ia7a8224627f2de61606b410d1d1a56d7bdc0955f
2022-07-26Fixing issue with boolean params in cc_fuzz hamzeh
Test: m example_fuzzer Change-Id: I2661d9915949d4150876db6527b865e63d356e5e
2022-07-14Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ↵ Cory Barker
ran them"
2022-07-13Merge "Fix name of new param in cc_fuzz" Treehugger Robot
2022-07-12Fix name of new param in cc_fuzz hamzeh
Test: m example_fuzzer Change-Id: I900a0eaf061ed22a0452eba06cd83b52003a3ea9
2022-07-12Adding support for building AFLpp Cory Barker
Test: Build AFL fuzzers locally and ran them Change-Id: Ie4fbd258c87663cf81d7d64d575b3da1d5febc17
2022-07-12Merge "Revert "Adding support for building AFLpp Test: Build AFL fuzzer..."" Cory Barker
2022-07-12Revert "Adding support for building AFLpp Test: Build AFL fuzzer..." Cory Barker
Revert submission 2124256-AFLpp support in Soong Reason for revert: It is breaking the build Reverted Changes: Ie07ec3368:Adding support for building AFLpp Test: Build AFL ... I5bd6d1e9b:Adding support for building AFLpp Test: Built AFL ... Change-Id: Id2eec1060f7532fec46293d0c207be800e6eaa03
2022-07-12Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ↵ Cory Barker
ran them"
2022-07-12Adding support for building AFLpp Cory Barker
Test: Build AFL fuzzers locally and ran them Change-Id: Ie07ec336892649192a844a4d0d231196673e34a0
2022-07-07Add ISE requested params to soong bp hamzeh
The newly added params will be used to help automatically assign bugs found by fuzzers. Test: m example_fuzzer Bug: 236732888 Change-Id: I80e38fae171f8a5798a1495d057bfa6942857c4a
2022-04-26Add jni support to java_fuzz_host Muhammad Haseeb Ahmad
Bug: 219782880 Test: m example_java_fuzzer_with_native_lib, go test -run TestJavaFuzz Change-Id: I1d05fb449e5378a27a0096869d9c12ca0a1245c6
2022-01-12Add java_fuzz_packaging Muhammad Haseeb Ahmad
java_fuzz_package is a prelude to a haiku-java build target. Test: m example_java_fuzzer Change-Id: I78caa53d7687e24f7180c7e16013b668991d6fe6
2021-10-14rust: Package shared libraries with fuzzer zips Ivan Lozano
Rust fuzzers were not packaging up their CC shared dependencies. This would lead to fuzzers using the shared libraries included on system, which may not be sanitized, leading to incorrect behavior. This refactors the relevant code from CC and calls it from the Rust build logic. Bug: 202282599 Test: output rust fuzzer zip file includes shared dependencies. Change-Id: I92196eb0141733797a67eae24f8e9aedea94c3bc
2021-08-11Moving common fuzzing code to fuzz package hamzeh
Test: make haiku and make haiku-rust Change-Id: Ife80cc10672f51bd6afbae7061cc9373a2a15e7d