]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Fix file_create_locked() unit test to delete temp file afterwards
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 28 Jun 2017 20:37:22 +0000 (23:37 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 3 Jul 2017 12:18:09 +0000 (15:18 +0300)
Also removed a path string that was never used.

src/lib/test-file-create-locked.c

index 6cd5f88fe42f58a2f6f0b6c4937725785d0dce29..88d35d9626bfe8a1b468b8bd00183c203f2b011d 100644 (file)
@@ -83,6 +83,7 @@ static void test_file_create_locked_basic(void)
                break;
        }
        i_unlink_if_exists(".test-temp-file-create-locked-child");
+       i_unlink_if_exists(path);
        test_end();
 }
 
@@ -92,7 +93,7 @@ static void test_file_create_locked_mkdir(void)
                .lock_timeout_secs = 0,
                .lock_method = FILE_LOCK_METHOD_FCNTL,
        };
-       const char *path = ".test-file-create-locked";
+       const char *path;
        struct file_lock *lock;
        const char *error, *dir;
        bool created;