* xfstests: Replace lstat64 with cat in test 120
@ 2012-08-22 18:54 Rich Johnston
2012-08-22 20:59 ` Alex Elder
0 siblings, 1 reply; 9+ messages in thread
From: Rich Johnston @ 2012-08-22 18:54 UTC (permalink / raw)
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)
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.
This patch copies /usr/bin/cat (which is readily availible on unix systems) to
$SCRATCH_MNT instead of src/lstat64.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
---
120 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: b/120
===================================================================
--- a/120
+++ b/120
@@ -68,12 +68,12 @@ fi
#executable file
echo "*** copying file ***"
-cp src/lstat64 $SCRATCH_MNT
-src/lstat64 $SCRATCH_MNT/lstat64 >$tmp.out
+cp /bin/cat $SCRATCH_MNT
+src/lstat64 $SCRATCH_MNT/cat >$tmp.out
sleep 5
echo "*** executing file ***"
-$SCRATCH_MNT/lstat64 $SCRATCH_MNT/lstat64 >/dev/null
-_compare_access_times $SCRATCH_MNT/lstat64 "executing file"
+$SCRATCH_MNT/cat $SCRATCH_MNT/cat >/dev/null
+_compare_access_times $SCRATCH_MNT/cat "executing file"
#reading file
echo "*** creating file ***"
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* xfstests: Replace lstat64 with cat in test 120
[not found] <20120822190605.279843301@sgi.com>
2012-08-22 19:06 ` xfstests: Replace lstat64 with cat in test 120 rjohnston
@ 2012-08-22 19:06 ` rjohnston
2012-08-22 19:49 ` [PATCH] " Rich Johnston
2 siblings, 0 replies; 9+ messages in thread
From: rjohnston @ 2012-08-22 19:06 UTC (permalink / raw)
To: xfs
[-- Attachment #1: replace_lstat64_with_cat.patch --]
[-- Type: text/plain, Size: 1565 bytes --]
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)
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.
This patch copies /usr/bin/cat (which is readily availible on unix systems) to
$SCRATCH_MNT instead of src/lstat64.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
---
120 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: b/120
===================================================================
--- a/120
+++ b/120
@@ -68,12 +68,12 @@ fi
#executable file
echo "*** copying file ***"
-cp src/lstat64 $SCRATCH_MNT
-src/lstat64 $SCRATCH_MNT/lstat64 >$tmp.out
+cp /bin/cat $SCRATCH_MNT
+src/lstat64 $SCRATCH_MNT/cat >$tmp.out
sleep 5
echo "*** executing file ***"
-$SCRATCH_MNT/lstat64 $SCRATCH_MNT/lstat64 >/dev/null
-_compare_access_times $SCRATCH_MNT/lstat64 "executing file"
+$SCRATCH_MNT/cat $SCRATCH_MNT/cat >/dev/null
+_compare_access_times $SCRATCH_MNT/cat "executing file"
#reading file
echo "*** creating file ***"
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* xfstests: Replace lstat64 with cat in test 120
[not found] <20120822190605.279843301@sgi.com>
@ 2012-08-22 19:06 ` rjohnston
2012-08-22 19:06 ` rjohnston
2012-08-22 19:49 ` [PATCH] " Rich Johnston
2 siblings, 0 replies; 9+ messages in thread
From: rjohnston @ 2012-08-22 19:06 UTC (permalink / raw)
To: xfs
[-- Attachment #1: replace_lstat64_with_cat.patch --]
[-- Type: text/plain, Size: 1565 bytes --]
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)
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.
This patch copies /usr/bin/cat (which is readily availible on unix systems) to
$SCRATCH_MNT instead of src/lstat64.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
---
120 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: b/120
===================================================================
--- a/120
+++ b/120
@@ -68,12 +68,12 @@ fi
#executable file
echo "*** copying file ***"
-cp src/lstat64 $SCRATCH_MNT
-src/lstat64 $SCRATCH_MNT/lstat64 >$tmp.out
+cp /bin/cat $SCRATCH_MNT
+src/lstat64 $SCRATCH_MNT/cat >$tmp.out
sleep 5
echo "*** executing file ***"
-$SCRATCH_MNT/lstat64 $SCRATCH_MNT/lstat64 >/dev/null
-_compare_access_times $SCRATCH_MNT/lstat64 "executing file"
+$SCRATCH_MNT/cat $SCRATCH_MNT/cat >/dev/null
+_compare_access_times $SCRATCH_MNT/cat "executing file"
#reading file
echo "*** creating file ***"
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] xfstests: Replace lstat64 with cat in test 120
[not found] <20120822190605.279843301@sgi.com>
2012-08-22 19:06 ` xfstests: Replace lstat64 with cat in test 120 rjohnston
2012-08-22 19:06 ` rjohnston
@ 2012-08-22 19:49 ` Rich Johnston
2012-08-23 0:02 ` Dave Chinner
2 siblings, 1 reply; 9+ messages in thread
From: Rich Johnston @ 2012-08-22 19:49 UTC (permalink / raw)
To: xfs
[-- Attachment #1: replace_lstat64_with_cat.patch --]
[-- Type: text/plain, Size: 1565 bytes --]
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)
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.
This patch copies /usr/bin/cat (which is readily availible on unix systems) to
$SCRATCH_MNT instead of src/lstat64.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
---
120 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: b/120
===================================================================
--- a/120
+++ b/120
@@ -68,12 +68,12 @@ fi
#executable file
echo "*** copying file ***"
-cp src/lstat64 $SCRATCH_MNT
-src/lstat64 $SCRATCH_MNT/lstat64 >$tmp.out
+cp /bin/cat $SCRATCH_MNT
+src/lstat64 $SCRATCH_MNT/cat >$tmp.out
sleep 5
echo "*** executing file ***"
-$SCRATCH_MNT/lstat64 $SCRATCH_MNT/lstat64 >/dev/null
-_compare_access_times $SCRATCH_MNT/lstat64 "executing file"
+$SCRATCH_MNT/cat $SCRATCH_MNT/cat >/dev/null
+_compare_access_times $SCRATCH_MNT/cat "executing file"
#reading file
echo "*** creating file ***"
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: xfstests: Replace lstat64 with cat in test 120
2012-08-22 18:54 Rich Johnston
@ 2012-08-22 20:59 ` Alex Elder
2012-08-23 16:12 ` Rich Johnston
0 siblings, 1 reply; 9+ messages in thread
From: Alex Elder @ 2012-08-22 20:59 UTC (permalink / raw)
To: xfs
On 08/22/2012 01:54 PM, 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)
>
> 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.
>
> This patch copies /usr/bin/cat (which is readily availible on unix systems) to
> $SCRATCH_MNT instead of src/lstat64.
I was going to suggest you use /bin/cat instead, but it appears
the actual patch does.
Please update your description. Otherwise, looks good to me.
Reviewed-by: Alex Elder <elder@inktank.com>
>
> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
>
> ---
> 120 | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> Index: b/120
> ===================================================================
> --- a/120
> +++ b/120
> @@ -68,12 +68,12 @@ fi
>
> #executable file
> echo "*** copying file ***"
> -cp src/lstat64 $SCRATCH_MNT
> -src/lstat64 $SCRATCH_MNT/lstat64 >$tmp.out
> +cp /bin/cat $SCRATCH_MNT
> +src/lstat64 $SCRATCH_MNT/cat >$tmp.out
> sleep 5
> echo "*** executing file ***"
> -$SCRATCH_MNT/lstat64 $SCRATCH_MNT/lstat64 >/dev/null
> -_compare_access_times $SCRATCH_MNT/lstat64 "executing file"
> +$SCRATCH_MNT/cat $SCRATCH_MNT/cat >/dev/null
> +_compare_access_times $SCRATCH_MNT/cat "executing file"
>
> #reading file
> echo "*** creating file ***"
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfstests: Replace lstat64 with cat in test 120
2012-08-22 19:49 ` [PATCH] " Rich Johnston
@ 2012-08-23 0:02 ` Dave Chinner
2012-08-23 15:38 ` Rich Johnston
0 siblings, 1 reply; 9+ messages in thread
From: Dave Chinner @ 2012-08-23 0:02 UTC (permalink / raw)
To: Rich Johnston; +Cc: xfs
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@gnu.ai.mit.edu>, 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@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfstests: Replace lstat64 with cat in test 120
2012-08-23 0:02 ` Dave Chinner
@ 2012-08-23 15:38 ` Rich Johnston
2012-08-23 22:28 ` Dave Chinner
0 siblings, 1 reply; 9+ messages in thread
From: Rich Johnston @ 2012-08-23 15:38 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On 08/22/2012 07:02 PM, Dave Chinner wrote:
> 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.
>
OK I agree I made an incorrect assumption that it would happen with
later versions of libtool. It does happen with libtool 2.4 on openSUSE
12.1 and could with other Linux distributions. No special modifications
were made to the build environment. I will correct the comment to
reflect my exact error.
> $ libtool --version
> libtool (GNU libtool) 2.4.2
> Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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
$ file src/lstat64
src/lstat64: POSIX shell script, ASCII text
$ file src/.libs/lstat64
src/.libs/lstat64: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16,
BuildID[sha1]=0xbaba36df9ff7ec91866d295866147dc5fcba7f23, 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)
$ ldd src/.libs/lstat64
linux-gate.so.1 => (0xffffe000)
libattr.so.1 => /lib/libattr.so.1 (0xb77b8000)
libhandle.so.1 => /lib/libhandle.so.1 (0xb77b3000)
libacl.so.1 => /lib/libacl.so.1 (0xb77a9000)
libc.so.6 => /lib/libc.so.6 (0xb763d000)
/lib/ld-linux.so.2 (0xb77cb000)
> $ 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 ..
> $
$ ls -la src/.libs
total 1280
drwxr-xr-x 2 root root 4096 Aug 23 10:08 .
drwxr-xr-x 4 root root 4096 Aug 23 10:08 ..
-rwxr-xr-x 1 root root 24946 Aug 21 14:16 alloc
-rwxr-xr-x 1 root root 11801 Aug 21 14:16 append_reader
-rwxr-xr-x 1 root root 11960 Aug 21 14:16 append_writer
-rwxr-xr-x 1 root root 21376 Aug 21 14:16 bstat
-rwxr-xr-x 1 root root 20898 Aug 21 14:16 bulkstat_unlink_test
-rwxr-xr-x 1 root root 20521 Aug 21 14:16 bulkstat_unlink_test_modified
-rwxr-xr-x 1 root root 17668 Aug 21 14:16 devzero
-rwxr-xr-x 1 root root 20841 Aug 21 14:16 dirperf
-rwxr-xr-x 1 root root 27682 Aug 21 14:14 dirstress
-rwxr-xr-x 1 root root 20413 Aug 21 14:16 dmiperf
-rwxr-xr-x 1 root root 12714 Aug 21 14:16 fault
-rwxr-xr-x 1 root root 21188 Aug 21 14:16 feature
-rwxr-xr-x 1 root root 40220 Aug 21 14:16 fiemap-tester
-rwxr-xr-x 1 root root 12438 Aug 21 14:14 fill
-rwxr-xr-x 1 root root 20906 Aug 21 14:14 fill2
-rwxr-xr-x 1 root root 13656 Aug 21 14:16 fs_perms
-rwxr-xr-x 1 root root 24251 Aug 21 14:16 fstest
-rwxr-xr-x 1 root root 19137 Aug 21 14:16 fstrim
-rwxr-xr-x 1 root root 12038 Aug 21 14:16 ftrunc
-rwxr-xr-x 1 root root 18841 Aug 21 14:16 genhashnames
-rwxr-xr-x 1 root root 11955 Aug 21 14:16 getdevicesize
-rwxr-xr-x 1 root root 11311 Aug 21 14:14 getpagesize
-rwxr-xr-x 1 root root 13791 Aug 21 14:16 godown
-rwxr-xr-x 1 root root 18942 Aug 21 14:14 holes
-rwxr-xr-x 1 root root 12124 Aug 21 14:16 itrash
-rwxr-xr-x 1 root root 45189 Aug 21 14:16 locktest
-rwxr-xr-x 1 root root 18693 Aug 21 14:16 looptest
-rwxr-xr-x 1 root root 18328 Aug 23 10:08 lstat64
-rwxr-xr-x 1 root root 22628 Aug 21 14:16 makeextents
-rwxr-xr-x 1 root root 31482 Aug 21 14:16 metaperf
-rwxr-xr-x 1 root root 12651 Aug 21 14:16 mmapcat
-rwxr-xr-x 1 root root 17648 Aug 21 14:16 multi_open_unlink
-rwxr-xr-x 1 root root 29583 Aug 21 14:15 nametest
-rwxr-xr-x 1 root root 19834 Aug 21 14:15 permname
-rwxr-xr-x 1 root root 12107 Aug 21 14:16 preallo_rw_pattern_reader
-rwxr-xr-x 1 root root 12395 Aug 21 14:16 preallo_rw_pattern_wrhead
src/lstat64
#! /bin/sh
# lstat64 - temporary wrapper script for .libs/lstat64
# Generated by libtool (GNU libtool) 2.4
#
# The lstat64 program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
iter
-rwxr-xr-x 1 root root 12206 Aug 21 14:16 pwrite_mmap_blocked
-rwxr-xr-x 1 root root 35609 Aug 21 14:15 randholes
-rwxr-xr-x 1 root root 11425 Aug 21 14:16 rename
-rwxr-xr-x 1 root root 18977 Aug 21 14:16 resvtest
-rwxr-xr-x 1 root root 17openSUSE 12.1544 Aug 21 14:15 runas
-rwxr-xr-x 1 root root 20415 Aug 21 14:16 seek_copy_test
-rwxr-xr-x 1 root root 38136 Aug 21 14:16 seek_sanity_test
-rwxr-xr-x 1 root root 13713 Aug 21 14:16 stale_handle
-rwxr-xr-x 1 root root 13100 Aug 21 14:16 t_access_root
-rwxr-xr-x 1 root root 12099 Aug 21 14:16 t_dir_offset
-rwxr-xr-x 1 root root 12858 Aug 21 14:16 t_dir_offset2
-rwxr-xr-x 1 root root 11096 Aug 21 14:16 testx
-rwxr-xr-x 1 root root 12631 Aug 21 14:16 t_futimens
-rwxr-xr-x 1 root root 11685 Aug 21 14:16 t_holes
-rwxr-xr-x 1 root root 81838 Aug 21 14:16 t_immutable
-rwxr-xr-x 1 root root 12105 Aug 21 14:16 t_mmap_writev
-rwxr-xr-x 1 root root 21924 Aug 21 14:16 t_mtab
-rwxr-xr-x 1 root root 17474 Aug 21 14:16 trunc
-rwxr-xr-x 1 root root 19694 Aug 21 14:16 truncfile
-rwxr-xr-x 1 root root 12034 Aug 21 14:16 t_stripealign
-rwxr-xr-x 1 root root 12510 Aug 21 14:16 unwritten_mmap
-rwxr-xr-x 1 root root 18964 Aug 21 14:16 unwritten_sync
-rwxr-xr-x 1 root root 12282 Aug 21 14:16 usemem
-rwxr-xr-x 1 root root 11873 Aug 21 14:16 writemod
-rwxr-xr-x 1 root root 21055 Aug 21 14:16 xfsctl
head src/lstat64
#! /bin/sh
# lstat64 - temporary wrapper script for .libs/lstat64
# Generated by libtool (GNU libtool) 2.4
#
# The lstat64 program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
>
>> 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.
I will correct this comment too.
>>
>> ~/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
>
[CC] lstat64
libtool: link: gcc lstat64.c -o .libs/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
/root/xfstests/../xfsprogs/libhandle/.libs/libhandle.so -lacl
../lib/.libs/libtest.a
> I think this error indicates somethign wrong with your build
> environment or platform, not that there is anything wrong with the
> test.
Don't agree, the build environment was not modified from the default
installation and the script was created by libtool.
$ head src/lstat64
#! /bin/sh
# lstat64 - temporary wrapper script for .libs/lstat64
# Generated by libtool (GNU libtool) 2.4
#
# The lstat64 program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
Why take the risk of this error when /bin/cat is a perfectly acceptable
substitution and would prevent the possibility of this happening.
What system are you building on?
openSUSE 12.1
>
> Cheers,
>
> Dave.
>
Regards
--Rich
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: xfstests: Replace lstat64 with cat in test 120
2012-08-22 20:59 ` Alex Elder
@ 2012-08-23 16:12 ` Rich Johnston
0 siblings, 0 replies; 9+ messages in thread
From: Rich Johnston @ 2012-08-23 16:12 UTC (permalink / raw)
To: Alex Elder; +Cc: xfs
On 08/22/2012 03:59 PM, Alex Elder wrote:
> On 08/22/2012 01:54 PM, 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)
>>
>> 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.
>>
>> This patch copies /usr/bin/cat (which is readily availible on unix systems) to
>> $SCRATCH_MNT instead of src/lstat64.
>
> I was going to suggest you use /bin/cat instead, but it appears
> the actual patch does.
>
> Please update your description. Otherwise, looks good to me.
Thanks for the review Alex. Good catch, yes I will correct it when I
commit this patch along with a few Description corrections pointed out
by Dave C.
--Rich
>
> Reviewed-by: Alex Elder <elder@inktank.com>
>
>>
>> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
>>
>> ---
>> 120 | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> Index: b/120
>> ===================================================================
>> --- a/120
>> +++ b/120
>> @@ -68,12 +68,12 @@ fi
>>
>> #executable file
>> echo "*** copying file ***"
>> -cp src/lstat64 $SCRATCH_MNT
>> -src/lstat64 $SCRATCH_MNT/lstat64 >$tmp.out
>> +cp /bin/cat $SCRATCH_MNT
>> +src/lstat64 $SCRATCH_MNT/cat >$tmp.out
>> sleep 5
>> echo "*** executing file ***"
>> -$SCRATCH_MNT/lstat64 $SCRATCH_MNT/lstat64 >/dev/null
>> -_compare_access_times $SCRATCH_MNT/lstat64 "executing file"
>> +$SCRATCH_MNT/cat $SCRATCH_MNT/cat >/dev/null
>> +_compare_access_times $SCRATCH_MNT/cat "executing file"
>>
>> #reading file
>> echo "*** creating file ***"
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfstests: Replace lstat64 with cat in test 120
2012-08-23 15:38 ` Rich Johnston
@ 2012-08-23 22:28 ` Dave Chinner
0 siblings, 0 replies; 9+ messages in thread
From: Dave Chinner @ 2012-08-23 22:28 UTC (permalink / raw)
To: Rich Johnston; +Cc: xfs
On Thu, Aug 23, 2012 at 10:38:16AM -0500, Rich Johnston wrote:
> On 08/22/2012 07:02 PM, Dave Chinner wrote:
> >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.
> >
>
> OK I agree I made an incorrect assumption that it would happen with
> later versions of libtool. It does happen with libtool 2.4 on
> openSUSE 12.1 and could with other Linux distributions. No special
> modifications were made to the build environment. I will correct
> the comment to reflect my exact error.
Ok, so what we need to do now is understand why the build
environment is creating two different styles of binaries from
apparently the same configure script and libtool versions.
Changing the test without understanding the cause is not the correct
way to address the problem.
> # lstat64 - temporary wrapper script for .libs/lstat64
> # Generated by libtool (GNU libtool) 2.4
> #
> # The lstat64 program cannot be directly executed until all the libtool
> # libraries that it depends on are installed.
There's your problem. You haven't properly installed all the
libraries that are needed for xfstests to build dynamically
linked binaries. What libraries are not installed? Did you run make
install on your xfsprogs/xfsdump builds?
> >I think this error indicates somethign wrong with your build
> >environment or platform, not that there is anything wrong with the
> >test.
>
> Don't agree, the build environment was not modified from the default
> installation and the script was created by libtool.
Perhaps the default installation doesn't install everything that is
needed. If libtool is telling you that you haven't installed all the
necessary libraries, then your environment is deficient in some
way...
> Why take the risk of this error when /bin/cat is a perfectly
> acceptable substitution and would prevent the possibility of this
> happening.
What risk? It's a test environment, and there's an implicit
assumption that it's been set up correctly and that autoconf detects
that everything has been installed correctly before letting the
build continue. It's great to know when someone is testing in a
non-standard environment, or the build has screwed up in some way.
IOWs, the fact that your build is different to everyone else is
something we need to understand, not slap a band-aid over and
ignore.
That is, the first thing to do is root cause analysis. i.e. find out
why your build is different. Once the root cause is known we can
decide on the best way to address the problem. Indeed, it may be
that autoconf is not detecting something correctly or vice versa,
and that's the reason for the weird build result and the eventual
test failure.
So, what libraries are not installed where they can be dynamically
linked that libtool is dependent on, how is configure finding them
(does it even have tests to check those libraries are installed?),
did it pick them out of some default library path outside of a
system directory, etc....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-08-23 22:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20120822190605.279843301@sgi.com>
2012-08-22 19:06 ` xfstests: Replace lstat64 with cat in test 120 rjohnston
2012-08-22 19:06 ` rjohnston
2012-08-22 19:49 ` [PATCH] " Rich Johnston
2012-08-23 0:02 ` Dave Chinner
2012-08-23 15:38 ` Rich Johnston
2012-08-23 22:28 ` Dave Chinner
2012-08-22 18:54 Rich Johnston
2012-08-22 20:59 ` Alex Elder
2012-08-23 16:12 ` Rich Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox