Skip to content

Commit

Permalink
Merge pull request #712 from bytedance/feat-ut
Browse files Browse the repository at this point in the history
fix unit test
  • Loading branch information
yoloyyh authored Nov 22, 2024
2 parents 9e37d8c + 36636dc commit 45e9b6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/lib/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl Client {
w.write_all(rec.timestamp.to_string().as_bytes())?;
w.write_all(b",\"data\":")?;
serde_json::to_writer(w.by_ref(), rec.get_data().get_fields())?;
w.write_all(b"}\n")
w.write_all(b"}\n")?
}
Ok(())
}
Expand Down
4 changes: 3 additions & 1 deletion rasp/librasp/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,18 +997,20 @@ mod tests {
fake_configs.push(PidMissingProbeConfig {
message_type: 9,
data: ProbeConfigData {
uuid: "fake".to_string(),
uuid: Some("fake".to_string()),
blocks: None,
filters: None,
limits: None,
patches: Some(fake_patches),
..Default::default()
},
});
let fake_manager = RASPManager {
namespace_tracer: MntNamespaceTracer::new(),
thread_comm: None,
process_comm: None,
runtime_dir: false,
ebpf_comm: None,
};
println!("{:?}", fake_configs);
let _ = fake_manager
Expand Down
3 changes: 3 additions & 0 deletions rasp/librasp/src/php.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ mod php_test {
Ok(ProbeState::NotAttach) => {
println!("probe NotATTACH");
}
Ok(ProbeState::AttachedVersionNotMatch) => {
println!("probe AttachedVersionNotMatch");
}
Err(e) => {
println!("{} check probe state failed: {}", process_info.pid, e);
}
Expand Down

0 comments on commit 45e9b6a

Please sign in to comment.