From: sonic zhang <[email protected]> Subject: [LTP] [Patch] fadvise cases should check TEST_ERRNO instead of TEST_RETURN. Date: Tue, 10 Feb 2009 12:13:38 +0800
> fadvise cases should check TEST_ERRNO instead of TEST_RETURN. > > Signed-off-by: Sonic Zhang <[email protected]> > --- > testcases/kernel/syscalls/fadvise/posix_fadvise01.c > > > > Index: testcases/kernel/syscalls/fadvise/posix_fadvise01.c > =================================================================== > --- testcases/kernel/syscalls/fadvise/posix_fadvise01.c (revision 150) > +++ testcases/kernel/syscalls/fadvise/posix_fadvise01.c (working copy) > @@ -118,14 +118,14 @@ > > /* Man page says: > "On error, an error number is returned." */ > - if (TEST_RETURN == expected_return) { > + if (TEST_ERRNO == expected_return) { > tst_resm(TPASS, "call succeeded expectedly"); > } else { > tst_resm(TFAIL, > "unexpected return value - %d : %s, > advise %d - " > "expected %d", > - TEST_RETURN, > - strerror(TEST_RETURN), > + TEST_ERRNO, > + strerror(TEST_ERRNO), > defined_advise[i], > expected_return); > } > Index: testcases/kernel/syscalls/fadvise/posix_fadvise02.c > =================================================================== > --- testcases/kernel/syscalls/fadvise/posix_fadvise02.c (revision 150) > +++ testcases/kernel/syscalls/fadvise/posix_fadvise02.c (working copy) > @@ -125,14 +125,14 @@ > > /* Man page says: > "On error, an error number is returned." */ > - if (TEST_RETURN == TC[i].error) { > + if (TEST_ERRNO == TC[i].error) { > tst_resm(TPASS, "expected failure - " > - "returned value = %d : %s", > TEST_RETURN, > - strerror(TEST_RETURN)); > + "returned value = %d : %s", TEST_ERRNO, > + strerror(TEST_ERRNO)); > } else { > tst_resm(TFAIL, "unexpected returnd value - %d > : %s - " > - "expected %d", TEST_RETURN, > - strerror(TEST_RETURN), TC[i].error); > + "expected %d", TEST_ERRNO, > + strerror(TEST_ERRNO), TC[i].error); > } > } > } /* End for TEST_LOOPING */ > Index: testcases/kernel/syscalls/fadvise/posix_fadvise03.c > =================================================================== > --- testcases/kernel/syscalls/fadvise/posix_fadvise03.c (revision 150) > +++ testcases/kernel/syscalls/fadvise/posix_fadvise03.c (working copy) > @@ -150,19 +150,19 @@ > > /* Man page says: > "On error, an error number is returned." */ > - if (TEST_RETURN == expected_error) { > + if (TEST_ERRNO == expected_error) { > tst_resm(TPASS, > "expected failure - " > "returned value = %d, advise = %d : > %s", > - TEST_RETURN, > + TEST_ERRNO, > advise, > - strerror(TEST_RETURN)); > + strerror(TEST_ERRNO)); > } else { > tst_resm(TFAIL, > "unexpected return value - %d : %s, > advise %d - " > "expected %d", > - TEST_RETURN, > - strerror(TEST_RETURN), > + TEST_ERRNO, > + strerror(TEST_ERRNO), > advise, > expected_error); > } > Index: testcases/kernel/syscalls/fadvise/posix_fadvise04.c > =================================================================== > --- testcases/kernel/syscalls/fadvise/posix_fadvise04.c (revision 150) > +++ testcases/kernel/syscalls/fadvise/posix_fadvise04.c (working copy) > @@ -131,14 +131,14 @@ > > /* Man page says: > "On error, an error number is returned." */ > - if (TEST_RETURN == TC[i].error) { > + if (TEST_ERRNO == TC[i].error) { > tst_resm(TPASS, "expected failure - " > - "returned value = %d : %s", > TEST_RETURN, > - strerror(TEST_RETURN)); > + "returned value = %d : %s", TEST_ERRNO, > + strerror(TEST_ERRNO)); > } else { > tst_resm(TFAIL, "unexpected return value - %d : > %s - " > - "expected %d", TEST_RETURN, > - strerror(TEST_RETURN), TC[i].error); > + "expected %d", TEST_ERRNO, > + strerror(TEST_ERRNO), TC[i].error); > } > } > } /* End for TEST_LOOPING */ > Acked-by: CAI Qian <[email protected]> > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Ltp-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ltp-list ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
