return r;
}
+static int test_segv(const struct test* t) {
+ struct pakfire_jail* jail = NULL;
+ int r = EXIT_FAILURE;
+
+ const char* argv[] = {
+ "/command", "segv", NULL,
+ };
+
+ // Create a new jail
+ ASSERT_SUCCESS(pakfire_jail_create(&jail, t->pakfire, 0));
+
+ // Check if we receive the correct exit code
+ ASSERT(pakfire_jail_exec(jail, argv, NULL, NULL, NULL) == 139);
+
+ // Success
+ r = EXIT_SUCCESS;
+
+FAIL:
+ if (jail)
+ pakfire_jail_unref(jail);
+
+ return r;
+}
+
static int test_env(const struct test* t) {
struct pakfire_jail* jail = NULL;
int main(int argc, const char* argv[]) {
testsuite_add_test(test_create);
testsuite_add_test(test_exit_code);
+ testsuite_add_test(test_segv);
testsuite_add_test(test_env);
testsuite_add_test(test_exec);
testsuite_add_test(test_launch_into_cgroup);