From 8717257069249cdb217575bb3a3512d35bfadafb Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Wed, 12 Apr 2023 14:26:59 +0200 Subject: Refactor tests to use same struct arg as the filter --- tests/unit/test_operations.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/unit/test_operations.c') diff --git a/tests/unit/test_operations.c b/tests/unit/test_operations.c index bb098b8..13f767c 100644 --- a/tests/unit/test_operations.c +++ b/tests/unit/test_operations.c @@ -77,9 +77,12 @@ void setup_target_connect() MAP_SHARED | MAP_ANONYMOUS, -1, 0); at->check_fd = false; at->nr = __NR_connect; - at->args[0] = (void *)(long)fd; - at->args[1] = (void *)&addr; - at->args[2] = (void *)(long)len; + at->args[0].value.v32 = fd; + at->args[0].type = U32; + at->args[1].value.v64 = &addr; + at->args[1].type = U64; + at->args[2].value.v32 = len; + at->args[2].type = U32; at->install_filter = install_notification_filter; setup(); } -- cgit v1.2.3