diff options
author | Edward Thomson <ethomson@github.com> | 2017-02-17 16:36:53 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2017-02-28 13:28:36 +0000 |
commit | 1229e1c4d7ea1eb4c5bcd5c0d89bc576053175db (patch) | |
tree | eaa95a9af16669ea7497dc30091b220a54404d5d /tests/refs | |
parent | 5a747e0c6c5170d29969eb15822c36d76dd3e4ac (diff) | |
download | libgit2-1229e1c4d7ea1eb4c5bcd5c0d89bc576053175db.tar.gz |
fsync parent directories when fsyncing
When fsync'ing files, fsync the parent directory in the case where we
rename a file into place, or create a new file, to ensure that the
directory entry is flushed correctly.
Diffstat (limited to 'tests/refs')
-rw-r--r-- | tests/refs/create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/refs/create.c b/tests/refs/create.c index 5c46fb3c2..e9630e853 100644 --- a/tests/refs/create.c +++ b/tests/refs/create.c @@ -329,7 +329,7 @@ void test_refs_create__fsyncs_when_requested(void) git_oid_fromstr(&id, current_master_tip); cl_git_pass(git_reference_create(&ref, g_repo, "refs/heads/fsync_test", &id, 0, "log message")); git_reference_free(ref); - cl_assert_equal_i(2, p_fsync__cnt); + cl_assert_equal_i(4, p_fsync__cnt); p_fsync__cnt = 0; @@ -337,5 +337,5 @@ void test_refs_create__fsyncs_when_requested(void) cl_git_pass(git_refdb_compress(refdb)); git_refdb_free(refdb); - cl_assert_equal_i(1, p_fsync__cnt); + cl_assert_equal_i(2, p_fsync__cnt); } |