Skip test failing on GNU/Hurd when writing on /dev/zero or
authorAlex Mestiashvili <mestia@debian.org>
Fri, 7 Aug 2020 18:47:29 +0000 (19:47 +0100)
committerAndreas Tille <tille@debian.org>
Fri, 7 Aug 2020 18:47:29 +0000 (19:47 +0100)
/dev/random. On different GNU/Hurd installations writing to either one or
another would fail. Currently writing to /dev/random results in the message
"Computer bought the farm" and exit status 1
See also: https://github.com/facebook/zstd/issues/1116

Gbp-Pq: Name 0015-Skip-dev-random-tests-on-hurd.patch

tests/playTests.sh

index c00112c7905e65497b4c4a8a350112910846b138..d566e9e8e31c31a5d8c353b0f9f2683f4a8e3066 100755 (executable)
@@ -295,14 +295,19 @@ zstd -f --rm tmp
 test ! -f tmp  # tmp should no longer be present
 zstd -f -d --rm tmp.zst
 test ! -f tmp.zst   # tmp.zst should no longer be present
-println "test : should quietly not remove non-regular file"
-println hello > tmp
-zstd tmp -f -o "$DEVDEVICE" 2>tmplog > "$INTOVOID"
-grep -v "Refusing to remove non-regular file" tmplog
-rm -f tmplog
-zstd tmp -f -o "$INTOVOID" 2>&1 | grep -v "Refusing to remove non-regular file"
-println "test : --rm on stdin"
-println a | zstd --rm > $INTOVOID   # --rm should remain silent
+if [ "$(dpkg-architecture -qDEB_HOST_ARCH)" != 'hurd-i386' ]
+then
+    println "test : should quietly not remove non-regular file"
+    println hello > tmp
+    zstd tmp -f -o "$DEVDEVICE" 2>tmplog > "$INTOVOID"
+    grep -v "Refusing to remove non-regular file" tmplog
+    rm -f tmplog
+    zstd tmp -f -o "$INTOVOID" 2>&1 | grep -v "Refusing to remove non-regular file"
+    println "test : --rm on stdin"
+    println a | zstd --rm > $INTOVOID   # --rm should remain silent
+else
+   println "\n**** This test on $DEBARCH fails with \"Computer bought the farm\" **** "
+fi
 rm tmp
 zstd -f tmp && die "tmp not present : should have failed"
 test ! -f tmp.zst  # tmp.zst should not be created