|
|
@@ -67,6 +67,7 @@ int test_open(struct s_sandboxenv *env, int *final_fd)
|
|
|
_assertEqual(fd_struct->fd, fd);
|
|
|
_assertEqual(fd_struct->flags, O_WRONLY);
|
|
|
_assertEqual(fd_struct->mod, 0646);
|
|
|
+ *final_fd = fd;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -87,8 +88,8 @@ int main()
|
|
|
success &= !test_open(&env, &fd);
|
|
|
success &= !test_write(&env);
|
|
|
|
|
|
- tests_release_env(&env, ¶ms);
|
|
|
fakeclose(fd, &env);
|
|
|
+ tests_release_env(&env, ¶ms);
|
|
|
unlink("_test");
|
|
|
exit(success ? EXIT_SUCCESS: EXIT_FAILURE);
|
|
|
}
|