All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/lseek11: take EOPNOTSUPP as not supported too
Date: Wed, 24 May 2017 21:23:48 +0800	[thread overview]
Message-ID: <20170524132348.8564-1-eguan@redhat.com> (raw)

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


             reply	other threads:[~2017-05-24 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 13:23 Eryu Guan [this message]
2017-05-24 13:33 ` [LTP] [PATCH] syscalls/lseek11: take EOPNOTSUPP as not supported too Zorro Lang
2017-05-26 13:45 ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170524132348.8564-1-eguan@redhat.com \
    --to=eguan@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.