Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix the fuzz targets #1972

Merged
merged 6 commits into from
Jul 12, 2024
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
4 changes: 3 additions & 1 deletion .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ runs:

- name: Install Rust tools
shell: bash
run: cargo +${{ inputs.version }} quickinstall --no-binstall --no-fallback cargo-llvm-cov cargo-nextest flamegraph cargo-hack cargo-mutants hyperfine
run: |
cargo +${{ inputs.version }} quickinstall --no-binstall --no-fallback \
cargo-llvm-cov cargo-nextest flamegraph cargo-hack cargo-mutants hyperfine cargo-fuzz

# sccache slows CI down, so we leave it disabled.
# Leaving the steps below commented out, so we can re-evaluate enabling it later.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ jobs:
# hidden given that a plain cargo clippy combines all features of the
# workspace. See e.g. https://github.com/mozilla/neqo/pull/1695.
cargo +${{ matrix.rust-toolchain }} hack clippy --all-targets --feature-powerset --exclude-features gecko -- -D warnings || ${{ matrix.rust-toolchain == 'nightly' }}
# Check that the fuzz targets also build
if [ ${{ matrix.rust-toolchain }} == 'nightly' ]; then
cargo +${{ matrix.rust-toolchain }} fuzz check
fi
if: success() || failure()

- name: Check rustdoc links
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/client_initial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use libfuzzer_sys::fuzz_target;
#[cfg(all(fuzzing, not(windows)))]
fuzz_target!(|data: &[u8]| {
use neqo_common::{Datagram, Encoder, Role};
use neqo_transport::Version;
use neqo_transport::{packet::MIN_INITIAL_PACKET_SIZE, Version};
use test_fixture::{
default_client, default_server,
header_protection::{
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/server_initial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use libfuzzer_sys::fuzz_target;
#[cfg(all(fuzzing, not(windows)))]
fuzz_target!(|data: &[u8]| {
use neqo_common::{Datagram, Encoder, Role};
use neqo_transport::Version;
use neqo_transport::{packet::MIN_INITIAL_PACKET_SIZE, Version};
use test_fixture::{
default_client, default_server,
header_protection::{
Expand Down
2 changes: 1 addition & 1 deletion neqo-http3/src/connection_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ impl Http3Client {
}
Err(e) => {
qinfo!([self], "Connection error: {}.", e);
self.close(now, e.code(), &format!("{e}"));
self.close(now, e.code(), format!("{e}"));
true
}
_ => false,
Expand Down
2 changes: 1 addition & 1 deletion neqo-http3/src/connection_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl Http3ServerHandler {

fn close(&mut self, conn: &mut Connection, now: Instant, err: &Error) {
qinfo!([self], "Connection error: {}.", err);
conn.close(now, err.code(), &format!("{err}"));
conn.close(now, err.code(), format!("{err}"));
self.base_handler.close(err.code());
self.events
.connection_state_change(self.base_handler.state());
Expand Down
Loading