diff options
| author | Mosder <git@mosder.eu> | 2026-10-13 14:48:48 +0200 |
|---|---|---|
| committer | Mosder <git@mosder.eu> | 2026-10-13 14:48:48 +0200 |
| commit | 2b01cab2df7273dad7f95c4349929a28331338c2 (patch) | |
| tree | a3dd962dce355f5886644b16885cde59a260de40 /tests/safe_tests.c | |
| parent | 634f254d282f119de7eeef22325045bffb5b1cf1 (diff) | |
refactor: removed the use of mkstemp and replaced it with tmpfile + fileno -> have tp handle that somehow, maybe freopen or something?
Diffstat (limited to 'tests/safe_tests.c')
| -rw-r--r-- | tests/safe_tests.c | 11 |
1 files changed, 0 insertions, 11 deletions
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); } |
