aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2025-11-01 20:32:21 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2025-11-04 11:33:29 +0100
commit71c9921d55a7cccc364ffc86d9b10cdf395d64de (patch)
tree049bad1ea87d47a146d2236726d348458e2b0728 /tests
parenttests: date: check that write errors are promptly diagnosed (diff)
downloadcoreutils-71c9921d55a7cccc364ffc86d9b10cdf395d64de.tar.gz
coreutils-71c9921d55a7cccc364ffc86d9b10cdf395d64de.zip
tests: avoid skipping by fixing build of shared libraries
Two df(1) tests were skipped (since commit ee367bd38dac), because the build of the shared library in those tests failed. + gcc -Wall -shared --std=gnu99 -fPIC -O2 k.c -o k.so -ldl k.c: In function 'open': k.c:37:7: error: implicit declaration of function 'streq'; did you \ mean 'strsep'? [-Wimplicit-function-declaration] 37 | if (streq (path, "/proc/self/mountinfo")) | ^~~~~ | strsep Gnulib streq is not available in the tests. * tests/df/no-mtab-status.sh: Replace "streq" by "0==strcmp" in the shared library source. * tests/df/skip-duplicates.sh: Likewise.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/df/no-mtab-status.sh3
-rwxr-xr-xtests/df/skip-duplicates.sh3
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh
index 0c2e8982d..135462393 100755
--- a/tests/df/no-mtab-status.sh
+++ b/tests/df/no-mtab-status.sh
@@ -28,7 +28,8 @@ grep '^#define HAVE_GETMNTENT 1' $CONFIG_HEADER > /dev/null \
|| skip_ "getmntent is not used on this system"
# Simulate "mtab" failure.
-cat > k.c <<EOF || framework_failure_
+# Replace gnulib streq as that is not available here.
+sed 's/streq/0==str''cmp/' > k.c <<EOF || framework_failure_
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/df/skip-duplicates.sh b/tests/df/skip-duplicates.sh
index f97f794f5..c839f4e19 100755
--- a/tests/df/skip-duplicates.sh
+++ b/tests/df/skip-duplicates.sh
@@ -38,7 +38,8 @@ grep '^#define HAVE_GETMNTENT 1' $CONFIG_HEADER > /dev/null \
|| skip_ "getmntent is not used on this system"
# Simulate an mtab file to test various cases.
-cat > k.c <<EOF || framework_failure_
+# Replace gnulib streq as that is not available here.
+sed 's/streq/0==str''cmp/' > k.c <<EOF || framework_failure_
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>