Skip to content

Commit

Permalink
Update fuzz test names
Browse files Browse the repository at this point in the history
  • Loading branch information
sgwilym committed Sep 11, 2024
1 parent 146f321 commit 3e12e41
Show file tree
Hide file tree
Showing 32 changed files with 89 additions and 80 deletions.
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/area_rel_area_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use earthstar::identity_id::IdentityIdentifier as IdentityId;
use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::grouping::Area;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;

fuzz_target!(|data: (
Area<16, 16, 16, IdentityId>,
Expand All @@ -17,7 +17,7 @@ fuzz_target!(|data: (
return;
}

relative_encoding_roundtrip::<
relative_encoding_canonical_roundtrip::<
Area<16, 16, 16, IdentityId>,
Area<16, 16, 16, IdentityId>,
TestConsumer<u8, u16, ()>,
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/entry_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use earthstar::namespace_id::NamespaceIdentifier as EsNamespaceId;
use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::Entry;
use willow_fuzz::encode::encoding_roundtrip;
use willow_fuzz::encode::encoding_canonical_roundtrip;
use willow_fuzz::placeholder_params::FakePayloadDigest;

fuzz_target!(|data: (
Expand All @@ -14,5 +14,5 @@ fuzz_target!(|data: (
)| {
let (entry, mut consumer) = data;

encoding_roundtrip::<_, TestConsumer<u8, u16, ()>>(entry, &mut consumer);
encoding_canonical_roundtrip::<_, TestConsumer<u8, u16, ()>>(entry, &mut consumer);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/entry_encoding_random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use earthstar::namespace_id::NamespaceIdentifier as EsNamespaceId;
use willow_data_model::Entry;

use libfuzzer_sys::fuzz_target;
use willow_fuzz::{encode::encoding_random, placeholder_params::FakePayloadDigest};
use willow_fuzz::{encode::encoding_canonical_random, placeholder_params::FakePayloadDigest};

fuzz_target!(|data: &[u8]| {
encoding_random::<Entry<3, 3, 3, EsNamespaceId, IdentityId, FakePayloadDigest>>(data);
encoding_canonical_random::<Entry<3, 3, 3, EsNamespaceId, IdentityId, FakePayloadDigest>>(data);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/entry_rel_entry_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use earthstar::namespace_id::NamespaceIdentifier as EsNamespaceId;
use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::Entry;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;
use willow_fuzz::placeholder_params::FakePayloadDigest;

fuzz_target!(|data: (
Expand All @@ -15,7 +15,7 @@ fuzz_target!(|data: (
)| {
let (entry_sub, entry_ref, mut consumer) = data;

relative_encoding_roundtrip::<
relative_encoding_canonical_roundtrip::<
Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>,
Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>,
TestConsumer<u8, u16, ()>,
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/entry_rel_namespace_area_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::grouping::Area;
use willow_data_model::Entry;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;
use willow_fuzz::placeholder_params::FakePayloadDigest;

fuzz_target!(|data: (
Expand All @@ -22,7 +22,7 @@ fuzz_target!(|data: (

let namespace = entry.namespace_id().clone();

relative_encoding_roundtrip::<
relative_encoding_canonical_roundtrip::<
Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>,
(EsNamespaceId, Area<16, 16, 16, IdentityId>),
TestConsumer<u8, u16, ()>,
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/entry_rel_namespace_range_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::grouping::Range3d;
use willow_data_model::Entry;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;
use willow_fuzz::placeholder_params::FakePayloadDigest;

fuzz_target!(|data: (
Expand All @@ -22,7 +22,7 @@ fuzz_target!(|data: (

let namespace = entry.namespace_id().clone();

relative_encoding_roundtrip::<
relative_encoding_canonical_roundtrip::<
Entry<16, 16, 16, EsNamespaceId, IdentityId, FakePayloadDigest>,
(EsNamespaceId, Range3d<16, 16, 16, IdentityId>),
TestConsumer<u8, u16, ()>,
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/mc_capability_rel_area_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target;
use meadowcap::McCapability;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::grouping::Area;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;
use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig};

fuzz_target!(|data: (
Expand Down Expand Up @@ -38,7 +38,7 @@ fuzz_target!(|data: (
return;
}

relative_encoding_roundtrip::<
relative_encoding_canonical_roundtrip::<
McCapability<3, 3, 3, SillyPublicKey, SillySig, SillyPublicKey, SillySig>,
Area<3, 3, 3, SillyPublicKey>,
TestConsumer<u8, u16, ()>,
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/mc_capability_rel_area_encoding_random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
use libfuzzer_sys::fuzz_target;
use meadowcap::McCapability;
use willow_data_model::grouping::Area;
use willow_fuzz::encode::relative_encoding_random;
use willow_fuzz::encode::relative_encoding_canonical_random;
use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig};

fuzz_target!(|data: (&[u8], Area<3, 3, 3, SillyPublicKey>,)| {
let (random_bytes, out) = data;

relative_encoding_random::<
relative_encoding_canonical_random::<
Area<3, 3, 3, SillyPublicKey>,
McCapability<3, 3, 3, SillyPublicKey, SillySig, SillyPublicKey, SillySig>,
>(out, random_bytes)
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/mc_subspace_capability_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;
use meadowcap::McSubspaceCapability;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_fuzz::encode::encoding_roundtrip;
use willow_fuzz::encode::encoding_canonical_roundtrip;
use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig};

fuzz_target!(|data: (
Expand All @@ -23,7 +23,7 @@ fuzz_target!(|data: (
last_receiver = delegee;
}

encoding_roundtrip::<
encoding_canonical_roundtrip::<
McSubspaceCapability<SillyPublicKey, SillySig, SillyPublicKey, SillySig>,
TestConsumer<u8, u16, ()>,
>(cap_with_delegees, &mut consumer)
Expand Down
8 changes: 4 additions & 4 deletions fuzz/fuzz_targets/mc_subspace_capability_encoding_random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

use libfuzzer_sys::fuzz_target;
use meadowcap::McSubspaceCapability;
use willow_fuzz::encode::encoding_random;
use willow_fuzz::encode::encoding_canonical_random;
use willow_fuzz::silly_sigs::{SillyPublicKey, SillySig};

fuzz_target!(|data: &[u8]| {
encoding_random::<McSubspaceCapability<SillyPublicKey, SillySig, SillyPublicKey, SillySig>>(
data,
)
encoding_canonical_random::<
McSubspaceCapability<SillyPublicKey, SillySig, SillyPublicKey, SillySig>,
>(data)
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/path_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::Path;
use willow_fuzz::encode::encoding_roundtrip;
use willow_fuzz::encode::encoding_canonical_roundtrip;

const MCL: usize = 300;
const MCC: usize = 300;
Expand All @@ -12,5 +12,5 @@ const MPL: usize = 300;
fuzz_target!(|data: (Path<MCL, MCC, MPL>, TestConsumer<u8, u16, ()>)| {
let (path, mut consumer) = data;

encoding_roundtrip::<_, TestConsumer<u8, u16, ()>>(path, &mut consumer);
encoding_canonical_roundtrip::<_, TestConsumer<u8, u16, ()>>(path, &mut consumer);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/path_encoding2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::Path;
use willow_fuzz::encode::encoding_roundtrip;
use willow_fuzz::encode::encoding_canonical_roundtrip;

const MCL: usize = 2;
const MCC: usize = 3;
Expand All @@ -12,5 +12,5 @@ const MPL: usize = 3;
fuzz_target!(|data: (Path<MCL, MCC, MPL>, TestConsumer<u8, u16, ()>)| {
let (path, mut consumer) = data;

encoding_roundtrip::<_, TestConsumer<u8, u16, ()>>(path, &mut consumer);
encoding_canonical_roundtrip::<_, TestConsumer<u8, u16, ()>>(path, &mut consumer);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/path_encoding3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;
use willow_data_model::Path;
use willow_fuzz::encode::encoding_roundtrip;
use willow_fuzz::encode::encoding_canonical_roundtrip;

const MCL: usize = 4;
const MCC: usize = 4;
Expand All @@ -12,5 +12,5 @@ const MPL: usize = 16;
fuzz_target!(|data: (Path<MCL, MCC, MPL>, TestConsumer<u8, u16, ()>)| {
let (path, mut consumer) = data;

encoding_roundtrip::<_, TestConsumer<u8, u16, ()>>(path, &mut consumer);
encoding_canonical_roundtrip::<_, TestConsumer<u8, u16, ()>>(path, &mut consumer);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/path_encoding_random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

use libfuzzer_sys::fuzz_target;
use willow_data_model::Path;
use willow_fuzz::encode::encoding_random;
use willow_fuzz::encode::encoding_canonical_random;

const MCL: usize = 300;
const MCC: usize = 300;
const MPL: usize = 300;

fuzz_target!(|data: &[u8]| {
encoding_random::<Path<MCL, MCC, MPL>>(data);
encoding_canonical_random::<Path<MCL, MCC, MPL>>(data);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/path_encoding_random2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

use libfuzzer_sys::fuzz_target;
use willow_data_model::Path;
use willow_fuzz::encode::encoding_random;
use willow_fuzz::encode::encoding_canonical_random;

const MCL: usize = 2;
const MCC: usize = 3;
const MPL: usize = 3;

fuzz_target!(|data: &[u8]| {
encoding_random::<Path<MCL, MCC, MPL>>(data);
encoding_canonical_random::<Path<MCL, MCC, MPL>>(data);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/path_encoding_random3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

use libfuzzer_sys::fuzz_target;
use willow_data_model::Path;
use willow_fuzz::encode::encoding_random;
use willow_fuzz::encode::encoding_canonical_random;

const MCL: usize = 4;
const MCC: usize = 4;
const MPL: usize = 16;

fuzz_target!(|data: &[u8]| {
encoding_random::<Path<MCL, MCC, MPL>>(data);
encoding_canonical_random::<Path<MCL, MCC, MPL>>(data);
});
12 changes: 6 additions & 6 deletions fuzz/fuzz_targets/path_rel_path_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;

use willow_data_model::Path;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;

const MCL: usize = 300;
const MCC: usize = 300;
Expand All @@ -17,9 +17,9 @@ fuzz_target!(|data: (
)| {
let (path_sub, path_ref, mut consumer) = data;

relative_encoding_roundtrip::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>, TestConsumer<u8, u16, ()>>(
path_sub,
path_ref,
&mut consumer,
)
relative_encoding_canonical_roundtrip::<
Path<MCL, MCC, MPL>,
Path<MCL, MCC, MPL>,
TestConsumer<u8, u16, ()>,
>(path_sub, path_ref, &mut consumer)
});
12 changes: 6 additions & 6 deletions fuzz/fuzz_targets/path_rel_path_encoding2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;

use willow_data_model::Path;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;

const MCL: usize = 2;
const MCC: usize = 3;
Expand All @@ -17,9 +17,9 @@ fuzz_target!(|data: (
)| {
let (path_sub, path_ref, mut consumer) = data;

relative_encoding_roundtrip::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>, TestConsumer<u8, u16, ()>>(
path_sub,
path_ref,
&mut consumer,
)
relative_encoding_canonical_roundtrip::<
Path<MCL, MCC, MPL>,
Path<MCL, MCC, MPL>,
TestConsumer<u8, u16, ()>,
>(path_sub, path_ref, &mut consumer)
});
12 changes: 6 additions & 6 deletions fuzz/fuzz_targets/path_rel_path_encoding3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use libfuzzer_sys::fuzz_target;
use ufotofu::local_nb::consumer::TestConsumer;

use willow_data_model::Path;
use willow_fuzz::encode::relative_encoding_roundtrip;
use willow_fuzz::encode::relative_encoding_canonical_roundtrip;

const MCL: usize = 4;
const MCC: usize = 4;
Expand All @@ -17,9 +17,9 @@ fuzz_target!(|data: (
)| {
let (path_sub, path_ref, mut consumer) = data;

relative_encoding_roundtrip::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>, TestConsumer<u8, u16, ()>>(
path_sub,
path_ref,
&mut consumer,
)
relative_encoding_canonical_roundtrip::<
Path<MCL, MCC, MPL>,
Path<MCL, MCC, MPL>,
TestConsumer<u8, u16, ()>,
>(path_sub, path_ref, &mut consumer)
});
7 changes: 5 additions & 2 deletions fuzz/fuzz_targets/path_rel_path_encoding_random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use libfuzzer_sys::fuzz_target;
use willow_data_model::Path;
use willow_fuzz::encode::relative_encoding_random;
use willow_fuzz::encode::relative_encoding_canonical_random;

const MCL: usize = 300;
const MCC: usize = 300;
Expand All @@ -11,5 +11,8 @@ const MPL: usize = 300;
fuzz_target!(|data: (&[u8], Path<MCL, MCC, MPL>)| {
let (random_bytes, ref_path) = data;

relative_encoding_random::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>>(ref_path, random_bytes)
relative_encoding_canonical_random::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>>(
ref_path,
random_bytes,
)
});
7 changes: 5 additions & 2 deletions fuzz/fuzz_targets/path_rel_path_encoding_random2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use libfuzzer_sys::fuzz_target;
use willow_data_model::Path;
use willow_fuzz::encode::relative_encoding_random;
use willow_fuzz::encode::relative_encoding_canonical_random;

const MCL: usize = 2;
const MCC: usize = 3;
Expand All @@ -11,5 +11,8 @@ const MPL: usize = 3;
fuzz_target!(|data: (&[u8], Path<MCL, MCC, MPL>)| {
let (random_bytes, ref_path) = data;

relative_encoding_random::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>>(ref_path, random_bytes)
relative_encoding_canonical_random::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>>(
ref_path,
random_bytes,
)
});
7 changes: 5 additions & 2 deletions fuzz/fuzz_targets/path_rel_path_encoding_random3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use libfuzzer_sys::fuzz_target;
use willow_data_model::Path;
use willow_fuzz::encode::relative_encoding_random;
use willow_fuzz::encode::relative_encoding_canonical_random;

const MCL: usize = 4;
const MCC: usize = 4;
Expand All @@ -11,5 +11,8 @@ const MPL: usize = 16;
fuzz_target!(|data: (&[u8], Path<MCL, MCC, MPL>)| {
let (random_bytes, ref_path) = data;

relative_encoding_random::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>>(ref_path, random_bytes)
relative_encoding_canonical_random::<Path<MCL, MCC, MPL>, Path<MCL, MCC, MPL>>(
ref_path,
random_bytes,
)
});
Loading

0 comments on commit 3e12e41

Please sign in to comment.