mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-14 00:00:12 +02:00
fuzz: fix fuzz warnings (#5614)
This commit is contained in:
@@ -658,5 +658,6 @@ cfg_macros! {
|
||||
#[cfg(test)]
|
||||
fn is_unpin<T: Unpin>() {}
|
||||
|
||||
/// fuzz test (fuzz_linked_list)
|
||||
#[cfg(fuzzing)]
|
||||
pub mod fuzz;
|
||||
|
||||
@@ -507,6 +507,7 @@ pub(crate) mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
macro_rules! assert_clean {
|
||||
($e:ident) => {{
|
||||
assert!($e.pointers.get_next().is_none());
|
||||
@@ -514,6 +515,7 @@ pub(crate) mod tests {
|
||||
}};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
macro_rules! assert_ptr_eq {
|
||||
($a:expr, $b:expr) => {{
|
||||
// Deal with mapping a Pin<&mut T> -> Option<NonNull<T>>
|
||||
@@ -717,6 +719,7 @@ pub(crate) mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// This is a fuzz test. You run it by entering `cargo fuzz run fuzz_linked_list` in CLI in `/tokio/` module.
|
||||
#[cfg(fuzzing)]
|
||||
pub fn fuzz_linked_list(ops: &[u8]) {
|
||||
enum Op {
|
||||
|
||||
Reference in New Issue
Block a user