aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/fs/fusefs/fallocate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sys/fs/fusefs/fallocate.cc')
-rw-r--r--tests/sys/fs/fusefs/fallocate.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/sys/fs/fusefs/fallocate.cc b/tests/sys/fs/fusefs/fallocate.cc
index 4e5b047b78b7..1a3a0af36236 100644
--- a/tests/sys/fs/fusefs/fallocate.cc
+++ b/tests/sys/fs/fusefs/fallocate.cc
@@ -205,7 +205,7 @@ TEST_F(Fspacectl, enosys)
EXPECT_EQ(0, fspacectl(fd, SPACECTL_DEALLOC, &rqsr, 0, NULL));
/* Neither should posix_fallocate query the daemon */
- EXPECT_EQ(EINVAL, posix_fallocate(fd, off1, len1));
+ EXPECT_EQ(EOPNOTSUPP, posix_fallocate(fd, off1, len1));
leak(fd);
}
@@ -548,7 +548,7 @@ INSTANTIATE_TEST_SUITE_P(FspacectlCache, FspacectlCache,
/*
* If the server returns ENOSYS, it indicates that the server does not support
- * FUSE_FALLOCATE. This and future calls should return EINVAL.
+ * FUSE_FALLOCATE. This and future calls should return EOPNOTSUPP.
*/
TEST_F(PosixFallocate, enosys)
{
@@ -570,10 +570,10 @@ TEST_F(PosixFallocate, enosys)
fd = open(FULLPATH, O_RDWR);
ASSERT_LE(0, fd) << strerror(errno);
- EXPECT_EQ(EINVAL, posix_fallocate(fd, off0, len0));
+ EXPECT_EQ(EOPNOTSUPP, posix_fallocate(fd, off0, len0));
/* Subsequent calls shouldn't query the daemon*/
- EXPECT_EQ(EINVAL, posix_fallocate(fd, off0, len0));
+ EXPECT_EQ(EOPNOTSUPP, posix_fallocate(fd, off0, len0));
/* Neither should VOP_DEALLOCATE query the daemon */
EXPECT_EQ(0, fspacectl(fd, SPACECTL_DEALLOC, &rqsr, 0, NULL));
@@ -607,10 +607,10 @@ TEST_F(PosixFallocate, eopnotsupp)
fd = open(FULLPATH, O_RDWR);
ASSERT_LE(0, fd) << strerror(errno);
- EXPECT_EQ(EINVAL, posix_fallocate(fd, fsize, length));
+ EXPECT_EQ(EOPNOTSUPP, posix_fallocate(fd, fsize, length));
/* Subsequent calls should still query the daemon*/
- EXPECT_EQ(EINVAL, posix_fallocate(fd, offset, length));
+ EXPECT_EQ(EOPNOTSUPP, posix_fallocate(fd, offset, length));
/* And subsequent VOP_DEALLOCATE calls should also query the daemon */
rqsr.r_len = length;
@@ -759,7 +759,7 @@ TEST_F(PosixFallocate, rlimit_fsize)
}
/* With older servers, no FUSE_FALLOCATE should be attempted */
-TEST_F(PosixFallocate_7_18, einval)
+TEST_F(PosixFallocate_7_18, eopnotsupp)
{
const char FULLPATH[] = "mountpoint/some_file.txt";
const char RELPATH[] = "some_file.txt";
@@ -773,7 +773,7 @@ TEST_F(PosixFallocate_7_18, einval)
fd = open(FULLPATH, O_RDWR);
ASSERT_LE(0, fd) << strerror(errno);
- EXPECT_EQ(EINVAL, posix_fallocate(fd, offset, length));
+ EXPECT_EQ(EOPNOTSUPP, posix_fallocate(fd, offset, length));
leak(fd);
}