File: 0015-Skip-dev-random-tests-on-hurd.patch

package info (click to toggle)
libzstd 1.5.7%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,352 kB
  • sloc: ansic: 89,030; sh: 3,788; python: 3,466; cpp: 2,927; makefile: 2,329; asm: 390
file content (36 lines) | stat: -rw-r--r-- 1,621 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Description: Skip test failing on GNU/Hurd when writing on /dev/zero or
 /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
From: Alex Mestiashvili <mestia@debian.org>
--- a/tests/playTests.sh
+++ b/tests/playTests.sh
@@ -494,14 +494,19 @@
 zstd -v --rm tmp2 -o tmp2.zst -c > tmp3.zst
 test -f tmp2
 test -f tmp3.zst
-println "test : should quietly not remove non-regular file"
-println hello > tmp
-zstd tmp -f -o "$DEVDEVICE" 2>tmplog > "$INTOVOID"
-$GREP "Refusing to remove non-regular file" tmplog && die
-rm -f tmplog
-zstd tmp -f -o "$INTOVOID" 2>&1 | $GREP "Refusing to remove non-regular file" && die
-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 "Refusing to remove non-regular file" tmplog && die
+    rm -f tmplog
+    zstd tmp -f -o "$INTOVOID" 2>&1 | $GREP "Refusing to remove non-regular file" && die
+    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 -f tmp
 zstd -f tmp && die "tmp not present : should have failed"
 test ! -f tmp.zst  # tmp.zst should not be created