parallel/testsuite/tests-to-run/test59.sh
2011-05-21 08:43:55 +02:00

27 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
echo '### Test bug https://savannah.gnu.org/bugs/index.php?33352'
# produce input slowly to parallel so that it will reap a process
# while blocking in read()
MD5=md5sum
PAR="parallel -j2 --pipe --keeporder --block 150000 --tmpdir=/dev/shm"
perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | md5sum
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
$PAR cat | md5sum &
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
$PAR --recend '' cat | md5sum &
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
$PAR --recend '' --files cat | parallel -Xj1 cat {}';'rm {} | md5sum &
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
$PAR --recend '' --files cat | parallel -Xj1 cat {}';'rm {} | md5sum &
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
$PAR --recend '' --files --tmpdir /dev/shm cat | parallel -Xj1 cat {}';'rm {} | md5sum &
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
$PAR --recend '' --files --halt-on-error 2 cat | parallel -Xj1 cat {}';'rm {} | md5sum &
wait