From e575712c596d03b93f75d160e3d95241eb895d39 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Mon, 29 Jul 2024 10:06:48 +0200 Subject: [PATCH] chore: Add comments in `*_wrong_map` tests --- aya/src/maps/bloom_filter.rs | 2 ++ aya/src/maps/lpm_trie.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/aya/src/maps/bloom_filter.rs b/aya/src/maps/bloom_filter.rs index daeaa46c..bc060d87 100644 --- a/aya/src/maps/bloom_filter.rs +++ b/aya/src/maps/bloom_filter.rs @@ -120,6 +120,8 @@ mod tests { #[test] fn test_try_from_wrong_map() { + // This is necessary to stop miri tripping over the PERF_EVENT_ARRAY + // logic and attempting to open a file to read number of online CPUs. let map = new_map(test_utils::new_obj_map::(BPF_MAP_TYPE_ARRAY)); let map = Map::Array(map); diff --git a/aya/src/maps/lpm_trie.rs b/aya/src/maps/lpm_trie.rs index 37377efa..29ab5c29 100644 --- a/aya/src/maps/lpm_trie.rs +++ b/aya/src/maps/lpm_trie.rs @@ -249,6 +249,8 @@ mod tests { #[test] fn test_try_from_wrong_map() { + // This is necessary to stop miri tripping over the PERF_EVENT_ARRAY + // logic and attempting to open a file to read number of online CPUs. let map = new_map(test_utils::new_obj_map::(BPF_MAP_TYPE_ARRAY)); let map = Map::Array(map);