aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-02-21 13:16:59 +0100
committerAlice Frosi <afrosi@redhat.com>2023-02-21 13:28:09 +0100
commita9f04c33e5370755f36e9e85250c6ab997f94004 (patch)
treed0b810fc831433acf611c599bdcc178ba0df55a9
parent061659cdc33ce4d2b0f2fffa8ae09f4b84b57edc (diff)
downloadseitan-a9f04c33e5370755f36e9e85250c6ab997f94004.tar
seitan-a9f04c33e5370755f36e9e85250c6ab997f94004.tar.gz
seitan-a9f04c33e5370755f36e9e85250c6ab997f94004.tar.bz2
seitan-a9f04c33e5370755f36e9e85250c6ab997f94004.tar.lz
seitan-a9f04c33e5370755f36e9e85250c6ab997f94004.tar.xz
seitan-a9f04c33e5370755f36e9e85250c6ab997f94004.tar.zst
seitan-a9f04c33e5370755f36e9e85250c6ab997f94004.zip
actions: add data section
-rw-r--r--actions.c2
-rw-r--r--actions.h2
-rw-r--r--tests/unit/test_actions.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/actions.c b/actions.c
index 0366916..8e740e0 100644
--- a/actions.c
+++ b/actions.c
@@ -164,7 +164,7 @@ int do_call(struct arg_clone *c)
return 0;
}
-int do_actions(struct action actions[], unsigned int n_actions, int pid,
+int do_actions(void *data, struct action actions[], unsigned int n_actions, int pid,
int notifyfd, uint64_t id)
{
struct seccomp_notif_addfd resp_fd;
diff --git a/actions.h b/actions.h
index 3636f04..521bdaf 100644
--- a/actions.h
+++ b/actions.h
@@ -14,7 +14,7 @@ struct arg_clone {
};
int do_call(struct arg_clone *c);
-int do_actions(struct action actions[], unsigned int n_actions, int tpid,
+int do_actions(void *data, struct action actions[], unsigned int n_actions, int tpid,
int notifyfd, uint64_t id);
#endif /* ACTIONS_H */
diff --git a/tests/unit/test_actions.c b/tests/unit/test_actions.c
index 99799e5..9e1480f 100644
--- a/tests/unit/test_actions.c
+++ b/tests/unit/test_actions.c
@@ -209,7 +209,7 @@ START_TEST(test_act_continue)
struct action actions[] = {
{ .type = A_CONT },
};
- int ret = do_actions(actions, sizeof(actions) / sizeof(actions[0]), -1,
+ int ret = do_actions(NULL, actions, sizeof(actions) / sizeof(actions[0]), -1,
notifyfd, req.id);
ck_assert_msg(ret == 0, strerror(errno));
ck_assert_int_eq(at->err, 0);
@@ -224,7 +224,7 @@ START_TEST(test_act_block)
.block = { .error = -1 },
},
};
- int ret = do_actions(actions, sizeof(actions) / sizeof(actions[0]), -1,
+ int ret = do_actions(NULL, actions, sizeof(actions) / sizeof(actions[0]), -1,
notifyfd, req.id);
ck_assert_msg(ret == 0, strerror(errno));
check_target_result(-1, 0);
@@ -239,7 +239,7 @@ START_TEST(test_act_return)
.ret = { .type = IMMEDIATE, .value = 1 },
},
};
- int ret = do_actions(actions, sizeof(actions) / sizeof(actions[0]), -1,
+ int ret = do_actions(NULL, actions, sizeof(actions) / sizeof(actions[0]), -1,
notifyfd, req.id);
ck_assert_msg(ret == 0, strerror(errno));
check_target_result(1, 0);
@@ -255,7 +255,7 @@ START_TEST(test_act_return_ref)
.ret = { .type = REFERENCE, .value_p = &v },
},
};
- int ret = do_actions(actions, sizeof(actions) / sizeof(actions[0]), -1,
+ int ret = do_actions(NULL, actions, sizeof(actions) / sizeof(actions[0]), -1,
notifyfd, req.id);
ck_assert_msg(ret == 0, strerror(errno));
check_target_result(v, 0);
@@ -270,7 +270,7 @@ START_TEST(test_act_return_empty_ref)
.ret = { .type = REFERENCE, .value_p = NULL },
},
};
- int ret = do_actions(actions, sizeof(actions) / sizeof(actions[0]), -1,
+ int ret = do_actions(NULL, actions, sizeof(actions) / sizeof(actions[0]), -1,
notifyfd, req.id);
ck_assert_int_eq(ret, -1);
}
@@ -287,7 +287,7 @@ static void test_inject(struct action actions[], int n)
actions[0].inj.newfd = fd_inj;
actions[0].inj.oldfd = test_fd;
- ret = do_actions(actions, n, -1, notifyfd, req.id);
+ ret = do_actions(NULL, actions, n, -1, notifyfd, req.id);
ck_assert_msg(ret == 0, strerror(errno));
check_target_fd(pid, test_fd);
}