fcntl16: Skip fcntl16 tests on NFS
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/3 fcntl16: Skip fcntl16 tests on NFS
According to nfs(5), NLM supports advisory file locks only. So skip fcntl16 test if NFS.
--- testcases/kernel/syscalls/fcntl/fcntl16.c | 8 ++++++++ 1 file changed, 8 insertions(+)
testcases/kernel/syscalls/fcntl/fcntl16.c +8 -0
@@ -51,6 +51,8 @@#include <sys/types.h> #include <sys/wait.h> +#include "tst_fs_type.h" +#define SKIPVAL 0x0f00//#define SKIP SKIPVAL, 0, 0L, 0L, IGNORED #define SKIP 0,0,0L,0L,0
@@ -412,6 +414,12 @@ void setup(void)tst_tmpdir (); +/* On NFS or not */ +if (tst_fs_type (cleanup,"." ) ==TST_NFS_MAGIC ) { +tst_brkm (TCONF , cleanup,"Cannot test madatory locking " +"on a file located on an NFS filesystem" ); + } +/* set up temp filename */ sprintf (tmpname,"fcntl4.%d" , parent);
Signature · 11 lines
1.8.3.1 ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 4 lines · Xiong Zhou
According to nfs(5), NLM supports advisory file locks only. So skip fcntl16 test if NFS.
I've just took a fresh look at fcntl16.c and found that block1 of this test case may be executed on NFS. And, IMHO, this block1 test case is not 100% implemented by other fcntl*.c tests.
So I think that it will be more correct to have only block2, block3 skipped.
Sorry. I had to figure it out at the first time. :(
Thank you.
PS: And you pointed me one interesting issue.
The patch:
commit 5387ba03ce8eaddc7ec330ed03e579eed92596cc
Author: subrata_modak <subrata_modak> Date: Mon May 5 08:49:34 2008 +0000
These test cases fail on the NFS environment due to NFS relates
issue(s). Hence abondon these tests when NFS is detected. By, Sridhar Vinay <[email protected]>.
disabled entire tests and not particular test cases. And I think it's not quite correct, because some of the test cases may be executed on NFS.
For example, fcntl14.c has 4 test blocks, and only one of them doesn't work with NFS - block2 (mandatory locking).
Reviewing/fixing other fcntl*.c test cases looks like a useful activity. But for a later time :)
Quoted 22 lines
Signed-off-by Xiong Zhou <[email protected]>--- testcases/kernel/syscalls/fcntl/fcntl16.c | 8 ++++++++ 1 file changed, 8 insertions(+)testcases/kernel/syscalls/fcntl/fcntl16.c +2
-0@@ -51,6 +51,8 @@#include <sys/types.h> #include <sys/wait.h> +#include "tst_fs_type.h" +#define SKIPVAL 0x0f00//#define SKIP SKIPVAL, 0, 0L, 0L, IGNORED #define SKIP 0,0,0L,0L,0@@ -412,6 +414,12 @@ void setup(void)tst_tmpdir ();
testcases/kernel/syscalls/fcntl/fcntl16.c void setup(void) · line 425
Quoted 10 lines
testcases/kernel/syscalls/fcntl/fcntl16.c +6
-0+/* On NFS or not */ +if (tst_fs_type (cleanup,"." ) ==TST_NFS_MAGIC ) { +tst_brkm (TCONF , cleanup,"Cannot test madatory locking " +"on a file located on an NFS filesystem" ); + } +/* set up temp filename */ sprintf (tmpname,"fcntl4.%d" , parent);
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
----- Original Message -----
Quoted 13 lines
From: "Stanislav Kholmanskikh" <[email protected]>
To: "Xiong Zhou" <[email protected]>, [email protected]
Sent: Thursday, August 21, 2014 10:14:16 PM
Subject: Re: [LTP][PATCH v3 1/3] fcntl16: Skip fcntl16 tests on NFSHi!
Quoted 4 lines · Xiong Zhou
According to nfs(5), NLM supports advisory file locks only. So skip fcntl16 test if NFS.
Quoted 6 lines
I've just took a fresh look at
fcntl16.cand found that block1 of this test case may be executed on NFS. And, IMHO, this block1 test case is not 100% implemented by other fcntl*.c tests.So I think that it will be more correct to have only block2, block3 skipped.
Yes, You are right. I should take more care of this earlier. And I am the person who should be Sorry. :)
Quoted 16 lines
Sorry. I had to figure it out at the first time. :(
Thank you.
PS: And you pointed me one interesting issue.
The patch:
commit
5387ba03ce8eaddc7ec330ed03e579eed92596ccAuthor: subrata_modak <subrata_modak> Date: Mon May 5 08:49:34 2008 +0000These test cases fail on the NFS environment due to NFS relates
issue(s). Hence abondon these tests when NFS is detected. By, Sridhar Vinay <[email protected]>.
Quoted 8 lines
disabled entire tests and not particular test cases. And I think it's not quite correct, because some of the test cases may be executed on NFS.
For example,
fcntl14.chas 4 test blocks, and only one of them doesn't work with NFS - block2 (mandatory locking).Reviewing/fixing other fcntl*.c test cases looks like a useful activity. But for a later time :)
Thanks for pointing this out, I will take a look at this later.
Regards,
xzhou
Quoted 25 lines
Quoted 25 lines
Signed-off-by Xiong Zhou <[email protected]>--- testcases/kernel/syscalls/fcntl/fcntl16.c | 8 ++++++++ 1 file changed, 8 insertions(+)testcases/kernel/syscalls/fcntl/fcntl16.c +2
-0@@ -51,6 +51,8 @@#include <sys/types.h> #include <sys/wait.h> +#include "tst_fs_type.h" +#define SKIPVAL 0x0f00//#define SKIP SKIPVAL, 0, 0L, 0L, IGNORED #define SKIP 0,0,0L,0L,0@@ -412,6 +414,12 @@ void setup(void)tst_tmpdir ();
Quoted 11 lines
testcases/kernel/syscalls/fcntl/fcntl16.c void setup(void) · line 425
Quoted 10 lines
testcases/kernel/syscalls/fcntl/fcntl16.c +6
-0+/* On NFS or not */ +if (tst_fs_type (cleanup,"." ) ==TST_NFS_MAGIC ) { +tst_brkm (TCONF , cleanup,"Cannot test madatory locking " +"on a file located on an NFS filesystem" ); + } +/* set up temp filename */ sprintf (tmpname,"fcntl4.%d" , parent);
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list