aboutgitcodelistschat:MatrixIRC
path: root/tests/unit/test_filter_build.c
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-04-05 16:35:08 +0200
committerAlice Frosi <afrosi@redhat.com>2023-04-06 14:12:48 +0200
commit1122b45dfdef5da534cb18da7cb9c688f9a2b528 (patch)
tree8e31450225972f1f86f9d71217fd5b67497e6ccd /tests/unit/test_filter_build.c
parent481076deafd78f34a5e5f8b827a34ab9a25931c9 (diff)
downloadseitan-1122b45dfdef5da534cb18da7cb9c688f9a2b528.tar
seitan-1122b45dfdef5da534cb18da7cb9c688f9a2b528.tar.gz
seitan-1122b45dfdef5da534cb18da7cb9c688f9a2b528.tar.bz2
seitan-1122b45dfdef5da534cb18da7cb9c688f9a2b528.tar.lz
seitan-1122b45dfdef5da534cb18da7cb9c688f9a2b528.tar.xz
seitan-1122b45dfdef5da534cb18da7cb9c688f9a2b528.tar.zst
seitan-1122b45dfdef5da534cb18da7cb9c688f9a2b528.zip
Add support for 64 bits arguments
Diffstat (limited to 'tests/unit/test_filter_build.c')
-rw-r--r--tests/unit/test_filter_build.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/unit/test_filter_build.c b/tests/unit/test_filter_build.c
index 55e2a2b..4727e51 100644
--- a/tests/unit/test_filter_build.c
+++ b/tests/unit/test_filter_build.c
@@ -71,7 +71,8 @@ START_TEST(test_single_instr_two_args)
{
.name = "test1",
.args = { 0, 123, 321, 0, 0, 0 },
- .check_arg = { false, true, true, false, false, false },
+ .check_arg = { NO_CHECK, U32, U32, NO_CHECK, NO_CHECK,
+ NO_CHECK },
},
};
struct syscall_entry table[] = {
@@ -198,12 +199,14 @@ START_TEST(test_multiple_instr_with_args)
struct bpf_call calls[] = {
{ .name = "test1",
.args = { 0, 123, 321, 0, 0, 0 },
- .check_arg = { false, true, true, false, false, false } },
+ .check_arg = { NO_CHECK, U32, U32, NO_CHECK, NO_CHECK,
+ NO_CHECK } },
{ .name = "test2" },
{ .name = "test3" },
{ .name = "test4",
.args = { 0, 123, 321, 0, 0, 0 },
- .check_arg = { false, true, true, false, false, false } },
+ .check_arg = { NO_CHECK, U32, U32, NO_CHECK, NO_CHECK,
+ NO_CHECK } },
{ .name = "test5" },
};
struct syscall_entry table[] = {
@@ -272,18 +275,22 @@ START_TEST(test_multiple_instance_same_instr)
struct bpf_call calls[] = {
{ .name = "test1",
.args = { 0, 123, 0, 0, 0, 0 },
- .check_arg = { false, true, false, false, false, false } },
+ .check_arg = { NO_CHECK, U32, NO_CHECK, NO_CHECK, NO_CHECK,
+ NO_CHECK } },
{ .name = "test1",
.args = { 0, 0, 321, 0, 0, 0 },
- .check_arg = { false, false, true, false, false, false } },
+ .check_arg = { NO_CHECK, NO_CHECK, U32, NO_CHECK, NO_CHECK,
+ NO_CHECK } },
{ .name = "test2" },
{ .name = "test3" },
{ .name = "test4",
.args = { 0, 123, 0, 0, 0, 0 },
- .check_arg = { false, true, false, false, false, false } },
+ .check_arg = { NO_CHECK, U32, NO_CHECK, NO_CHECK, NO_CHECK,
+ NO_CHECK } },
{ .name = "test4",
.args = { 0, 0, 321, 0, 0, 0 },
- .check_arg = { false, false, true, false, false, false } },
+ .check_arg = { NO_CHECK, NO_CHECK, U32, NO_CHECK, NO_CHECK,
+ NO_CHECK } },
{ .name = "test5" },
};
struct syscall_entry table[] = {