All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiong Zhou <xzhou@redhat.com>
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>,
	ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH v3 3/3] splice01/tee01/utime: add kernel version check for NFS test
Date: Thu, 25 Sep 2014 03:24:19 -0400 (EDT)	[thread overview]
Message-ID: <385992509.36875157.1411629859497.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1793864039.34479334.1411109349130.JavaMail.zimbra@redhat.com>


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

Signed-off-by: Xiong Zhou <xzhou@redhat.com>
---
 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(-)

diff --git a/testcases/kernel/syscalls/splice/splice01.c b/testcases/kernel/syscalls/splice/splice01.c
index e96ff6d..8896638 100644
--- a/testcases/kernel/syscalls/splice/splice01.c
+++ b/testcases/kernel/syscalls/splice/splice01.c
@@ -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++)
diff --git a/testcases/kernel/syscalls/tee/tee01.c b/testcases/kernel/syscalls/tee/tee01.c
index 6ea6f18..3ba0804 100644
--- a/testcases/kernel/syscalls/tee/tee01.c
+++ b/testcases/kernel/syscalls/tee/tee01.c
@@ -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++)
diff --git a/testcases/kernel/syscalls/utime/utime01.c b/testcases/kernel/syscalls/utime/utime01.c
index 3128965..0e0165d 100644
--- a/testcases/kernel/syscalls/utime/utime01.c
+++ b/testcases/kernel/syscalls/utime/utime01.c
@@ -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... */
diff --git a/testcases/kernel/syscalls/utime/utime02.c b/testcases/kernel/syscalls/utime/utime02.c
index cbd30da..aeaf6d6 100644
--- a/testcases/kernel/syscalls/utime/utime02.c
+++ b/testcases/kernel/syscalls/utime/utime02.c
@@ -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... */
diff --git a/testcases/kernel/syscalls/utime/utime03.c b/testcases/kernel/syscalls/utime/utime03.c
index 858f6ca..da1bf78 100644
--- a/testcases/kernel/syscalls/utime/utime03.c
+++ b/testcases/kernel/syscalls/utime/utime03.c
@@ -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... */
-- 
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2014-09-25  7:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <509126638.31210140.1410431519664.JavaMail.zimbra@redhat.com>
2014-09-11 10:32 ` [LTP] [PATCH 3/3] splice01/tee01/utime: test back on NFS Xiong Zhou
2014-09-11 14:48   ` Stanislav Kholmanskikh
2014-09-19  6:49     ` [LTP] [PATCH v2 " Xiong Zhou
2014-09-23 11:52       ` Stanislav Kholmanskikh
2014-09-25  7:24       ` Xiong Zhou [this message]

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=385992509.36875157.1411629859497.JavaMail.zimbra@redhat.com \
    --to=xzhou@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=stanislav.kholmanskikh@oracle.com \
    /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.