From: <ro...@us...> - 2003-03-14 16:15:25
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/llseek In directory sc8-pr-cvs1:/tmp/cvs-serv16695/testcases/kernel/syscalls/llseek Modified Files: Makefile llseek01.c llseek02.c Log Message: Applied patch from Andreas Jaeger: <<<<<<<<<<<<<<<<<<< The llseek tests should test the lseek64 function instead of llseek since glibc exports the syscall llseek as lseek64. Here's a patch, Andreas >>>>>>>>>>>>>>>>>>>> Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/llseek/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 4 Mar 2003 16:16:06 -0000 1.4 +++ Makefile 14 Mar 2003 16:15:19 -0000 1.5 @@ -20,7 +20,7 @@ # name of file : Makefile # # description : make(1) description file for the send(2) tests. # ########################################################################### -CFLAGS+= -I../../../../include +CFLAGS+= -D_GNU_SOURCE -I../../../../include LOADLIBES+= -L../../../../lib -lltp SRCS=$(wildcard *.c) Index: llseek01.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/llseek/llseek01.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- llseek01.c 4 Sep 2002 16:34:14 -0000 1.3 +++ llseek01.c 14 Mar 2003 16:15:19 -0000 1.4 @@ -92,7 +92,6 @@ void setup(); /* Main setup function of test */ void cleanup(); /* cleanup function for the test */ -extern loff_t llseek(int fildes, loff_t offset, int origin); int main(int ac, char **av) @@ -120,7 +119,7 @@ /* * set file size limit, seek to a file using llseek. */ - TEST(llseek(fildes, (loff_t)(80 * BUFSIZ), SEEK_SET)); + TEST(lseek64(fildes, (loff_t)(80 * BUFSIZ), SEEK_SET)); /* check return code of lseek(2) */ if (TEST_ERRNO == (loff_t)-1) { @@ -153,7 +152,7 @@ } /* Seeking to end of last valid write */ - offset = llseek(fildes, (loff_t)BUFSIZ, SEEK_SET); + offset = lseek64(fildes, (loff_t)BUFSIZ, SEEK_SET); if (offset != (loff_t)BUFSIZ) { tst_brkm(TFAIL, cleanup, "llseek under file size limit"); Index: llseek02.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/llseek/llseek02.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- llseek02.c 27 Aug 2001 22:15:14 -0000 1.1 +++ llseek02.c 14 Mar 2003 16:15:19 -0000 1.2 @@ -19,6 +19,7 @@ /* * Test Name: llseek02 + * Note that glibc exports the llseek syscall as lseek64. * * Test Description: * Verify that, @@ -158,7 +159,7 @@ * Verify that it fails with -1 return value and * sets appropriate errno. */ - TEST(llseek(fildes, (loff_t)0, whence)); + TEST(lseek64(fildes, (loff_t)0, whence)); /* check return code of llseek(2) */ if (TEST_RETURN != (loff_t)-1) { |