On Thu, 2009-04-02 at 13:05 +0200, Francesco RUNDO wrote:
> Hi Cai,
>
> Thanks for the patch. As I said in my previous email, I thought the
> problem might be related to tlibio.[ch] files.
> About the usage of _UCLIBC_ define, it has to be used "only if" you
> build LTP for uclibc (to disable unsupported code for uclibc -AIO-). so
> that ok for me to add it under ifdef. UCLINUX.
>
> Now, for me your patch is ok.
Thanks for providing the fix and testing as well.
Regards--
Subrata
>
> Regards
> FR
>
>
>
> CAI Qian wrote:
>
> >Hi,
> >
> >This patch fixes gf07 and other gf* test failures reported earlier,
> >
> >gf01 FAIL 1
> >gf02 FAIL 1
> >gf03 PASS 0
> >gf04 PASS 0
> >gf05 FAIL 1
> >gf06 PASS 0
> >gf07 FAIL 1
> >gf08 PASS 0
> >gf09 FAIL 1
> >gf10 FAIL 1
> >gf11 FAIL 1
> >gf12 PASS 0
> >gf13 FAIL 1
> >gf14 PASS 0
> >gf15 FAIL 1
> >gf16 PASS 0
> >gf17 PASS 0
> >gf18 FAIL 1
> >gf19 FAIL 1
> >
> >The first problem is that the lastest patch against lib/Makefile always
> >exported some unnecessary symbols,
> >
> > CFLAGS+= -D_USC_LIB_ -D__UCLIBC__
> >
> >which broke the tlibio.c functionalities. For example,
> >
> >...
> > #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
> > else if ( method & LIO_IO_SYNCP ) {
> > io_type="pread(2)";
> >...
> >
> >All of those code above will never get executed for Linux PCs, even if
> >it has nothing to do with UCLIBC. As the results, tests failed due to
> >falling back to no suitable IO methods found,
> >
> > else {
> > printf("DEBUG %s/%d: No I/O method chosen\n", __FILE__, __LINE__ );
> > return -1;
> >
> >The second problem is that gf07 test case failed with the following
> >(with debug flags enabled for both tlibio.c and growfiles.c),
> >
> ># growfiles -W gf07 -b -e 1 -r 1-5000 -R 0--2 -i 0 -L 30 -C 1 -I p
> > g_rand13 g_rand13.2 -D 9
> >
> >...
> >growfiles: 12182 DEBUG3 growfiles.c/2038: lseeked to random offset 2052
> >(fsz:0)
> >growfiles: 12182 DEBUG3 growfiles.c/2080: attempting to write 4250 bytes
> >...
> >growfiles: 12182 DEBUG5 growfiles.c/2173: about to chop Woffset.
> >tmp=2052, grow_incr=4250, Woffset was 2052
> >growfiles: 12182 DEBUG2 growfiles.c/2197: 1 wrote 4250 bytes(off:0),
> >grew file by 4250 bytes
> >growfiles: 12182 DEBUG3 growfiles.c/2418: about to do write validation,
> >offset = 0, size = 4250
> >growfiles: 12182 DEBUG4 growfiles.c/2428: lseeked to offset:0
> >DEBUG tlibio.c/1337: aio_read(fildes=3, buf, nbytes=4250, signo=10)
> >...
> >growfiles(gf07): 12182 growfiles.c/2513: 1 CW data mismatch at offset 0,
> >exp:0101, act:0 in file g_rand13
> >...
> >
> >This is due to when doing write validation, it started from an incorrect
> >offset -- 0! The file was originally written from a random offset
> >2052. However, it looks like a known issue for async IO highlighted in
> >growfiles.c, which has already been manually worked around for SGI
> >platform.
> >
> >#if NEWIO
> >#ifdef sgi
> > /* If this is POSIX I/O and it is via aio_{read,write}
> > * or lio_listio then after completion of the I/O the
> > * value of the file offset for the file is
> > * unspecified--which means we cannot trust what
> > * tell() told us. Fudge it here.
> > */
> >
> >So, we probably need to do the same for __linux__.
> >
> >Signed-off-by: CAI Qian <[email protected]>
> >
> >--- ltp-full-20090228/lib/Makefile.orig 2009-04-02 15:33:19.000000000
> >+0800
> >+++ ltp-full-20090228/lib/Makefile 2009-04-02 15:39:21.000000000 +0800
> >@@ -2,12 +2,13 @@
> > PREFIX=/opt/ltp
> >
> > CFLAGS+= -Wall
> >-CFLAGS+= -D_USC_LIB_ -D__UCLIBC__
> > CPPFLAGS+= -I../include
> > ifeq ($(shell uname -s),HP-UX)
> > CFLAGS+=-Ae -D_LARGEFILE64_SOURCE +DA1.1
> > endif
> >-CFLAGS+=$(if $(UCLINUX),-DUCLINUX)
> >+ifeq ($(UCLINUX),1)
> >+CFLAGS+= -D_USC_LIB_ -D__UCLIBC__ -DUCLINUX
> >+endif
> > LDFLAGS+=
> > TARGET=libltp.a
> > SRCS=$(wildcard *.c)
> >--- ltp-full-20090228/testcases/kernel/fs/doio/growfiles.c.orig
> >2009-04-02 15:31:39.000000000 +0800
> >+++ ltp-full-20090228/testcases/kernel/fs/doio/growfiles.c 2009-04-02
> >15:32:53.000000000 +0800
> >@@ -2115,7 +2115,7 @@
> > return -1;
> > }
> > #if NEWIO
> >-#ifdef sgi
> >+#if defined(sgi) || defined(__linux__)
> > /* If this is POSIX I/O and it is via aio_{read,write}
> > * or lio_listio then after completion of the I/O the
> > * value of the file offset for the file is
> >@@ -2131,7 +2131,7 @@
> > tmp = Woffset + grow_incr;
> > }
> > }
> >-#endif
> >+#endif /* sgi __linux__ */
> > #endif
> > }
> > *curr_size_ptr=tmp; /* BUG:14136 */
> >
> >------------------------------------------------------------------------------
> >_______________________________________________
> >Ltp-list mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/ltp-list
> >
> >
> >
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list