From 4c2ed0790b852311d3d72d2691b0a12cc99a6da7 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Tue, 16 Jul 2024 13:28:45 +0000 Subject: [PATCH] chore: move PPM_MAX_PATH_SIZE macro to tests Signed-off-by: Roberto Scolaro --- driver/ppm_events_public.h | 1 - test/drivers/event_class/event_class.h | 1 + test/libsinsp_e2e/sys_call_test.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/ppm_events_public.h b/driver/ppm_events_public.h index 56bb879205..0957c77df5 100644 --- a/driver/ppm_events_public.h +++ b/driver/ppm_events_public.h @@ -38,7 +38,6 @@ or GPL2.txt for full copies of the license. * Limits */ #define PPM_MAX_EVENT_PARAMS (1 << 5) /* Max number of parameters an event can have */ -#define PPM_MAX_PATH_SIZE 1024 /* Max size that an event parameter can have in the circular buffer, in bytes */ #define PPM_MAX_NAME_LEN 32 /* diff --git a/test/drivers/event_class/event_class.h b/test/drivers/event_class/event_class.h index 360f65620b..3f5d8b7938 100644 --- a/test/drivers/event_class/event_class.h +++ b/test/drivers/event_class/event_class.h @@ -16,6 +16,7 @@ #define CURRENT_PID -1 #define CURRENT_EVENT_TYPE -1 +#define PPM_MAX_PATH_SIZE 1024 /* Max size that an event parameter can have in the circular buffer, in bytes */ extern "C" { diff --git a/test/libsinsp_e2e/sys_call_test.cpp b/test/libsinsp_e2e/sys_call_test.cpp index 014982e880..4186ab67b8 100644 --- a/test/libsinsp_e2e/sys_call_test.cpp +++ b/test/libsinsp_e2e/sys_call_test.cpp @@ -2515,7 +2515,7 @@ TEST_F(sys_call_test, fd_name_max_path) { int callnum = 0; std::string pathname("/"); - pathname.insert(1, PPM_MAX_PATH_SIZE - 3, 'A'); + pathname.insert(1, 1024, 'A'); event_filter_t filter = [&](sinsp_evt* evt) {