1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

fusefs: reenable some fsyncdir tests

These tests were actually fixed by r345398, r345390 and r345392, but I
neglected to reenable them.  Too bad googletest doesn't have the notion of
an Expected Failure like ATF does.

PR:		236474, 236473
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Alan Somers 2019-04-05 15:04:25 +00:00
parent 8095eecb3d
commit 46c37cd0d7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=345949
2 changed files with 14 additions and 13 deletions

View File

@ -56,6 +56,11 @@ void expect_fsync(uint64_t ino, uint32_t flags, int error)
ResultOf([=](auto in) {
return (in->header.opcode == FUSE_FSYNC &&
in->header.nodeid == ino &&
/*
* TODO: reenable pid check after fixing
* bug 236379
*/
//(pid_t)in->header.pid == getpid() &&
in->body.fsync.fh == FH &&
in->body.fsync.fsync_flags == flags);
}, Eq(true)),
@ -76,7 +81,7 @@ void expect_write(uint64_t ino, uint64_t size, const void *contents)
};
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236379 */
TEST_F(Fsync, DISABLED_aio_fsync)
TEST_F(Fsync, aio_fsync)
{
const char FULLPATH[] = "mountpoint/some_file.txt";
const char RELPATH[] = "some_file.txt";

View File

@ -56,6 +56,10 @@ void expect_fsyncdir(uint64_t ino, uint32_t flags, int error)
ResultOf([=](auto in) {
return (in->header.opcode == FUSE_FSYNCDIR &&
in->header.nodeid == ino &&
/*
* TODO: reenable pid check after fixing
* bug 236379
*/
//(pid_t)in->header.pid == getpid() &&
in->body.fsyncdir.fh == FH &&
in->body.fsyncdir.fsync_flags == flags);
@ -72,9 +76,7 @@ void expect_lookup(const char *relpath, uint64_t ino)
};
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236379 */
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236473 */
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236474 */
TEST_F(FsyncDir, DISABLED_aio_fsync)
TEST_F(FsyncDir, aio_fsync)
{
const char FULLPATH[] = "mountpoint/some_file.txt";
const char RELPATH[] = "some_file.txt";
@ -98,9 +100,7 @@ TEST_F(FsyncDir, DISABLED_aio_fsync)
/* Deliberately leak fd. close(2) will be tested in release.cc */
}
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236473 */
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236474 */
TEST_F(FsyncDir, DISABLED_eio)
TEST_F(FsyncDir, eio)
{
const char FULLPATH[] = "mountpoint/some_dir";
const char RELPATH[] = "some_dir";
@ -124,7 +124,6 @@ TEST_F(FsyncDir, DISABLED_eio)
* subsequent calls to VOP_FSYNC will succeed automatically without being sent
* to the filesystem daemon
*/
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236474 */
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236557 */
TEST_F(FsyncDir, DISABLED_enosys)
{
@ -147,8 +146,7 @@ TEST_F(FsyncDir, DISABLED_enosys)
/* Deliberately leak fd. close(2) will be tested in release.cc */
}
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236474 */
TEST_F(FsyncDir, DISABLED_fsyncdata)
TEST_F(FsyncDir, fsyncdata)
{
const char FULLPATH[] = "mountpoint/some_dir";
const char RELPATH[] = "some_dir";
@ -170,9 +168,7 @@ TEST_F(FsyncDir, DISABLED_fsyncdata)
* Unlike regular files, the kernel doesn't know whether a directory is or
* isn't dirty, so fuse(4) should always send FUSE_FSYNCDIR on fsync(2)
*/
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236473 */
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236474 */
TEST_F(FsyncDir, DISABLED_fsync)
TEST_F(FsyncDir, fsync)
{
const char FULLPATH[] = "mountpoint/some_dir";
const char RELPATH[] = "some_dir";