From 31fb700ad536c3264adeb6b9d709f4648941d774 Mon Sep 17 00:00:00 2001 From: pdliyan Date: Tue, 26 Sep 2023 20:18:28 +0800 Subject: [PATCH] fix. --- test/integration-test/src/tests/stack_argument.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration-test/src/tests/stack_argument.rs b/test/integration-test/src/tests/stack_argument.rs index 5f7976fd..d5fe5ed8 100644 --- a/test/integration-test/src/tests/stack_argument.rs +++ b/test/integration-test/src/tests/stack_argument.rs @@ -8,7 +8,6 @@ use aya::{ use aya_log::BpfLogger; use bytes::BytesMut; use log::warn; -use tokio::task; use crate::STACK_ARGUMENT; @@ -40,13 +39,14 @@ async fn stack_argument() { prog.load().unwrap(); prog.attach(Some("trigger_stack_argument"), 0, "/proc/self/exe", None) .unwrap(); - let mut args_map = HashMap::try_from(bpf.take_map("ARGS").unwrap())?; + let mut args_map: HashMap<_, u32, u64> = + HashMap::try_from(bpf.take_map("ARGS").unwrap()).unwrap(); trigger_stack_argument(0, 1, 2, 3, 4, 5, 6, 7); tokio::time::sleep(std::time::Duration::from_millis(100)).await; assert_eq!(args_map.keys().count(), 8); for iter in args_map.iter() { let iter_v = iter.unwrap(); - assert_eq!(iter_v.0, iter_v.1); + assert_eq!(iter_v.0 as u64, iter_v.1); } }