public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] mremap06: fallocate is not supported on nfsv3
@ 2024-04-01 15:00 Samasth Norway Ananda
  2024-04-05 12:01 ` Cyril Hrubis
  0 siblings, 1 reply; 11+ messages in thread
From: Samasth Norway Ananda @ 2024-04-01 15:00 UTC (permalink / raw)
  To: ltp; +Cc: calum.mackay

The function fallocate() is not supported on nfsv3. Thus when we run the
mremap06 test over a nfsv3 filesystem the test fails.

Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
---
 testcases/kernel/syscalls/mremap/mremap06.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/mremap/mremap06.c b/testcases/kernel/syscalls/mremap/mremap06.c
index 3bbaf441a..362b03e19 100644
--- a/testcases/kernel/syscalls/mremap/mremap06.c
+++ b/testcases/kernel/syscalls/mremap/mremap06.c
@@ -104,8 +104,14 @@ static void setup(void)
 	fd = SAFE_OPEN("testfile", O_CREAT | O_RDWR | O_TRUNC, 0600);
 
 	ret = fallocate(fd, 0, 0, mmap_size);
-	if (ret == -1)
+	if (ret != 0) {
+		if (errno == EOPNOTSUPP || errno == ENOSYS) {
+			tst_brk(TCONF,
+				"fallocate system call is not implemented");
+		}
 		tst_brk(TBROK, "fallocate() failed");
+		return;
+	}
 
 	buf = SAFE_MMAP(0, mmap_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
 
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [LTP] [PATCH] mremap06: fallocate is not supported on nfsv3
@ 2024-03-26 20:56 Samasth Norway Ananda
  0 siblings, 0 replies; 11+ messages in thread
From: Samasth Norway Ananda @ 2024-03-26 20:56 UTC (permalink / raw)
  To: ltp; +Cc: calum.mackay

The function fallocate() is not supported on nfsv3. Thus when we run the
mremap06 test over a nfsv3 filesystem the test fails.

Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
---
 testcases/kernel/syscalls/mremap/mremap06.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/mremap/mremap06.c b/testcases/kernel/syscalls/mremap/mremap06.c
index 3bbaf441a..362b03e19 100644
--- a/testcases/kernel/syscalls/mremap/mremap06.c
+++ b/testcases/kernel/syscalls/mremap/mremap06.c
@@ -104,8 +104,14 @@ static void setup(void)
 	fd = SAFE_OPEN("testfile", O_CREAT | O_RDWR | O_TRUNC, 0600);
 
 	ret = fallocate(fd, 0, 0, mmap_size);
-	if (ret == -1)
+	if (ret != 0) {
+		if (errno == EOPNOTSUPP || errno == ENOSYS) {
+			tst_brk(TCONF,
+				"fallocate system call is not implemented");
+		}
 		tst_brk(TBROK, "fallocate() failed");
+		return;
+	}
 
 	buf = SAFE_MMAP(0, mmap_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
 
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-11  5:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-01 15:00 [LTP] [PATCH] mremap06: fallocate is not supported on nfsv3 Samasth Norway Ananda
2024-04-05 12:01 ` Cyril Hrubis
2024-04-08 21:50   ` Samasth via ltp
2024-04-09 10:17     ` Petr Vorel
2024-04-10  9:30       ` Cyril Hrubis
2024-04-10  9:46         ` Petr Vorel
2024-04-10  9:53           ` Petr Vorel
2024-04-10 10:08           ` Cyril Hrubis
2024-04-10 13:33             ` Petr Vorel
2024-04-11  5:58               ` Samasth via ltp
  -- strict thread matches above, loose matches on Subject: below --
2024-03-26 20:56 Samasth Norway Ananda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox