Skip to content
Merged
9 changes: 9 additions & 0 deletions fuzz/fuzz_targets/balloon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ fuzz_target!(|bytes: &[u8]| -> Corpus {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
)
.unwrap();
balloon.set_access_platform(Arc::new(IdentityAccessPlatform {}));
Expand All @@ -115,6 +116,7 @@ fuzz_target!(|bytes: &[u8]| -> Corpus {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
Some(state),
false,
);
}
}
Expand Down Expand Up @@ -197,6 +199,7 @@ fuzz_target!(|bytes: &[u8]| -> Corpus {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
)
.unwrap();
balloon_no_reporting.set_access_platform(Arc::new(IdentityAccessPlatform {}));
Expand Down Expand Up @@ -244,6 +247,7 @@ fuzz_target!(|bytes: &[u8]| -> Corpus {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
)
.unwrap();
balloon_reporting_empty.ack_features(1u64 << VIRTIO_BALLOON_F_REPORTING);
Expand Down Expand Up @@ -454,6 +458,7 @@ fn exercise_stats_queue(bytes: &[u8], queue_data: &[u8]) {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
) {
Ok(balloon) => balloon,
Err(_) => return,
Expand Down Expand Up @@ -593,6 +598,7 @@ fn run_failing_interrupt_case(
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
)
.unwrap();
balloon.ack_features(1u64 << VIRTIO_BALLOON_F_REPORTING);
Expand Down Expand Up @@ -653,6 +659,7 @@ fn activate_with_too_few_queues(queue_data: &[u8]) {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
)
.unwrap();

Expand Down Expand Up @@ -699,6 +706,7 @@ fn activate_reporting_acked_without_reporting_queue(queue_data: &[u8]) {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
)
.unwrap();
balloon.ack_features(1u64 << VIRTIO_BALLOON_F_REPORTING);
Expand Down Expand Up @@ -754,6 +762,7 @@ fn activate_reporting_available_unacked(queue_data: &[u8]) {
SeccompAction::Allow,
EventFd::new(EFD_NONBLOCK).unwrap(),
None,
false,
)
.unwrap();

Expand Down
Loading
Loading