summaryrefslogtreecommitdiffstats
path: root/test/test_filesystem.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-11-12 17:54:24 -0500
committerDavid Robillard <d@drobilla.net>2022-11-16 10:22:55 -0500
commit42439bc6e35eef7c3cc905c60b5924c200b49ec8 (patch)
tree8a924183525ea0197ce26dbc68ab7564ef72b1d9 /test/test_filesystem.c
parenta2d40769d25c9495edce67be67be0ac36491ce80 (diff)
downloadlilv-42439bc6e35eef7c3cc905c60b5924c200b49ec8.tar.gz
lilv-42439bc6e35eef7c3cc905c60b5924c200b49ec8.tar.bz2
lilv-42439bc6e35eef7c3cc905c60b5924c200b49ec8.zip
Use zix_file_lock()
Diffstat (limited to 'test/test_filesystem.c')
-rw-r--r--test/test_filesystem.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/test/test_filesystem.c b/test/test_filesystem.c
index 021d66f..75db963 100644
--- a/test/test_filesystem.c
+++ b/test/test_filesystem.c
@@ -155,27 +155,6 @@ test_is_directory(void)
free(temp_dir);
}
-static void
-test_flock(void)
-{
- char* const temp_dir = lilv_create_temporary_directory("lilvXXXXXX");
- char* const file_path = zix_path_join(NULL, temp_dir, "lilv_test_file");
-
- FILE* const f1 = fopen(file_path, "w");
- FILE* const f2 = fopen(file_path, "w");
-
- assert(!lilv_flock(f1, true, false));
- assert(lilv_flock(f2, true, false));
- assert(!lilv_flock(f1, false, false));
-
- fclose(f2);
- fclose(f1);
- assert(!zix_remove(file_path));
- assert(!zix_remove(temp_dir));
- free(file_path);
- free(temp_dir);
-}
-
typedef struct {
size_t n_names;
char** names;
@@ -238,7 +217,6 @@ main(void)
test_path_parent();
test_path_filename();
test_is_directory();
- test_flock();
test_dir_for_each();
return 0;