From a6701d8eefdc76cf1a1a600be7b4adba26fa58ab Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@meta.com>
Date: Sat, 18 Apr 2026 12:51:58 -0700
Subject: [PATCH] tests: avoid two cygwin test failures

* tests/list-big: Upon failure to create the 4GiB sparse file,
_skip the test, rather than merely using framework_failure_.
* tests/zgrep-abuse: Add an up-front _skip test for file systems
that reject file names containing "|".
Reported by Bruno Haible in
https://mail.gnu.org/r/bug-gzip/2026-04/msg00009.html
---
 tests/list-big    | 3 ++-
 tests/zgrep-abuse | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/list-big b/tests/list-big
index d9b4bca..353dcc3 100755
--- a/tests/list-big
+++ b/tests/list-big
@@ -19,7 +19,8 @@

 . "${srcdir=.}/init.sh"; path_prepend_ ..

-dd bs=65536 seek=65536 if=/dev/null of=big || framework_failure_
+dd bs=65536 seek=65536 if=/dev/null of=big \
+  || skip_ "failed to create 4 GiB sparse file"

 gzip -1 big || fail=1
 gzip -l big.gz >out || fail=1
diff --git a/tests/zgrep-abuse b/tests/zgrep-abuse
index 069c58f..fa6c373 100755
--- a/tests/zgrep-abuse
+++ b/tests/zgrep-abuse
@@ -20,6 +20,9 @@

 . "${srcdir=.}/init.sh"; path_prepend_ ..

+touch 'a|b' 2>/dev/null && rm -f 'a|b' \
+  || skip_ 'file system lacks support for | in file names'
+
 : > z || framework_failure_
 echo test |gzip > 'z|
 p
-- 
2.53.0

