Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new(driver): update exit events PPME_SYSCALL_READ_X and PPME_SYSCALL_PREAD_X with enter params #2176

Merged
merged 11 commits into from
Dec 5, 2024
Prev Previous commit
Next Next commit
update(tests): update some sinsp tests
Signed-off-by: Andrea Terzolo <[email protected]>
Andreagit97 committed Nov 29, 2024
commit 2274a15297d250a5951597ac129d49d32d81beb9
6 changes: 4 additions & 2 deletions userspace/libsinsp/test/filter_op_bcontains.ut.cpp
Original file line number Diff line number Diff line change
@@ -30,9 +30,11 @@ TEST_F(sinsp_with_test_input, bcontains_bstartswith) {
sinsp_evt* evt = add_event_advance_ts(increasing_ts(),
1,
PPME_SYSCALL_READ_X,
2,
4,
(int64_t)0,
scap_const_sized_buffer{read_buf, sizeof(read_buf)});
scap_const_sized_buffer{read_buf, sizeof(read_buf)},
(int64_t)0,
(uint32_t)0);

// test filters with bcontains
EXPECT_FALSE(filter_compiles("evt.buffer bcontains"));
6 changes: 4 additions & 2 deletions userspace/libsinsp/test/filter_transformer.ut.cpp
Original file line number Diff line number Diff line change
@@ -405,9 +405,11 @@ TEST_F(sinsp_with_test_input, len_transformer) {
evt = add_event_advance_ts(increasing_ts(),
1,
PPME_SYSCALL_READ_X,
2,
4,
(int64_t)0,
scap_const_sized_buffer{read_buf, sizeof(read_buf)});
scap_const_sized_buffer{read_buf, sizeof(read_buf)},
(int64_t)0,
(uint32_t)0);

EXPECT_TRUE(eval_filter(evt, "len(evt.arg.data) == 6"));
}