From e92d16f68a97575ed7112204b069514edc8d54a0 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 27 Mar 2013 12:51:43 +0000 Subject: tests: avoid shared lib tests on unsupported platforms * init.cfg (require_gcc_shared_): A new function to check that we can build shared libraries in the particular manner we use in our tests. * tests/cp/nfs-removal-race.sh: Use require_gcc_shared_. Then fail rather than skip, if the actual shared lib build fails. * tests/df/no-mtab-status.sh: Likewise. * tests/df/skip-duplicates.sh: Likewise. * tests/ls/getxattr-speedup.sh: Likewise. Reported in http://bugs.gnu.org/14024 --- init.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'init.cfg') diff --git a/init.cfg b/init.cfg index afee93077..093cd8586 100644 --- a/init.cfg +++ b/init.cfg @@ -466,6 +466,15 @@ require_sparse_support_() fi } +# There are a myriad of ways to build shared libs, +# so we only consider running tests requiring shared libs, +# on platforms that support building them as follows. +require_gcc_shared_() +{ + $CC -shared -fPIC -O2 -xc -o d.so -ldl - < /dev/null 2>&1 \ + || skip_ '$CC -shared ... failed to build a shared lib' +} + mkfifo_or_skip_() { test $# = 1 || framework_failure_ -- cgit v1.2.3-54-g00ecf