Skip to content

Commit

Permalink
fix: fix some warnings as errors
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
  • Loading branch information
Andreagit97 committed Sep 12, 2024
1 parent 5b9db23 commit 8a387dc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion test/drivers/event_class/network_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
/*=============================== UNIX ===========================*/

/* Max length socket unix path. */
#define MAX_SUN_PATH 109
#define MAX_SUN_PATH 108

/* Unix Client: the `xyzxe-` prefix is used to avoid name collisions */
#define UNIX_CLIENT "/tmp/xyzxe-client"
Expand Down
24 changes: 12 additions & 12 deletions test/drivers/helpers/proc_parsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
* in which we don't need them all.
*/
struct proc_info {
uint32_t tty;
pid_t ppid; /* The PID of the parent of this process. */
pid_t pgid; /* The process group ID of the process. */
char raw_args[MAX_NUM_ARGS][MAX_PATH];
const char* args[MAX_NUM_ARGS];
uint32_t uid;
uint32_t gid;
uint32_t vpid;
uint32_t vtid;
struct rlimit file_rlimit;
uint32_t loginuid;
char exepath[MAX_PATH];
uint32_t tty = 0;
pid_t ppid = 0; /* The PID of the parent of this process. */
pid_t pgid = 0; /* The process group ID of the process. */
char raw_args[MAX_NUM_ARGS][MAX_PATH] = {};
const char* args[MAX_NUM_ARGS] = {};
uint32_t uid = 0;
uint32_t gid = 0;
uint32_t vpid = 0;
uint32_t vtid = 0;
struct rlimit file_rlimit = {0, 0};
uint32_t loginuid = 0;
char exepath[MAX_PATH] = {};
};

bool get_proc_info(pid_t pid, proc_info* info);
4 changes: 2 additions & 2 deletions test/drivers/test_suites/syscall_enter_suite/connect_e.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ TEST(SyscallEnter, connectE_UNIX_failure) {
*/
#define UNIX_LONG_PATH \
"/unix_socket/test/too_long/too_long/too_long/too_long/unix_socket/test/too_long/too_long/" \
"too_long/too_longgg*"
"too_long/too_longgg"
#define EXPECTED_UNIX_LONG_PATH \
"/unix_socket/test/too_long/too_long/too_long/too_long/unix_socket/test/too_long/too_long/" \
"too_long/too_longgg"
"too_long/too_longg"

TEST(SyscallEnter, connectE_UNIX_max_path_failure) {
auto evt_test = get_syscall_event_test(__NR_connect, ENTER_EVENT);
Expand Down

0 comments on commit 8a387dc

Please sign in to comment.