Re: [PATCH] xfstests: Replace lstat64 with cat in test 120

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 22, 2012 at 02:49:06PM -0500, Rich Johnston wrote:
> The later versions of libtool (i.e.2.4+) create a wrapper (bash script) for
> lstat64 in the src directory.  The wrapper calls the real binary created by
> libtool (.libs/lstat64)

Doesn't happen here. libtool 2.4.2 generates a dynamically linked
executable.

$ libtool --version
libtool (GNU libtool) 2.4.2
Written by Gordon Matzigkeit <gord@xxxxxxxxxxxxxx>, 1996

Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ rm src/lstat64
$ make
Building include
Building lib
Building ltp
Building src
    [CC]    lstat64
Building aio-dio-regress
Building m4
$ file src/lstat64
src/lstat64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x7d7c9b54f75589968ca143cac23e1d3491ea3e17, not stripped
$ ldd src/lstat64
        linux-vdso.so.1 =>  (0x00007fffc4b72000)
	libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007f67f24b7000)
	libhandle.so.1 => /lib/libhandle.so.1 (0x00007f67f22b3000)
	libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007f67f20a9000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f67f1d22000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f67f26cf000)
$ ls -la src/.libs
total 8
drwxr-xr-x 2 dave dave 4096 Aug 23 09:45 .
drwxr-xr-x 4 dave dave 4096 Aug 23 09:54 ..
$

> Test 120 only copies src/lstat64 to $SCRATCH_MNT.  If a later version of
> libtool is used then only the wrapper is copied to $SCRATCH_MNT and the wrapper
> will fail to find .libs/lstat64.
> 
>    ~/xfstests # diff 120.out 120.out.bad
>    /mnt/scratch/lstat64: error: `/mnt/scratch/.libs/lstat64' does not exist
>    This script is just a wrapper for lstat64.
>    See the libtool documentation for more information.

$ sudo ./check -X expunged generic/120
FSTYP         -- xfs (debug)
PLATFORM      -- Linux/x86_64 test-2 3.0.39-dgc+
MKFS_OPTIONS  -- -f -bsize=4096 /dev/vdb
MOUNT_OPTIONS -- /dev/vdb /mnt/scratch

generic/120      15s
Ran: generic/120
Passed all 1 tests
$

This is how it is built here:

$ make Q=
.....
    [CC]    lstat64
/usr/bin/libtool --quiet --tag=CC --mode=link gcc lstat64.c -o lstat64 -g -O2 -g -O2 -DDEBUG  -I../include -DVERSION=\"1.1.0\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -DHAVE_FALLOCATE   -lattr -lhandle -lacl   ../lib/libtest.la

I think this error indicates somethign wrong with your build
environment or platform, not that there is anything wrong with the
test. What system are you building on?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux