]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
tests: use /dev/zero instead of /dev/random on all systems except GNU/Hurd 1235/head
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 11 Jul 2018 12:41:50 +0000 (12:41 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 11 Jul 2018 12:41:50 +0000 (12:41 +0000)
https://github.com/facebook/zstd/pull/1124 broke the test suite
on Linux.  Looks like GNU/Hurd is the only operating system where
/dev/random is available for writing by unprivileged processes.

https://github.com/facebook/zstd/pull/1222 reverted the change
introduced by https://github.com/facebook/zstd/pull/1124 for OpenBSD
only, other operating systems need that change to be reverted, too.

Fixes: 2dde9d5abaad ("Write to /dev/random for test")
Complements: 276988f7948d ("OpenBSD is unable to write to /dev/zero")

tests/playTests.sh

index c4b1489b71f51f5940b890a2ce1d3e409d3e4476..65c661e17ee350ced9c16f5af2cf985f57d01089 100755 (executable)
@@ -59,8 +59,8 @@ fi
 isWindows=false
 INTOVOID="/dev/null"
 case "$UNAME" in
-  OpenBSD) DEVDEVICE="/dev/zero" ;;
-  *) DEVDEVICE="/dev/random" ;;
+  GNU) DEVDEVICE="/dev/random" ;;
+  *) DEVDEVICE="/dev/zero" ;;
 esac
 case "$OS" in
   Windows*)