diff --git a/samples/flushfs/flush_fs_test.go b/samples/flushfs/flush_fs_test.go index 9161b6c..e4e30eb 100644 --- a/samples/flushfs/flush_fs_test.go +++ b/samples/flushfs/flush_fs_test.go @@ -791,5 +791,15 @@ func (t *FsyncErrorTest) Fsync() { } func (t *FsyncErrorTest) Fdatasync() { - AssertTrue(false, "TODO") + var err error + + // Open the file. + t.f1, err = os.OpenFile(path.Join(t.Dir, "foo"), os.O_RDWR, 0) + AssertEq(nil, err) + + // Fdatasync. + err = syscall.Fdatasync(int(t.f1.Fd())) + + AssertNe(nil, err) + ExpectThat(err, Error(HasSubstr("no such file"))) }