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

* [LTP] [PATCH] syscalls/lseek11: take EOPNOTSUPP as not supported too
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2017-05-24 13:33 UTC (permalink / raw)
  To: ltp

On Wed, May 24, 2017 at 09:23:48PM +0800, Eryu Guan wrote:
> 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.

Wow, I didn't test on NFS-4.X when I wrote this case, thanks for
finding this.

Reviewed-by: Zorro Lang <zlang@redhat.com>

Thanks,
Zorro

> 
> 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	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] syscalls/lseek11: take EOPNOTSUPP as not supported too
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2017-05-26 13:45 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[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.