diff --git a/crates/client/src/coverage/constants.rs b/crates/client/src/coverage/constants.rs index 62ed1a5a0..2f7ec9ac1 100644 --- a/crates/client/src/coverage/constants.rs +++ b/crates/client/src/coverage/constants.rs @@ -4,8 +4,7 @@ pub const COVERAGE_IGNORE_REGEX: &str = "trident-tests|trident/crates"; pub const PROFRAW_FILENAME: &str = "fuzz-cov-build-%p-%30m.profraw"; pub const JSON_REPORT_FILENAME: &str = "coverage-report.json"; pub const HTML_REPORT_DIRNAME: &str = "coverage-report"; -pub const COVERAGE_RUSTFLAGS: &str = - "-C instrument-coverage -C link-arg=-fuse-ld=lld -C link-arg=-lprofiler"; +pub const COVERAGE_RUSTFLAGS: &str = "-C instrument-coverage"; // COVERAGE SERVER pub const SETUP_DYNAMIC_COVERAGE: &str = "/setup-dynamic-coverage"; diff --git a/crates/config/src/coverage.rs b/crates/config/src/coverage.rs index 80f8d7ea8..ae778a78a 100644 --- a/crates/config/src/coverage.rs +++ b/crates/config/src/coverage.rs @@ -6,7 +6,7 @@ use crate::constants::DEFAULT_LOOPCOUNT; #[derive(Debug, Deserialize, Clone)] pub struct Coverage { - pub enable: Option, + pub enabled: Option, pub server_port: Option, pub loopcount: Option, pub format: Option, @@ -16,7 +16,7 @@ pub struct Coverage { impl Default for Coverage { fn default() -> Self { Self { - enable: Some(false), + enabled: Some(false), server_port: Some(DEFAULT_COVERAGE_SERVER_PORT), loopcount: Some(DEFAULT_LOOPCOUNT), format: Some(DEFAULT_COVERAGE_FORMAT.to_string()), @@ -27,7 +27,7 @@ impl Default for Coverage { impl Coverage { pub fn get_enable(&self) -> bool { - self.enable.unwrap_or(false) + self.enabled.unwrap_or(false) } pub fn get_server_port(&self) -> u16 { diff --git a/documentation/docs/trident-manifest/index.md b/documentation/docs/trident-manifest/index.md index 42e64b0f7..10b662832 100644 --- a/documentation/docs/trident-manifest/index.md +++ b/documentation/docs/trident-manifest/index.md @@ -38,7 +38,7 @@ enabled = true ```bash [fuzz.coverage] -enable = false +enabled = false server_port = 58432 loopcount = 0 format = "json" @@ -47,7 +47,7 @@ attach_extension = false The coverage configuration enables code coverage analysis during fuzzing sessions, providing insights into which parts of your program are being tested. -- `enable` - When set to `true`, Trident collects code coverage data throughout the fuzzing session and generates a comprehensive report upon completion. +- `enabled` - When set to `true`, Trident collects code coverage data throughout the fuzzing session and generates a comprehensive report upon completion. - `server_port` - Specifies the HTTP server port used for communication between Trident and the [Solana VS Code extension](https://marketplace.visualstudio.com/items?itemName=AckeeBlockchain.solana). - `loopcount` - Defines the number of execution flows processed before generating an intermediate coverage data file. Lower values provide more frequent coverage updates at the cost of performance. When set to `0`, coverage files are only generated at the end of the fuzzing session. - `format` - Determines the output format for coverage reports. Trident supports both `json` and `html` formats.