From bf3d65dc792bf6eb81efd49dcf62440322724fce Mon Sep 17 00:00:00 2001 From: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com> Date: Tue, 8 Mar 2022 03:09:48 +0100 Subject: [PATCH] roll back fuzzing install script, documentation instead (#439) --- docs/customization.md | 29 +++++++++++++++++++++++++++++ fuzzing_setup.sh | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/customization.md b/docs/customization.md index be3a6bc..6d6b82c 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -64,3 +64,32 @@ a few things you can personalize: * Whether you want to use batch attestation. * Whether you want to use signature counters. * Various constants to adapt to different hardware. + +### Testing and Fuzzing + +You might want to test your changes before deploying them. To run unit tests, +make sure that at least the `std` feature is included, e.g.: + +```shell +cargo test --features=std,with_ctap1 +``` + +Alternatively, you can simply call our test script to also test all libraries, +run clippy, check formatting and more: + +```shell +./run_desktop_tests.sh +``` + +OpenSK is fuzzed with the [OSS-Fuzz](https://github.com/google/oss-fuzz) +project. You can also run fuzzing locally. First install: + +```shell +cargo +stable install cargo-fuzz --version 0.10.2 +``` + +Then choose a fuzz target from `fuzz/fuzz_targets/`, e.g.: + +```shell +cargo fuzz run fuzz_target_process_ctap1 +``` diff --git a/fuzzing_setup.sh b/fuzzing_setup.sh index 5877608..99e0532 100755 --- a/fuzzing_setup.sh +++ b/fuzzing_setup.sh @@ -20,4 +20,4 @@ done_text="$(tput bold)DONE.$(tput sgr0)" set -e # Install cargo-fuzz library. -cargo +stable install cargo-fuzz --version 0.10.2 +cargo +stable install cargo-fuzz