All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/lseek11: take EOPNOTSUPP as not supported too
@ 2017-05-24 13:23 Eryu Guan
  2017-05-24 13:33 ` Zorro Lang
  2017-05-26 13:45 ` Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Eryu Guan @ 2017-05-24 13:23 UTC (permalink / raw)
  To: ltp

Filesystems could set errno to EOPNOTSUPP to indicate SEEK_DATA/HOLE
operations are not supported by this fs, e.g. NFSv4.0/v4.1, so exit
test with TCONF when EOPNOTSUPP is returned.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 testcases/kernel/syscalls/lseek/lseek11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/lseek/lseek11.c b/testcases/kernel/syscalls/lseek/lseek11.c
index 47987c1..54d5da6 100644
--- a/testcases/kernel/syscalls/lseek/lseek11.c
+++ b/testcases/kernel/syscalls/lseek/lseek11.c
@@ -119,7 +119,7 @@ static void get_blocksize(void)
 		SAFE_FSYNC(fd);
 		pos = lseek(fd, 0, SEEK_DATA);
 		if (pos == -1) {
-			if (errno == EINVAL) {
+			if (errno == EINVAL || errno == EOPNOTSUPP) {
 				tst_brk(TCONF | TERRNO, "SEEK_DATA "
 					"and SEEK_HOLE not implemented");
 			}
-- 
2.9.4


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

end of thread, other threads:[~2017-05-26 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 13:23 [LTP] [PATCH] syscalls/lseek11: take EOPNOTSUPP as not supported too Eryu Guan
2017-05-24 13:33 ` Zorro Lang
2017-05-26 13:45 ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.