Skip to contentSkip to conversation

splice01/tee01/utime: test back on NFS

PATCH In review Xiong Zhou 2 participants 5 messages Sep 11, 2014 – Sep 25, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Xiong Zhou

author
#1 lore raw

PATCH 3/3 splice01/tee01/utime: test back on NFS

NFS support splice(2) tee(2) and utime(2) now.

---
 testcases/kernel/syscalls/splice/splice01.c | 5 -----
 testcases/kernel/syscalls/tee/tee01.c       | 5 -----
 testcases/kernel/syscalls/utime/utime01.c   | 1 -
 testcases/kernel/syscalls/utime/utime02.c   | 1 -
 testcases/kernel/syscalls/utime/utime03.c   | 1 -
 5 files changed, 13 deletions(-)
testcases/kernel/syscalls/splice/splice01.c +0 -5
index e96ff6d..7bd53b8 100644
@@ -134,11 +134,6 @@ static void setup(void)
 
 	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do splice on a file on NFS filesystem");
-	}
-
 	for (i = 0; i < TEST_BLOCK_SIZE; i++)
 		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/tee/tee01.c +0 -5
index 6ea6f18..f87df5d 100644
@@ -146,11 +146,6 @@ static void setup(void)
 
 	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do tee on a file on NFS filesystem");
-	}
-
 	for (i = 0; i < TEST_BLOCK_SIZE; i++)
 		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/utime/utime01.c +0 -1
index 3128965..4c41bc7 100644
@@ -114,7 +114,6 @@ int main(int ac, char **av)
 	setup();
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime02.c +0 -1
index cbd30da..6624695 100644
@@ -120,7 +120,6 @@ int main(int ac, char **av)
 	setup();
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime03.c +0 -1
index 858f6ca..32b0d29 100644
@@ -130,7 +130,6 @@ int main(int ac, char **av)
 	setup();
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
Signature · 13 lines
1.8.3.1


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw

Hi!

Quoted 1 line · Xiong Zhou

NFS support splice(2) tee(2) and utime(2) now.

I think that 'now' is a bit relative. I.e. for me 'now' can be 2.6.39, but for another guy - 3.16.2 or whatever.

My proposal:
* if this support came many-many years ago, we just mark the fact in
the description
* if this support came recently, we have to add a kernel check in the
tests

Quoted 72 lines
---
  testcases/kernel/syscalls/splice/splice01.c | 5 -----
  testcases/kernel/syscalls/tee/tee01.c       | 5 -----
  testcases/kernel/syscalls/utime/utime01.c   | 1 -
  testcases/kernel/syscalls/utime/utime02.c   | 1 -
  testcases/kernel/syscalls/utime/utime03.c   | 1 -
  5 files changed, 13 deletions(-)
testcases/kernel/syscalls/splice/splice01.c +0 -5
index e96ff6d..7bd53b8 100644
@@ -134,11 +134,6 @@ static void setup(void)
 
  	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do splice on a file on NFS filesystem");
-	}
-
  	for (i = 0; i < TEST_BLOCK_SIZE; i++)
  		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/tee/tee01.c +0 -5
index 6ea6f18..f87df5d 100644
@@ -146,11 +146,6 @@ static void setup(void)
 
  	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do tee on a file on NFS filesystem");
-	}
-
  	for (i = 0; i < TEST_BLOCK_SIZE; i++)
  		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/utime/utime01.c +0 -1
index 3128965..4c41bc7 100644
@@ -114,7 +114,6 @@ int main(int ac, char **av)
  	setup();
 
  	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
  	case TST_V9FS_MAGIC:
  		tst_brkm(TCONF, cleanup,
  			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime02.c +0 -1
index cbd30da..6624695 100644
@@ -120,7 +120,6 @@ int main(int ac, char **av)
  	setup();
 
  	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
  	case TST_V9FS_MAGIC:
  		tst_brkm(TCONF, cleanup,
  			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime03.c +0 -0
index 858f6ca..32b0d29 100644

testcases/kernel/syscalls/utime/utime03.c int main(int ac, char **av) · line 135

Quoted 7 lines
testcases/kernel/syscalls/utime/utime03.c +0 -1
@@ -130,7 +130,6 @@ int main(int ac, char **av)
  	setup();
 
  	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
  	case TST_V9FS_MAGIC:
  		tst_brkm(TCONF, cleanup,
  			 "Cannot do utime on a file on %s filesystem",

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#3 lore raw

PATCH v2 3/3 splice01/tee01/utime: test back on NFS

Tests splice01 tee01 and utime01/02/03 pass on NFS since 2.6.32 at least.

---
 testcases/kernel/syscalls/splice/splice01.c | 5 -----
 testcases/kernel/syscalls/tee/tee01.c       | 5 -----
 testcases/kernel/syscalls/utime/utime01.c   | 1 -
 testcases/kernel/syscalls/utime/utime02.c   | 1 -
 testcases/kernel/syscalls/utime/utime03.c   | 1 -
 5 files changed, 13 deletions(-)
testcases/kernel/syscalls/splice/splice01.c +0 -5
index e96ff6d..7bd53b8 100644
@@ -134,11 +134,6 @@ static void setup(void)
 
 	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do splice on a file on NFS filesystem");
-	}
-
 	for (i = 0; i < TEST_BLOCK_SIZE; i++)
 		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/tee/tee01.c +0 -5
index 6ea6f18..f87df5d 100644
@@ -146,11 +146,6 @@ static void setup(void)
 
 	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do tee on a file on NFS filesystem");
-	}
-
 	for (i = 0; i < TEST_BLOCK_SIZE; i++)
 		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/utime/utime01.c +0 -1
index 3128965..4c41bc7 100644
@@ -114,7 +114,6 @@ int main(int ac, char **av)
 	setup();
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime02.c +0 -1
index cbd30da..6624695 100644
@@ -120,7 +120,6 @@ int main(int ac, char **av)
 	setup();
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime03.c +0 -1
index 858f6ca..32b0d29 100644
@@ -130,7 +130,6 @@ int main(int ac, char **av)
 	setup();
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
Signature · 10 lines
1.8.3.1


------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#4 lore raw

Hi!

Quoted 2 lines · Xiong Zhou

Tests splice01 tee01 and utime01/02/03 pass on NFS since 2.6.32 at least.

Could you add a kernel version check to the patch, please?

I'm sure there are distributions which still use older kernels.

For example, with 2.6.18-371.3.1.0.1.el5 and:
splice01 - fails
tee01 - fails
utime01/utime02/utime03 - pass

Thanks.

Quoted 72 lines
---
  testcases/kernel/syscalls/splice/splice01.c | 5 -----
  testcases/kernel/syscalls/tee/tee01.c       | 5 -----
  testcases/kernel/syscalls/utime/utime01.c   | 1 -
  testcases/kernel/syscalls/utime/utime02.c   | 1 -
  testcases/kernel/syscalls/utime/utime03.c   | 1 -
  5 files changed, 13 deletions(-)
testcases/kernel/syscalls/splice/splice01.c +0 -5
index e96ff6d..7bd53b8 100644
@@ -134,11 +134,6 @@ static void setup(void)
 
  	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do splice on a file on NFS filesystem");
-	}
-
  	for (i = 0; i < TEST_BLOCK_SIZE; i++)
  		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/tee/tee01.c +0 -5
index 6ea6f18..f87df5d 100644
@@ -146,11 +146,6 @@ static void setup(void)
 
  	tst_tmpdir();
 
-	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do tee on a file on NFS filesystem");
-	}
-
  	for (i = 0; i < TEST_BLOCK_SIZE; i++)
  		buffer[i] = i & 0xff;
 
testcases/kernel/syscalls/utime/utime01.c +0 -1
index 3128965..4c41bc7 100644
@@ -114,7 +114,6 @@ int main(int ac, char **av)
  	setup();
 
  	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
  	case TST_V9FS_MAGIC:
  		tst_brkm(TCONF, cleanup,
  			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime02.c +0 -1
index cbd30da..6624695 100644
@@ -120,7 +120,6 @@ int main(int ac, char **av)
  	setup();
 
  	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
  	case TST_V9FS_MAGIC:
  		tst_brkm(TCONF, cleanup,
  			 "Cannot do utime on a file on %s filesystem",
testcases/kernel/syscalls/utime/utime03.c +0 -0
index 858f6ca..32b0d29 100644

testcases/kernel/syscalls/utime/utime03.c int main(int ac, char **av) · line 135

Quoted 7 lines
testcases/kernel/syscalls/utime/utime03.c +0 -1
@@ -130,7 +130,6 @@ int main(int ac, char **av)
  	setup();
 
  	switch ((type = tst_fs_type(cleanup, "."))) {
-	case TST_NFS_MAGIC:
  	case TST_V9FS_MAGIC:
  		tst_brkm(TCONF, cleanup,
  			 "Cannot do utime on a file on %s filesystem",

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#5 lore raw

PATCH v3 3/3 splice01/tee01/utime: add kernel version check for NFS test

In reply to Xiong Zhou

Tests splice01 tee01 pass on NFS since 2.6.32 at least, and utime01/02/03 pass since 2.6.18 at least.

---
 testcases/kernel/syscalls/splice/splice01.c | 5 +++--
 testcases/kernel/syscalls/tee/tee01.c       | 5 +++--
 testcases/kernel/syscalls/utime/utime01.c   | 7 ++++++-
 testcases/kernel/syscalls/utime/utime02.c   | 7 ++++++-
 testcases/kernel/syscalls/utime/utime03.c   | 7 ++++++-
 5 files changed, 24 insertions(+), 7 deletions(-)
testcases/kernel/syscalls/splice/splice01.c +3 -2
index e96ff6d..8896638 100644
@@ -135,8 +135,9 @@ static void setup(void)
 	tst_tmpdir();
 
 	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do splice on a file on NFS filesystem");
+		if  (tst_kvercmp(2, 6, 32) < 0)
+			tst_brkm(TCONF, cleanup, "Cannot do splice on a file"
+				" on NFS filesystem before 2.6.32");
 	}
 
 	for (i = 0; i < TEST_BLOCK_SIZE; i++)
testcases/kernel/syscalls/tee/tee01.c +3 -2
index 6ea6f18..3ba0804 100644
@@ -147,8 +147,9 @@ static void setup(void)
 	tst_tmpdir();
 
 	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
-		tst_brkm(TCONF, cleanup,
-			 "Cannot do tee on a file on NFS filesystem");
+		if ((tst_kvercmp(2, 6, 32)) < 0)
+			tst_brkm(TCONF, cleanup, "Cannot do tee on a file"
+				" on NFS filesystem before 2.6.32");
 	}
 
 	for (i = 0; i < TEST_BLOCK_SIZE; i++)
testcases/kernel/syscalls/utime/utime01.c +6 -1
index 3128965..0e0165d 100644
@@ -115,11 +115,16 @@ int main(int ac, char **av)
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
 	case TST_NFS_MAGIC:
+		if (tst_kvercmp(2, 6, 18) < 0)
+			tst_brkm(TCONF, cleanup, "Cannot do utime on a file"
+				" on %s filesystem before 2.6.18",
+				 tst_fs_type_name(type));
+		break;
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
 			 tst_fs_type_name(type));
-	break;
+		break;
 	}
 
 	/* set the expected errnos... */
testcases/kernel/syscalls/utime/utime02.c +6 -1
index cbd30da..aeaf6d6 100644
@@ -121,11 +121,16 @@ int main(int ac, char **av)
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
 	case TST_NFS_MAGIC:
+		if (tst_kvercmp(2, 6, 18) < 0)
+			tst_brkm(TCONF, cleanup, "Cannot do utime on a file"
+				" on %s filesystem before 2.6.18",
+				 tst_fs_type_name(type));
+		break;
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
 			 tst_fs_type_name(type));
-	break;
+		break;
 	}
 
 	/* set the expected errnos... */
testcases/kernel/syscalls/utime/utime03.c +6 -1
index 858f6ca..da1bf78 100644
@@ -131,11 +131,16 @@ int main(int ac, char **av)
 
 	switch ((type = tst_fs_type(cleanup, "."))) {
 	case TST_NFS_MAGIC:
+		if (tst_kvercmp(2, 6, 18) < 0)
+			tst_brkm(TCONF, cleanup, "Cannot do utime on a file"
+				" on %s filesystem before 2.6.18",
+				 tst_fs_type_name(type));
+		break;
 	case TST_V9FS_MAGIC:
 		tst_brkm(TCONF, cleanup,
 			 "Cannot do utime on a file on %s filesystem",
 			 tst_fs_type_name(type));
-	break;
+		break;
 	}
 
 	/* set the expected errnos... */
Signature · 13 lines
1.8.3.1


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list