summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2023-02-24 15:40:37 +0000
committerPádraig Brady <P@draigBrady.com>2023-02-26 18:31:28 +0000
commit3ead67dd163977fb03932e67485a4a27d498185d (patch)
tree39eec378fd93aa75f80f61076d80e37fc56da09b /tests
parent65bb2765646df18488b266e6c1851593d3f9c966 (diff)
downloadcoreutils-3ead67dd163977fb03932e67485a4a27d498185d.tar.gz
tests: avoid gdb on macOS
gdb was seen to hang intermittently on macOS 12. Also gdb requires signing on newer macOS systems: https://sourceware.org/gdb/wiki/PermissionsDarwin So restrict its use on macOS systems for now. * tests/rm/r-root.sh: Skip on darwin systems. * tests/tail-2/inotify-race.sh: Restrict the test to inotify capable systems to avoid the hang with some gdbs. * tests/tail-2/inotify-race.sh: Likewise.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rm/r-root.sh5
-rwxr-xr-xtests/tail-2/inotify-race.sh3
-rwxr-xr-xtests/tail-2/inotify-race2.sh3
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/rm/r-root.sh b/tests/rm/r-root.sh
index fed815f00..b220be15a 100755
--- a/tests/rm/r-root.sh
+++ b/tests/rm/r-root.sh
@@ -41,6 +41,11 @@ unset CU_TEST_SKIP_EXIT
USE_GDB=1
if test $USE_GDB = 1; then
+ case $host_triplet in
+ *darwin*) skip_ 'avoiding due to potentially non functioning gdb' ;;
+ *) ;;
+ esac
+
# Use gdb to provide further protection by limiting calls to unlinkat().
( timeout 10s gdb --version ) > gdb.out 2>&1
case $(cat gdb.out) in
diff --git a/tests/tail-2/inotify-race.sh b/tests/tail-2/inotify-race.sh
index c722fb9fa..63f906536 100755
--- a/tests/tail-2/inotify-race.sh
+++ b/tests/tail-2/inotify-race.sh
@@ -23,6 +23,9 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail sleep
+grep '^#define HAVE_INOTIFY 1' "$CONFIG_HEADER" >/dev/null && is_local_dir_ . \
+ || skip_ 'inotify is not supported'
+
# Terminate any background gdb/tail process
cleanup_() {
kill $pid 2>/dev/null && wait $pid
diff --git a/tests/tail-2/inotify-race2.sh b/tests/tail-2/inotify-race2.sh
index 89b02c6cf..19219b72e 100755
--- a/tests/tail-2/inotify-race2.sh
+++ b/tests/tail-2/inotify-race2.sh
@@ -22,6 +22,9 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ tail sleep
+grep '^#define HAVE_INOTIFY 1' "$CONFIG_HEADER" >/dev/null && is_local_dir_ . \
+ || skip_ 'inotify is not supported'
+
# Terminate any background gdb/tail process
cleanup_() {
kill $pid 2>/dev/null && wait $pid