From 2b01cab2df7273dad7f95c4349929a28331338c2 Mon Sep 17 00:00:00 2001 From: Mosder Date: Tue, 13 Oct 2026 14:48:48 +0200 Subject: refactor: removed the use of mkstemp and replaced it with tmpfile + fileno -> have tp handle that somehow, maybe freopen or something? --- tests/safe_tests.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'tests/safe_tests.c') diff --git a/tests/safe_tests.c b/tests/safe_tests.c index 25cd5f6..47b927d 100644 --- a/tests/safe_tests.c +++ b/tests/safe_tests.c @@ -117,18 +117,8 @@ TEST(test_safe_pipe) { close(fd[1]); } -TEST(test_safe_mkstemp) { - char f[128]; - strcpy(f, ".tmpXXXXXX"); - int fd = safe_mkstemp(f); - test_assert(fd != -1, "Failed to create a temporary file"); - unlink(f); - close(fd); -} - #define mos_safe_fork() mos_safe_fork_fn(mos_err_info) #define mos_safe_pipe(fd) mos_safe_pipe_fn(fd, mos_err_info) -#define mos_safe_mkstemp(path) mos_safe_mkstemp_fn(path, mos_err_info) void safe_tests(Tester *tester) { TestGroup *group = add_test_group(tester, "moslib/safe.h"); @@ -141,5 +131,4 @@ void safe_tests(Tester *tester) { add_test(group, test_safe_dup2); add_test(group, test_safe_fork); add_test(group, test_safe_pipe); - add_test(group, test_safe_mkstemp); } -- cgit v1.2.3