diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index cb6c1f35..b9c170f5 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -15,6 +15,8 @@ use std::convert::TryInto; use std::env::consts::ARCH; use std::thread; +use libc::SYS_read; + // The type of the `req` parameter is different for the `musl` library. This will enable // successful build for other non-musl libraries. #[cfg(target_env = "musl")] @@ -789,3 +791,12 @@ fn test_filter_apply() { .join() .unwrap(); } + +#[test] +fn test_duplicate_syscall_keys_override_previous_rules() { + let rules = vec![(SYS_read, 1), (SYS_read, 2)]; + + let map: BTreeMap<_, _> = rules.into_iter().collect(); + + assert_eq!(map.len(), 1); +}