|
|
|
|
@ -17,6 +17,7 @@
|
|
|
|
|
#include "../lib/u_async.h" |
|
|
|
|
#include "../lib/mem.h" |
|
|
|
|
#include "../lib/debug_config.h" |
|
|
|
|
#include "../lib/platform_compat.h" |
|
|
|
|
|
|
|
|
|
#include <openssl/evp.h> |
|
|
|
|
#include <sqlite3.h> |
|
|
|
|
@ -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
|
|
|
|
|
|