From ba25b75dc2a4f37cb65b5e2ff1bf41bd1707770b Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Mon, 13 Jan 2014 19:39:52 +0000 Subject: maint: tests: refactor gcc commands for building shared lib * init.cfg (gcc_shared_): A new function refactored from tests. (require_gcc_shared_): Adjust to call gcc_shared_() to build the test library, and remove that library before the function returns. * tests/cp/nfs-removal-race.sh: Call the new gcc_shared_(). * tests/df/no-mtab-status.sh: Likewise. * tests/df/skip-duplicates.sh: Likewise. * tests/ls/getxattr-speedup.sh: Likewise. * tests/rm/r-root.sh: Likewise. --- tests/df/no-mtab-status.sh | 2 +- tests/df/skip-duplicates.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/df') diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh index 58f1b46f9..f2fda5e65 100755 --- a/tests/df/no-mtab-status.sh +++ b/tests/df/no-mtab-status.sh @@ -45,7 +45,7 @@ struct mntent *getmntent (FILE *fp) EOF # Then compile/link it: -$CC -shared -fPIC -ldl -O2 k.c -o k.so \ +gcc_shared_ k.c k.so \ || framework_failure_ 'failed to build shared library' # Test if LD_PRELOAD works: diff --git a/tests/df/skip-duplicates.sh b/tests/df/skip-duplicates.sh index 69182d2b3..266520aa6 100755 --- a/tests/df/skip-duplicates.sh +++ b/tests/df/skip-duplicates.sh @@ -60,7 +60,7 @@ struct mntent *getmntent (FILE *fp) EOF # Then compile/link it: -gcc --std=gnu99 -shared -fPIC -ldl -O2 k.c -o k.so \ +gcc_shared_ k.c k.so \ || framework_failure_ 'failed to build shared library' # Test if LD_PRELOAD works: -- cgit v1.2.3-70-g09d2