Skip to content

Commit 00dcfb9

Browse files
committed
Gate out test functions that use probe! on ppc64le and s390x
These require `feature(asm_experimental_arch)` which only works on nightly compilers. See rust-lang/rust#93335 Also loosen version requirement on `probe`; on Fedora we have been building with `probe` 0.5.1 with no issue. Tested by doing a scratch build on Fedora's Koji build system: https://koji.fedoraproject.org/koji/taskinfo?taskID=123361398 Signed-off-by: Michel Lind <[email protected]>
1 parent bece44a commit 00dcfb9

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

libbpf-rs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ libbpf-rs = {path = ".", features = ["generate-test-files"]}
4848
log = "0.4.4"
4949
memmem = "0.1.1"
5050
plain = "0.2.3"
51-
probe = "0.3"
51+
probe = ">=0.3, <0.6"
5252
scopeguard = "1.1"
5353
serial_test = { version = "3.0", default-features = false }
5454
tempfile = "3.3"

libbpf-rs/tests/common/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use libbpf_rs::ObjectBuilder;
99
use libbpf_rs::OpenObject;
1010
use libbpf_rs::ProgramMut;
1111

12-
1312
pub fn get_test_object_path(filename: &str) -> PathBuf {
1413
let mut path = PathBuf::new();
1514
// env!() macro fails at compile time if var not found

libbpf-rs/tests/test.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ use crate::common::get_test_object;
5656
use crate::common::get_test_object_path;
5757
use crate::common::open_test_object;
5858

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

1567+
#[cfg(not(any(
1568+
all(target_arch = "powerpc64", target_endian = "little"),
1569+
target_arch = "s390x"
1570+
)))]
15681571
#[tag(root)]
15691572
#[test]
15701573
fn test_object_usdt() {
@@ -1593,6 +1596,10 @@ fn test_object_usdt() {
15931596
assert_eq!(result, 1);
15941597
}
15951598

1599+
#[cfg(not(any(
1600+
all(target_arch = "powerpc64", target_endian = "little"),
1601+
target_arch = "s390x"
1602+
)))]
15961603
#[tag(root)]
15971604
#[test]
15981605
fn test_object_usdt_cookie() {

0 commit comments

Comments
 (0)