From 4e583583cd6de8d1fa8cce0fcc238d9c2ab03a52 Mon Sep 17 00:00:00 2001 From: Robb Kistler Date: Tue, 15 Mar 2016 11:27:46 -0700 Subject: [PATCH] Test for writing after an lseek past end of file This is a test to demonstrate Issue #375 --- test/integration-test-main.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/integration-test-main.sh b/test/integration-test-main.sh index 6d13e7d..4cfdc27 100755 --- a/test/integration-test-main.sh +++ b/test/integration-test-main.sh @@ -367,6 +367,13 @@ function test_rm_rf_dir { fi } +function test_write_after_seek_ahead { + describe "Test writes succeed after a seek ahead" + dd if=/dev/zero of=testfile seek=1 count=1 bs=1024 + rm testfile +} + + function add_all_tests { add_tests test_append_file add_tests test_truncate_file @@ -387,6 +394,7 @@ function add_all_tests { add_tests test_symlink add_tests test_extended_attributes add_tests test_rm_rf_dir + add_tests test_write_after_seek_ahead } init_suite