Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ incremental = false
lto = true
codegen-units = 1
incremental = false

[profile.fuzz]
inherits = "dev"
opt-level = 3
incremental = false
codegen-units = 1
2 changes: 1 addition & 1 deletion common/s2n-codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ checked_range_unsafe = []
generator = ["bolero-generator"]

[dependencies]
bolero-generator = { version = "0.9", default-features = false, optional = true }
bolero-generator = { version = "0.10", default-features = false, optional = true }
byteorder = { version = "1.1", default-features = false }
bytes = { version = "1", default-features = false, optional = true }
zerocopy = "0.6"
Expand Down
6 changes: 3 additions & 3 deletions quic/s2n-quic-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ unstable-congestion-controller = []

[dependencies]
atomic-waker = { version = "1", optional = true }
bolero-generator = { version = "0.9", optional = true }
bolero-generator = { version = "0.10", optional = true }
byteorder = { version = "1", default-features = false }
bytes = { version = "1", optional = true, default-features = false }
crossbeam-utils = { version = "0.8", optional = true }
Expand All @@ -43,8 +43,8 @@ futures-test = { version = "0.3", optional = true } # For testing Waker interact
once_cell = { version = "1", optional = true }

[dev-dependencies]
bolero = "0.9"
bolero-generator = "0.9"
bolero = "0.10"
bolero-generator = "0.10"
insta = { version = "1", features = ["json"] }
futures = "0.3"
futures-test = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions quic/s2n-quic-core/src/crypto/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ fn round_trip() {
check!()
.with_generator((
gen()
.map(VarInt::from_u32)
.map(|value| PacketNumberSpace::Initial.new_packet_number(value)),
.map_gen(VarInt::from_u32)
.map_gen(|value| PacketNumberSpace::Initial.new_packet_number(value)),
gen::<Vec<u8>>(),
))
.for_each(|(largest_packet_number, input)| {
Expand Down
4 changes: 2 additions & 2 deletions quic/s2n-quic-core/src/packet/number/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn round_trip() {
check!()
.with_generator(
gen_packet_number_space()
.and_then(|space| (gen_packet_number(space), gen_packet_number(space))),
.and_then_gen(|space| (gen_packet_number(space), gen_packet_number(space))),
)
.cloned()
.for_each(|(packet_number, largest_acked_packet_number)| {
Expand All @@ -41,7 +41,7 @@ fn gen_packet_number_space() -> impl ValueGenerator<Output = PacketNumberSpace>
}

fn gen_packet_number(space: PacketNumberSpace) -> impl ValueGenerator<Output = PacketNumber> {
gen().map(move |packet_number| {
gen().map_gen(move |packet_number| {
space.new_packet_number(match VarInt::new(packet_number) {
Ok(packet_number) => packet_number,
Err(_) => VarInt::from_u32(packet_number as u32),
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ring = { version = "0.16", default-features = false }
[dev-dependencies]
aes = "0.8"
aes-gcm = "0.10"
bolero = "0.9"
bolero = "0.10"
ghash = "0.5"
hex-literal = "0.4"
insta = { version = "1", features = ["json"] }
Expand Down
6 changes: 3 additions & 3 deletions quic/s2n-quic-platform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ xdp = ["s2n-quic-xdp"]

[dependencies]
bach = { version = "0.0.6", optional = true }
bolero-generator = { version = "0.9", optional = true }
bolero-generator = { version = "0.10", optional = true }
cfg-if = "1"
futures = { version = "0.3", default-features = false, features = ["async-await"], optional = true }
lazy_static = { version = "1", optional = true }
Expand All @@ -36,8 +36,8 @@ libc = "0.2"

[dev-dependencies]
bach = { version = "0.0.6" }
bolero = "0.9"
bolero-generator = "0.9"
bolero = "0.10"
bolero-generator = "0.10"
futures = { version = "0.3", features = ["std"] }
insta = { version = "1", features = ["json"] }
s2n-quic-core = { path = "../s2n-quic-core", features = ["testing"] }
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-transport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ siphasher = "1.0"
smallvec = { version = "1", default-features = false }

[dev-dependencies]
bolero = "0.9"
bolero = "0.10"
futures-test = "0.3" # For testing Waker interactions
insta = { version = "1", features = ["json"] }
s2n-codec = { path = "../../common/s2n-codec", features = ["testing"] }
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-transport/src/ack/tests/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct Endpoint {
#[generator(constant(TestEnvironment::new()))]
pub env: TestEnvironment,

#[generator(gen_ack_settings().map(new_ack_manager))]
#[generator(gen_ack_settings().map_gen(new_ack_manager))]
pub ack_manager: AckManager,
}

Expand Down
8 changes: 4 additions & 4 deletions quic/s2n-quic-transport/src/ack/tests/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ use core::time::Duration;
use s2n_quic_core::{ack, inet::ExplicitCongestionNotification};

pub fn gen_ack_settings() -> impl ValueGenerator<Output = ack::Settings> {
(gen_duration(), 0..20).map(|(max_ack_delay, ack_delay_exponent)| ack::Settings {
(gen_duration(), 0..20).map_gen(|(max_ack_delay, ack_delay_exponent)| ack::Settings {
max_ack_delay,
ack_delay_exponent,
..Default::default()
})
}

pub fn gen_default<V: Default>() -> impl ValueGenerator<Output = V> {
gen::<()>().map(|()| V::default())
gen::<()>().map_gen(|()| V::default())
}

pub fn gen_duration() -> impl ValueGenerator<Output = Duration> {
ValueGenerator::map(1u16..10_000, |millis| Duration::from_millis(millis as u64))
(1u16..10_000).map_gen(|millis| Duration::from_millis(millis as u64))
}

pub fn gen_ecn() -> impl ValueGenerator<Output = ExplicitCongestionNotification> {
gen::<bool>().map(|has_congestion| {
gen::<bool>().map_gen(|has_congestion| {
if has_congestion {
ExplicitCongestionNotification::Ce
} else {
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ zeroize = { version = "1", optional = true, default-features = false }

[dev-dependencies]
backtrace = { version = "=0.3.68" } # pin backtrace to avoid bumping MSRV
bolero = { version = "0.9" }
bolero = { version = "0.10" }
regex = "=1.9.6" # newer versions require rust 1.65, see https://github.com/aws/s2n-quic/issues/1993
s2n-quic-core = { path = "../s2n-quic-core", features = ["testing", "event-tracing"] }
s2n-quic-platform = { path = "../s2n-quic-platform", features = ["testing"] }
Expand Down