From: Vinay S. <vi...@li...> - 2008-12-15 12:27:37
|
Subrata, A while back I had submitted an LTP patch for the vmsplice01 test case (sent on 03/27/2008). However, the code I see in the vmsplice01.c file now is not what the patch contains. /* * check if the current filesystem is nfs */ if(tst_is_cwd_nfs()) { if (flag == 1) printf("vmsplice01 1 PASS : vmplice() passes\n"); else <========= (there is no "else" in my patch) tst_brkm(TCONF, cleanup, "Cannot do splice() on a file located on an NFS filesystem"); } Please consider the modification for the next LTP release. Thanks, Vinay Patch sent on 27th March 2008 : Signed-off-by : Vinay Sridhar <vin...@in...> ----------Patch------------ diff -Nuarp ltp-full-20080229_old/testcases/kernel/syscalls/vmsplice/vmsplice01.c ltp-full-20080229/testcases/kernel/syscalls/vmsplice/vmsplice01.c --- ltp-full-20080229_old/testcases/kernel/syscalls/vmsplice/vmsplice01.c 2008-02-29 13:25:44.000000000 +0530 +++ ltp-full-20080229/testcases/kernel/syscalls/vmsplice/vmsplice01.c 2008-04-02 14:14:14.000000000 +0530 @@ -159,7 +159,7 @@ static int vmsplice_test(void) 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 @@ static int vmsplice_test(void) 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) + tst_resm(TINFO, "vmplice() passes"); + 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 @@ static int vmsplice_test(void) close(pipes[0]); close(pipes[1]); return ret; - } + } //printf("offset = %lld\n", (long long)offset); } |