The vmsplice01 testcase in LTP failed when run over machines with NFS mount. However after I examined the test case I found that the testcase performs vmsplice() and splice() system calls and it was only splice() that caused the failure. After discussing with Subrata, we had decided that the fact that vmsplice() succeeds must be displayed before checking if the testcase is running over NFS and exiting. Hence I have prepared a patch with the above details taken care of. Signed-off-by : Vinay Sridhar <vinaysridhar@in.ibm.com>
diff --git a/testcases/kernel/syscalls/vmsplice/vmsplice01.c b/testcases/kernel/syscalls/vmsplice/vmsplice01.c
index 8355b39..b95a055 100644
--- a/testcases/kernel/syscalls/vmsplice/vmsplice01.c
+++ b/testcases/kernel/syscalls/vmsplice/vmsplice01.c
@@ -159,7 +159,7 @@
 	char vmsplicebuffer[SPLICE_TEST_BLOCK_SIZE];
 	int pipes[2];
 	long written;
-	int i, ret;
+	int i, ret, flag = 0;
 	int fd_out;
 	struct iovec v;
 	struct pollfd pfd;
@@ -211,8 +211,19 @@
 		else {
 			v.iov_base += written;
 			v.iov_len -= written;
+			flag  = 1;
 		}
 
+		/*
+                * check if the current filesystem is nfs
+                */
+                if(tst_is_cwd_nfs()) {
+				if (flag == 1)
+					printf("vmsplice01    1  PASS  :  vmplice() passes\n");
+                                tst_brkm(TCONF, cleanup, "Cannot do splice() on a file located on an NFS filesystem");
+                }
+
+
 		ret = mysplice(pipes[0], NULL, fd_out, &offset, written, 0);
 		if (ret < 0) {
 			ret = -errno;
@@ -220,7 +231,7 @@
 			close(pipes[0]);
 			close(pipes[1]);
 			return ret;
-		}
+		} 
 		//printf("offset = %lld\n", (long long)offset);
 
 	}