-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
.github: add actions for CI and dependency updates #9
Conversation
Add a basic github actions config to run the tests.
Add a basic dependabot config to keep dependencies up to date.
Per https://docs.rs/structopt/latest/structopt/#maintenance, structopt has been merged into clap and is now in maintenance mode. Follow https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrate-structopt to migrate to clap 3.0.
I added some commits to update the dependencies to latest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is not right:
$ target/debug/btf dump /boot/vmlinux-$(uname -r)
thread 'main' panicked at 'Mismatch between definition and access of `format`. Could not downcast to btf::DumpFormat, need to downcast to alloc::string::String
', src/main.rs:113:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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