From: Ralf Wildenhues Date: Mon, 12 Feb 2007 22:29:05 +0000 (+0000) Subject: Fix spurious testsuite failures on AIX due on NFS mounts due to X-Git-Tag: release-2-1b~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=206427dd2603019d76352e90bbadae7fa7d04873;p=thirdparty%2Flibtool.git 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. --- diff --git a/ChangeLog b/ChangeLog index 4b59e448e..6805db739 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-02-12 Ralf Wildenhues + + 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 * tests/export.at: Exporting is not fully functional with diff --git a/tests/destdir.at b/tests/destdir.at index 9ead46f55..b403235a4 100644 --- a/tests/destdir.at +++ b/tests/destdir.at @@ -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]) diff --git a/tests/shlibpath.at b/tests/shlibpath.at index 0d91432a8..0fa750acf 100644 --- a/tests/shlibpath.at +++ b/tests/shlibpath.at @@ -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 diff --git a/tests/static.at b/tests/static.at index 680ee8959..2e0d1e793 100644 --- a/tests/static.at +++ b/tests/static.at @@ -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. diff --git a/tests/testsuite.at b/tests/testsuite.at index 37e83b4e6..f25fd3e3e 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -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. ## ## ------------------------------- ##