Closed tamird closed 1 year ago
I added some commits to update the dependencies to latest.
Thanks, sorry about that. i wanted to write an integration test but it seems that there's nothing currently set up for compiling the BTF and then dumping it.
EDIT: the test would look something like:
diff --git a/tests/tests.rs b/tests/tests.rs
new file mode 100644
index 0000000..8fee9f0
--- /dev/null
+++ b/tests/tests.rs
@@ -0,0 +1,43 @@
+#[test]
+fn dump() {
+ let mut cmd = std::process::Command::new(env!("CARGO_BIN_EXE_btf"));
+ let std::process::Output {
+ status,
+ stdout,
+ stderr,
+ } = cmd
+ .arg("dump")
+ .arg(path-to-btf)
+ .output()
+ .unwrap();
+ let stdout = std::str::from_utf8(&stdout);
+ let stderr = std::str::from_utf8(&stderr);
+ assert_eq!(
+ status.code(),
+ Some(0),
+ "{:?} failed: stdout={:?} stderr={:?}",
+ cmd,
+ stdout,
+ stderr
+ );
+}
``
Works now, thanks! Do you want me to create a new v0.0.4 release right away?
Yes, that would be helpful!
ok, release v0.0.4 is pushed out (https://github.com/anakryiko/btfdump/releases/tag/v0.0.4, https://crates.io/crates/btfdump/0.0.4)
/cc @ajwerner