syscalls/ftest: CHUNK macro has a long int type value
PATCH 14/21 syscalls/ftest: CHUNK macro has a long int type value
Hi, please review the attached patch
Signature · 1 line
markos
From 5fcdab58fb80e2f0fdaead6f587bad74565d5e3e Mon Sep 17 00:00:00 2001
From: Markos Chandras <[email protected]>
Date: Thu, 22 Dec 2011 14:50:46 +0000
Subject: [PATCH 14/21] syscalls/ftest: CHUNK macro has a long int type value
--- testcases/kernel/fs/ftest/ftest05.c | 14 +++++++------- testcases/kernel/fs/ftest/ftest07.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-)
testcases/kernel/fs/ftest/ftest05.c +7 -7
@@ -334,12 +334,12 @@ static void dotest(int testers, int me, int fd)*/ if (lseek64 (fd,CHUNK (chunk),0 ) < (off64_t )0 ) {tst_brkm (TFAIL |TERRNO ,NULL , -"\tTest[%d]: lseek64(0) fail at %Lx" , +"\tTest[%d]: lseek64(0) fail at %lx" , me,CHUNK (chunk)); }if ((xfr =read (fd, buf, csize)) <0 ) {tst_brkm (TFAIL |TERRNO ,NULL , -"\tTest[%d]: read fail at %Lx" , +"\tTest[%d]: read fail at %lx" , me,CHUNK (chunk)); }/*
@@ -359,7 +359,7 @@ static void dotest(int testers, int me, int fd) }if (memcmp (buf, zero_buf, csize)) {tst_resm (TFAIL , -"\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x, should be %d." , +"\tTest[%d] bad verify @ 0x%lx for val %d count %d xfr %d file_max 0x%x, should be %d." , me,CHUNK (chunk), val, count, xfr, file_max, zero_buf[0 ]);tst_resm (TINFO ,"\tTest[%d]: last_trunc = 0x%x." , me, last_trunc);
@@ -381,7 +381,7 @@ static void dotest(int testers, int me, int fd) } ++collide;if (memcmp (buf, val_buf, csize)) { -tst_resm (TFAIL ,"\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x." , +tst_resm (TFAIL ,"\tTest[%d] bad verify @ 0x%lx for val %d count %d xfr %d file_max 0x%x." , me,CHUNK (chunk), val, count, xfr, file_max);tst_resm (TINFO ,"\tTest[%d]: last_trunc = 0x%x." , me, last_trunc);
@@ -399,7 +399,7 @@ static void dotest(int testers, int me, int fd)*/ if (lseek64 (fd, -((off64_t )xfr),1 ) < (off64_t )0 ) {tst_brkm (TFAIL |TERRNO ,NULL , -"\tTest[%d]: lseek64(1) fail at %Lx" , +"\tTest[%d]: lseek64(1) fail at %lx" , me,CHUNK (chunk)); }if ((xfr =write (fd, val_buf, csize)) < csize) {
@@ -408,7 +408,7 @@ static void dotest(int testers, int me, int fd)fsync (fd); }else {tst_resm (TFAIL |TERRNO , -"\tTest[%d]: write fail at %Lx xfr %d" , +"\tTest[%d]: write fail at %lx xfr %d" , me,CHUNK (chunk), xfr); }tst_exit ();
@@ -542,4 +542,4 @@ static void cleanup(void)tst_rmdir ();tst_exit (); -} +}
testcases/kernel/fs/ftest/ftest07.c +7 -7
@@ -399,12 +399,12 @@ static void dotest(int testers, int me, int fd)* Read it. */ if (lseek64 (fd,CHUNK (chunk),0 ) <0 ) { -tst_resm (TFAIL ,"\tTest[%d]: lseek64(0) fail at %Lx, errno = %d." , +tst_resm (TFAIL ,"\tTest[%d]: lseek64(0) fail at %lx, errno = %d." , me,CHUNK (chunk), errno);tst_exit (); }if ((xfr =readv (fd, &r_iovec[0 ],MAXIOVCNT )) <0 ) { -tst_resm (TFAIL ,"\tTest[%d]: readv fail at %Lx, errno = %d." , +tst_resm (TFAIL ,"\tTest[%d]: readv fail at %lx, errno = %d." , me,CHUNK (chunk), errno);tst_exit (); }
@@ -425,7 +425,7 @@ static void dotest(int testers, int me, int fd)for (i =0 ; i <MAXIOVCNT ; i++) {if (memcmp (r_iovec[i].iov_base, zero_iovec[i].iov_base, r_iovec[i].iov_len)) {tst_resm (TFAIL , -"\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x, should be 0." , +"\tTest[%d] bad verify @ 0x%lx for val %d count %d xfr %d file_max 0x%x, should be 0." , me,CHUNK (chunk), val, count, xfr, file_max);tst_resm (TINFO ,"\tTest[%d]: last_trunc = 0x%x." , me, last_trunc);
@@ -449,7 +449,7 @@ static void dotest(int testers, int me, int fd) ++collide;for (i =0 ; i <MAXIOVCNT ; i++) {if (memcmp (r_iovec[i].iov_base, val_iovec[i].iov_base, r_iovec[i].iov_len)) { -tst_resm (TFAIL ,"\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x." , +tst_resm (TFAIL ,"\tTest[%d] bad verify @ 0x%lx for val %d count %d xfr %d file_max 0x%x." , me,CHUNK (chunk), val, count, xfr, file_max);tst_resm (TINFO ,"\tTest[%d]: last_trunc = 0x%x." , me, last_trunc);
@@ -467,7 +467,7 @@ static void dotest(int testers, int me, int fd)* Writev it. */ if (lseek64 (fd, -((off64_t )xfr),1 ) <0 ) { -tst_resm (TFAIL ,"\tTest[%d]: lseek64(1) fail at %Lx, errno = %d." , +tst_resm (TFAIL ,"\tTest[%d]: lseek64(1) fail at %lx, errno = %d." , me,CHUNK (chunk), errno);tst_exit (); }
@@ -477,7 +477,7 @@ static void dotest(int testers, int me, int fd)fsync (fd);tst_exit (); } -tst_resm (TFAIL ,"\tTest[%d]: writev fail at %Lx xfr %d, errno = %d." , +tst_resm (TFAIL ,"\tTest[%d]: writev fail at %lx xfr %d, errno = %d." , me,CHUNK (chunk), xfr, errno);tst_exit (); }
@@ -599,4 +599,4 @@ static void term(int sig LTP_ATTRIBUTE_UNUSED)tst_resm (TINFO ,"Unlink of '%s' successful." , test_name);tst_exit (); -} +}
Signature · 1 line
1.7.1
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list