summaryrefslogtreecommitdiff
path: root/tests/pack
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2017-02-17 16:36:53 +0000
committerEdward Thomson <ethomson@github.com>2017-02-28 13:28:36 +0000
commit1229e1c4d7ea1eb4c5bcd5c0d89bc576053175db (patch)
treeeaa95a9af16669ea7497dc30091b220a54404d5d /tests/pack
parent5a747e0c6c5170d29969eb15822c36d76dd3e4ac (diff)
downloadlibgit2-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/pack')
-rw-r--r--tests/pack/packbuilder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/pack/packbuilder.c b/tests/pack/packbuilder.c
index 9afc178b3..77f61f79b 100644
--- a/tests/pack/packbuilder.c
+++ b/tests/pack/packbuilder.c
@@ -204,7 +204,7 @@ void test_pack_packbuilder__fsync_when_asked(void)
p_fsync__cnt = 0;
seed_packbuilder();
git_packbuilder_write(_packbuilder, ".", 0666, NULL, NULL);
- cl_assert_equal_sz(2, p_fsync__cnt);
+ cl_assert_equal_sz(4, p_fsync__cnt);
}
static int foreach_cb(void *buf, size_t len, void *payload)