Skip to content

Gate out test functions that use probe! on ppc64le and s390x #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libbpf-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ libbpf-rs = {path = ".", features = ["generate-test-files"]}
log = "0.4.4"
memmem = "0.1.1"
plain = "0.2.3"
probe = "0.3"
probe = ">=0.3, <0.6"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just bump to 0.5 then? Nobody is really testing any version ranges, so this is hard to test for correctness. It's also very atypical for Rust projects from what I understand.

scopeguard = "1.1"
serial_test = { version = "3.0", default-features = false }
tempfile = "3.3"
Expand Down
1 change: 0 additions & 1 deletion libbpf-rs/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use libbpf_rs::ObjectBuilder;
use libbpf_rs::OpenObject;
use libbpf_rs::ProgramMut;


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind reverting the spurious formatting change?

pub fn get_test_object_path(filename: &str) -> PathBuf {
let mut path = PathBuf::new();
// env!() macro fails at compile time if var not found
Expand Down
9 changes: 8 additions & 1 deletion libbpf-rs/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ use crate::common::get_test_object;
use crate::common::get_test_object_path;
use crate::common::open_test_object;


/// A helper function for instantiating a `RingBuffer` with a callback meant to
/// be invoked when `action` is executed and that is intended to trigger a write
/// to said `RingBuffer` from kernel space, which then reads a single `i32` from
Expand Down Expand Up @@ -1565,6 +1564,10 @@ fn test_object_map_handle_clone() {
);
}

#[cfg(not(any(
all(target_arch = "powerpc64", target_endian = "little"),
target_arch = "s390x"
)))]
#[tag(root)]
#[test]
fn test_object_usdt() {
Expand Down Expand Up @@ -1593,6 +1596,10 @@ fn test_object_usdt() {
assert_eq!(result, 1);
}

#[cfg(not(any(
all(target_arch = "powerpc64", target_endian = "little"),
target_arch = "s390x"
)))]
#[tag(root)]
#[test]
fn test_object_usdt_cookie() {
Expand Down