From cae540ebf665f7d64b39b4044654275b0051fe30 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 14 Dec 2009 02:55:25 +0000 Subject: [PATCH] Add a workaround in the test suite for a cowdancer limitation causing .ilist corruption and use ulimit instead of limit. --- test/check-div0 | 6 +++--- test/check-memory | 6 +++--- test/check-overflow | 6 +++--- test/check-rng | 2 +- test/functions.inc | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/check-div0 b/test/check-div0 index 1a38491..f24c17b 100755 --- a/test/check-div0 +++ b/test/check-div0 @@ -2,7 +2,7 @@ . "$(dirname "$0")/functions.inc" -limit coredumpsize 0 +ulimit -c 0 PROGRAM="$DIR/bug-div0" if [ ! -f "$PROGRAM" ]; then @@ -20,14 +20,14 @@ else fi new_test "zzuf -qi -r0 bug-div0 < /file-00" -if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then +if ! $ZZUF -r0 -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" fi new_test "zzuf -qi bug-div0 < file-00" -if "$ZZUF" -qi "$PROGRAM" < "$DIR/file-00"; then +if $ZZUF -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" diff --git a/test/check-memory b/test/check-memory index fdf197f..5dcf6ce 100755 --- a/test/check-memory +++ b/test/check-memory @@ -2,7 +2,7 @@ . "$(dirname "$0")/functions.inc" -limit coredumpsize 0 +ulimit -c 0 PROGRAM="$DIR/bug-memory" if [ ! -f "$PROGRAM" ]; then @@ -20,14 +20,14 @@ else fi new_test "zzuf -qi -r0 bug-memory < /file-00" -if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then +if ! $ZZUF -r0 -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" fi new_test "zzuf -qi bug-memory < file-00" -if "$ZZUF" -M 256 -qi "$PROGRAM" < "$DIR/file-00"; then +if $ZZUF -M 256 -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" diff --git a/test/check-overflow b/test/check-overflow index f688386..d966107 100755 --- a/test/check-overflow +++ b/test/check-overflow @@ -2,7 +2,7 @@ . "$(dirname "$0")/functions.inc" -limit coredumpsize 0 +ulimit -c 0 PROGRAM="$DIR/bug-overflow" if [ ! -f "$PROGRAM" ]; then @@ -20,14 +20,14 @@ else fi new_test "zzuf -qi -r0 bug-overflow < /file-00" -if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then +if ! $ZZUF -r0 -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" fi new_test "zzuf -qi bug-overflow < file-00" -if "$ZZUF" -qi "$PROGRAM" < "$DIR/file-00"; then +if $ZZUF -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" diff --git a/test/check-rng b/test/check-rng index 81d3406..d81576a 100755 --- a/test/check-rng +++ b/test/check-rng @@ -13,7 +13,7 @@ checkflip() rtot=0 new_test "$mib MiB of zeroes, ratio $r" for x in 0 1 2 3 4; do - ret=`dd if=/dev/zero bs=1048576 count=$mib 2>/dev/null | "$ZZUF" -s $s2 -r $r | "$ZZERO"` + ret=`dd if=/dev/zero bs=1048576 count=$mib 2>/dev/null | $ZZUF -s $s2 -r $r | "$ZZERO"` if [ "$rmax" = -1 -o "$ret" -gt "$rmax" ]; then rmax=$ret; fi if [ "$rmin" = -1 -o "$ret" -lt "$rmin" ]; then rmin=$ret; fi rtot=`expr $rtot + $ret || true` diff --git a/test/functions.inc b/test/functions.inc index 8da5cfc..5bd5883 100644 --- a/test/functions.inc +++ b/test/functions.inc @@ -2,7 +2,7 @@ # . "$(dirname "$0")/functions.inc" DIR="$(dirname "$0")" -ZZUF="$DIR/../src/zzuf" +ZZUF="$DIR/../src/zzuf -E '[.]ilist$'" ZZCAT="$DIR/zzcat" if [ ! -f "$ZZCAT" ]; then