diff --git a/tests/test_media_async.c b/tests/test_media_async.c index 9251c9b4..057b0c87 100644 --- a/tests/test_media_async.c +++ b/tests/test_media_async.c @@ -5,6 +5,7 @@ // Проверяется корректность каждого результата и отсутствие заклиниваний. #include "../src/media_async/media_async.h" +#include "../lib/platform_compat.h" #include #include #include @@ -143,7 +144,7 @@ int main(void) { int ret = 0; snprintf(g_test_dir, sizeof(g_test_dir), "/tmp/test_media_async_%d", (int)getpid()); - if (mkdir(g_test_dir, 0755) != 0) { + if (utun_mkdir(g_test_dir, 0755) != 0) { perror("mkdir"); return 1; } diff --git a/tests/test_media_index.c b/tests/test_media_index.c index 2dd24214..34cf85dd 100644 --- a/tests/test_media_index.c +++ b/tests/test_media_index.c @@ -17,6 +17,7 @@ #include "../lib/u_async.h" #include "../lib/mem.h" #include "../lib/debug_config.h" +#include "../lib/platform_compat.h" #include #include @@ -418,14 +419,14 @@ static int test_register_async_flow(void) { TEST("register_async: copy file + verify DB"); char tempd[256]; snprintf(tempd, sizeof(tempd), "/tmp/test_media_idx_%d", (int)getpid()); - mkdir(tempd, 0755); + utun_mkdir(tempd, 0755); char src[512]; snprintf(src, sizeof(src), "%s/src.bin", tempd); char dst[512]; snprintf(dst, sizeof(dst), "%s/media/ch_test/dst.bin", tempd); { char t1[512], t2[512]; - snprintf(t1, sizeof(t1), "%s/media", tempd); mkdir(t1, 0755); - snprintf(t2, sizeof(t2), "%s/media/ch_test", tempd); mkdir(t2, 0755); + snprintf(t1, sizeof(t1), "%s/media", tempd); utun_mkdir(t1, 0755); + snprintf(t2, sizeof(t2), "%s/media/ch_test", tempd); utun_mkdir(t2, 0755); } create_file(src, 400); // 400 bytes → 4 chunks of 100