From 67c85d7658a0313cee1f6386777ca430d584a9d8 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 1 Feb 2015 14:31:44 +0100 Subject: [PATCH] Fixed bug #43923: test65 broken. --- testsuite/tests-to-run/test65.sh | 21 ++++++++------------- testsuite/wanted-results/test65 | 10 +++++++--- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/testsuite/tests-to-run/test65.sh b/testsuite/tests-to-run/test65.sh index 9f99ed37..349d4421 100644 --- a/testsuite/tests-to-run/test65.sh +++ b/testsuite/tests-to-run/test65.sh @@ -3,18 +3,13 @@ # -L1 will join lines ending in ' ' cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1 echo "### Test memory consumption stays (almost) the same for 30 and 300 jobs" - out30=$( stdout memusg parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..30){print $a,"\n"}') ); - out300=$( stdout memusg parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..300){print $a,"\n"}') ); - mem30=$(echo $out30 | tr -cd 0-9); - mem300=$(echo $out300 | tr -cd 0-9); - echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 150% "; - echo $(($mem300*100 < $mem30 * 150)) - -EOF - - + mem30=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..30){print $a,"\n"}') ); + mem300=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..300){print $a,"\n"}') ); + echo "Memory use should not depend very much on the total number of jobs run\n"; + echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110% "; + echo $(($mem300*100 < $mem30 * 110)) echo '### Test --shellquote' -cat <<'_EOF' | parallel --shellquote -awk -v FS="\",\"" '{print $1, $3, $4, $5, $9, $14}' | grep -v "#" | sed -e '1d' -e 's/\"//g' -e 's/\/\/\//\t/g' | cut -f1-6,11 | sed -e 's/\/\//\t/g' -e 's/ /\t/g -_EOF + perl -e 'print pack("c*",1..255)' | parallel -0 --shellquote + +EOF diff --git a/testsuite/wanted-results/test65 b/testsuite/wanted-results/test65 index ad0304fb..28e519a9 100644 --- a/testsuite/wanted-results/test65 +++ b/testsuite/wanted-results/test65 @@ -1,7 +1,11 @@ echo "### Test memory consumption stays (almost) the same for 30 and 300 jobs" ### Test memory consumption stays (almost) the same for 30 and 300 jobs - out30=$( stdout memusg parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..30){print $a,"\n"}') ); out300=$( stdout memusg parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..300){print $a,"\n"}') ); mem30=$(echo $out30 | tr -cd 0-9); mem300=$(echo $out300 | tr -cd 0-9); echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 150% "; echo $(($mem300*100 < $mem30 * 150)) -Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 150% + mem30=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..30){print $a,"\n"}') ); mem300=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..300){print $a,"\n"}') ); echo "Memory use should not depend very much on the total number of jobs run\n"; echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110% "; echo $(($mem300*100 < $mem30 * 110)) +Memory use should not depend very much on the total number of jobs run\n +Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110% 1 +echo '### Test --shellquote' ### Test --shellquote -awk\ -v\ FS=\"\\\",\\\"\"\ \'\{print\ \$1,\ \$3,\ \$4,\ \$5,\ \$9,\ \$14\}\'\ \|\ grep\ -v\ \"\#\"\ \|\ sed\ -e\ \'1d\'\ -e\ \'s/\\\"//g\'\ -e\ \'s/\\/\\/\\//\\t/g\'\ \|\ cut\ -f1-6,11\ \|\ sed\ -e\ \'s/\\/\\//\\t/g\'\ -e\ \'s/\ /\\t/g + perl -e 'print pack("c*",1..255)' | parallel -0 --shellquote +\\\\\\\\ ' +'\ \ \ \\\\\\\\\\\\\\ \!\"\#\$%\&\'\(\)\*+,-./0123456789:\;\<=\>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_\`abcdefghijklmnopqrstuvwxyz\{\|\}\~\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\