Skip test failing on GNU/Hurd when writing on /dev/zero or
authorAlex Mestiashvili <mestia@debian.org>
Thu, 18 Feb 2021 11:59:48 +0000 (11:59 +0000)
committerÉtienne Mollier <etienne.mollier@mailoo.org>
Thu, 18 Feb 2021 11:59:48 +0000 (11:59 +0000)
/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 cf92b47f9ac2733e82464717e02ec75dfa366af8..dc033fff93d785a0b46ba86435c5d64ee11204fa 100755 (executable)
@@ -206,6 +206,8 @@ $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
+if [ "$(dpkg-architecture -qDEB_HOST_ARCH)" != 'hurd-i386' ]
+then
 $ECHO "test : should quietly not remove non-regular file"
 $ECHO hello > tmp
 $ZSTD tmp -f -o "$DEVDEVICE" 2>tmplog > "$INTOVOID"
@@ -214,6 +216,9 @@ rm -f tmplog
 $ZSTD tmp -f -o "$INTOVOID" 2>&1 | grep -v "Refusing to remove non-regular file"
 $ECHO "test : --rm on stdin"
 $ECHO a | $ZSTD --rm > $INTOVOID   # --rm should remain silent
+else
+  $ECHO "\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