syscalls/lseek11: take EOPNOTSUPP as not supported too
PATCH 1/1 syscalls/lseek11: take EOPNOTSUPP as not supported too
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 <[email protected]>
--- testcases/kernel/syscalls/lseek/lseek11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/lseek/lseek11.c +1 -1
@@ -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" ); }
Signature · 1 line
2.9.4
PATCH 1/1 syscalls/lseek11: take EOPNOTSUPP as not supported too
Quoted 3 lines · Eryu Guan
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 <[email protected]>
Thanks,
Zorro
Quoted 22 lines
Signed-off-by Eryu Guan <[email protected]>--- testcases/kernel/syscalls/lseek/lseek11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/kernel/syscalls/lseek/lseek11.c +1
-1@@ -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" ); }Signature · 1 line
2.9.4
PATCH 1/1 syscalls/lseek11: take EOPNOTSUPP as not supported too
In reply to Eryu GuanHi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]