Fix spurious testsuite failures on AIX due on NFS mounts due to

shared library images that cannot be removed without `slibclean'
which needs superuser privileges.

* tests/testsuite.at (PREPARE_TESTS): Define $mkdir_p globally.
(LT_AT_MVDIR): New macro to emulate `mv dir dest'.
* tests/destdir.at: Use LT_AT_MVDIR.
* tests/shlibpath.at: Likewise.
* tests/static.at: Likewise.
This commit is contained in:
Ralf Wildenhues 2007-02-12 22:29:05 +00:00
parent d09625f73a
commit 206427dd26
5 changed files with 42 additions and 15 deletions

View File

@ -1,3 +1,15 @@
2007-02-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix spurious testsuite failures on AIX due on NFS mounts due to
shared library images that cannot be removed without `slibclean'
which needs superuser privileges.
* tests/testsuite.at (PREPARE_TESTS): Define $mkdir_p globally.
(LT_AT_MVDIR): New macro to emulate `mv dir dest'.
* tests/destdir.at: Use LT_AT_MVDIR.
* tests/shlibpath.at: Likewise.
* tests/static.at: Likewise.
2007-02-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/export.at: Exporting is not fully functional with

View File

@ -33,7 +33,6 @@ else
fi
libdir=$prefix/lib
bindir=$prefix/bin
: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
$mkdir_p src $prefix $DESTDIR $DESTDIR$prefix
eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='`
])
@ -57,8 +56,8 @@ AT_CHECK([$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la],
AT_CHECK([$LIBTOOL --mode=install cp m $DESTDIR$bindir/m],
[], [ignore], [ignore])
$LIBTOOL --mode=clean rm -f liba.la m
mv $DESTDIR$libdir $libdir
mv $DESTDIR$bindir $bindir
LT_AT_MVDIR(["$DESTDIR$libdir"], ["$libdir"])
LT_AT_MVDIR(["$DESTDIR$bindir"], ["$bindir"])
# We ignore failure on purpose here: we may not be root.
AT_CHECK([$LIBTOOL --mode=finish $libdir], [ignore], [ignore], [ignore])
LT_AT_EXEC_CHECK([$bindir/m])
@ -96,9 +95,9 @@ AT_CHECK([$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la],
AT_CHECK([$LIBTOOL --mode=install cp m $DESTDIR$bindir/m],
[], [ignore], [ignore])
$LIBTOOL --mode=clean rm -f liba1dep.la liba2dep.la liba.la m
mv $DESTDIR$libdir $libdir
mv $DESTDIR${libdir}2 ${libdir}2
mv $DESTDIR$bindir $bindir
LT_AT_MVDIR(["$DESTDIR$libdir"], ["$libdir"])
LT_AT_MVDIR(["$DESTDIR${libdir}2"], ["${libdir}2"])
LT_AT_MVDIR(["$DESTDIR$bindir"], ["$bindir"])
# We ignore failure on purpose here: we may not be root.
AT_CHECK([$LIBTOOL --mode=finish $libdir ${libdir}2], [ignore], [ignore], [ignore])

View File

@ -35,7 +35,7 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT -Lsub/lib -la
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2 m.$OBJEXT -Lsub/lib -la],
[], [ignore], [ignore])
mv sub moved
LT_AT_MVDIR([sub], [moved])
mkdir sub sub/lib sub/bin
echo 'int wrong_lib () { return 0; }' > a.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c

View File

@ -100,18 +100,18 @@ mkdir $srcdir_broken $libdir_broken
func_move_libs ()
{
mv ${1} ${1}-moved
mv ${2} ${2}-moved
mv $srcdir_broken ${1}
mv $libdir_broken ${2}
LT_AT_MVDIR(["${1}"], ["${1}-moved"])
LT_AT_MVDIR(["${2}"], ["${2}-moved"])
LT_AT_MVDIR(["$srcdir_broken"], ["${1}"])
LT_AT_MVDIR(["$libdir_broken"], ["${2}"])
}
func_restore_libs ()
{
mv ${2} $libdir_broken
mv ${1} $srcdir_broken
mv ${2}-moved ${2}
mv ${1}-moved ${1}
LT_AT_MVDIR(["${2}"], ["$libdir_broken"])
LT_AT_MVDIR(["${1}"], ["$srcdir_broken"])
LT_AT_MVDIR(["${2}-moved"], ["${2}"])
LT_AT_MVDIR(["${1}-moved"], ["${1}"])
}
# make sure the program can be run.

View File

@ -40,6 +40,7 @@ if (FOO=bar; unset FOO) >/dev/null 2>&1; then
else
unset=false
fi
: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
m4_divert_pop([PREPARE_TESTS])dnl
@ -185,6 +186,21 @@ AT_CHECK([{ test -n "[$]$1" && test "X[$]$1" != Xno; } || (exit 77)])
])
# LT_AT_MVDIR(SRC, DEST)
# ----------------------
# Move contents of a directory recursively.
# Avoid `mv DIR ...' due to issues with non-deletable shared libraries
# on AIX on NFS mounts. We cannot use slibclean as non-superuser.
m4_define([LT_AT_MVDIR],
[$mkdir_p $2
(cd $1 && find . -type d) | (cd $2 && xargs $mkdir_p)
for file in `cd $1 && find . -type f -print -o -type l -print`
do
mv $1/$file $2/$file
done
rm -rf $1
])
## ------------------------------- ##
## Files for a small ltdl project. ##
## ------------------------------- ##