]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid gdb on macOS
authorPádraig Brady <P@draigBrady.com>
Fri, 24 Feb 2023 15:40:37 +0000 (15:40 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 26 Feb 2023 18:31:28 +0000 (18:31 +0000)
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.

tests/rm/r-root.sh
tests/tail-2/inotify-race.sh
tests/tail-2/inotify-race2.sh

index fed815f00c3c75614958418a8ebd89e9751554f9..b220be15a24ba453f423f379adef86dca3e5160e 100755 (executable)
@@ -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
index c722fb9fa60d221a48ba5432bc8cfca22fd26976..63f906536bc4ad3b3c13f42bde75b344317b85bd 100755 (executable)
@@ -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
index 89b02c6cfdde7a9b0f97cf1fa9ef7a26daa5d1aa..19219b72e18aa93d5569abc823918cf9832a2e72 100755 (executable)
@@ -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