Skip to content

Commit 581f7e2

Browse files
authored
Add testcase for statsd in launcher, Fixes (#3589)
* add testcase for statsd in launcher * clip
1 parent b629597 commit 581f7e2

File tree

8 files changed

+406
-157
lines changed

8 files changed

+406
-157
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/libafl/src/events/launcher.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,11 @@ impl<CF, MT, SP> Debug for Launcher<'_, CF, MT, SP> {
204204

205205
impl<CF, MT, SP> Launcher<'_, CF, MT, SP>
206206
where
207-
MT: Monitor + Clone,
207+
MT: Monitor,
208208
{
209209
/// Launch the broker and the clients and fuzz
210210
#[cfg(any(windows, not(feature = "fork"), all(unix, feature = "fork")))]
211-
pub fn launch<I, S>(&mut self) -> Result<(), Error>
211+
pub fn launch<I, S>(self) -> Result<(), Error>
212212
where
213213
CF: FnOnce(
214214
Option<S>,
@@ -225,12 +225,12 @@ where
225225

226226
impl<CF, MT, SP> Launcher<'_, CF, MT, SP>
227227
where
228-
MT: Monitor + Clone,
228+
MT: Monitor,
229229
SP: ShMemProvider,
230230
{
231231
/// Launch the broker and the clients and fuzz with a user-supplied hook
232232
#[cfg(all(unix, feature = "fork"))]
233-
pub fn launch_with_hooks<EMH, I, S>(&mut self, hooks: EMH) -> Result<(), Error>
233+
pub fn launch_with_hooks<EMH, I, S>(mut self, hooks: EMH) -> Result<(), Error>
234234
where
235235
S: DeserializeOwned + Serialize,
236236
I: DeserializeOwned,
@@ -342,7 +342,7 @@ where
342342
// TODO we don't want always a broker here, think about using different laucher process to spawn different configurations
343343
let builder = RestartingMgr::<EMH, I, MT, S, SP>::builder()
344344
.shmem_provider(self.shmem_provider.clone())
345-
.monitor(Some(self.monitor.clone()))
345+
.monitor(Some(self.monitor))
346346
.broker_port(self.broker_port)
347347
.kind(ManagerKind::Broker)
348348
.remote_broker_addr(self.remote_broker_addr)
@@ -382,7 +382,7 @@ where
382382
/// Launch the broker and the clients and fuzz
383383
#[cfg(any(windows, not(feature = "fork")))]
384384
#[expect(clippy::too_many_lines, clippy::match_wild_err_arm)]
385-
pub fn launch_with_hooks<EMH, I, S>(&mut self, hooks: EMH) -> Result<(), Error>
385+
pub fn launch_with_hooks<EMH, I, S>(mut self, hooks: EMH) -> Result<(), Error>
386386
where
387387
CF: FnOnce(
388388
Option<S>,
@@ -511,7 +511,7 @@ where
511511

512512
let builder = RestartingMgr::<EMH, I, MT, S, SP>::builder()
513513
.shmem_provider(self.shmem_provider.clone())
514-
.monitor(Some(self.monitor.clone()))
514+
.monitor(Some(self.monitor))
515515
.broker_port(self.broker_port)
516516
.kind(ManagerKind::Broker)
517517
.remote_broker_addr(self.remote_broker_addr)

crates/libafl/src/events/llmp/restarting.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ pub fn setup_restarting_mgr_std<I, MT, S>(
613613
>
614614
where
615615
I: DeserializeOwned,
616-
MT: Monitor + Clone,
616+
MT: Monitor,
617617
S: Serialize + DeserializeOwned,
618618
{
619619
RestartingMgr::builder()
@@ -644,7 +644,7 @@ pub fn setup_restarting_mgr_std_adaptive<I, MT, S>(
644644
Error,
645645
>
646646
where
647-
MT: Monitor + Clone,
647+
MT: Monitor,
648648
S: Serialize + DeserializeOwned,
649649
I: DeserializeOwned,
650650
{
@@ -704,7 +704,7 @@ impl<EMH, I, MT, S, SP> RestartingMgr<EMH, I, MT, S, SP>
704704
where
705705
EMH: EventManagerHooksTuple<I, S> + Copy + Clone,
706706
I: DeserializeOwned,
707-
MT: Monitor + Clone,
707+
MT: Monitor,
708708
S: Serialize + DeserializeOwned,
709709
SP: ShMemProvider,
710710
{

0 commit comments

Comments
 (0)