From a048f547eb2e8c806236b382768de995a07d5c64 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sat, 6 Jan 2018 19:58:01 +0100 Subject: [PATCH] Fixed bug #52207: Exit status 0 when child job is killed, even with "now,fail=1" --- src/parallel | 9 +- testsuite/tests-to-run/parallel-local-0.3s.sh | 4 +- testsuite/tests-to-run/parallel-local-100s.sh | 42 ++++ testsuite/tests-to-run/parallel-local-10s.sh | 40 +++- testsuite/tests-to-run/parallel-local-30s.sh | 11 +- testsuite/tests-to-run/parallel-local114.sh | 19 -- testsuite/tests-to-run/parallel-local8.sh | 3 +- testsuite/wanted-results/parallel-local-100s | 186 ++++++++++++++++++ testsuite/wanted-results/parallel-local-10s | 10 +- testsuite/wanted-results/parallel-local114 | Bin 4578 -> 3504 bytes 10 files changed, 289 insertions(+), 35 deletions(-) diff --git a/src/parallel b/src/parallel index bcb297bc..b0358f4d 100755 --- a/src/parallel +++ b/src/parallel @@ -9104,12 +9104,17 @@ sub set_exitsignal { } elsif($Global::halt_count) { # --halt now,fail=X or soon,fail=X # --halt now,done=X or soon,done=X - $Global::halt_exitstatus = ::min($Global::total_failed,101); + $Global::halt_exitstatus = + ::min($Global::total_failed,101); } if($Global::halt_count and $Global::halt_count == 1) { # --halt now,fail=1 or soon,fail=1 # --halt now,done=1 or soon,done=1 - $Global::halt_exitstatus = $job->exitstatus(); + # Emulate Bash's +128 if there is a signal + $Global::halt_exitstatus = + ($job->exitstatus() + or + $job->exitsignal() ? $job->exitsignal() + 128 : 0); } } ::debug("halt","Pct: ",$Global::halt_pct, diff --git a/testsuite/tests-to-run/parallel-local-0.3s.sh b/testsuite/tests-to-run/parallel-local-0.3s.sh index f3820b8e..fe68cf96 100644 --- a/testsuite/tests-to-run/parallel-local-0.3s.sh +++ b/testsuite/tests-to-run/parallel-local-0.3s.sh @@ -841,8 +841,8 @@ par_pipe_tag_v() { par_dryrun_append_joblog() { echo '--dry-run should not append to joblog' rm -f /tmp/jl.$$ - parallel --jl /tmp/jl.$$ echo ::: 1 2 3 - parallel --dryrun --jl +/tmp/jl.$$ echo ::: 1 2 3 4 + parallel -k --jl /tmp/jl.$$ echo ::: 1 2 3 + parallel --dryrun -k --jl +/tmp/jl.$$ echo ::: 1 2 3 4 # Job 4 should not show up: 3 lines + header = 4 wc -l < /tmp/jl.$$ } diff --git a/testsuite/tests-to-run/parallel-local-100s.sh b/testsuite/tests-to-run/parallel-local-100s.sh index d2f89fd2..570bba33 100644 --- a/testsuite/tests-to-run/parallel-local-100s.sh +++ b/testsuite/tests-to-run/parallel-local-100s.sh @@ -10,6 +10,48 @@ export TMP5G rm -f /tmp/*.{tmx,pac,arg,all,log,swp,loa,ssh,df,pip,tmb,chr,tms,par} +par_exit_code() { + echo 'bug #52207: Exit status 0 when child job is killed, even with "now,fail=1"' + in_shell_run_command() { + # Runs command in given shell via Perl's open3 + shell="$1" + prg="$2" + perl -MIPC::Open3 -e 'open3($a,$b,$c,"'$shell'","-c","'"$prg"'"); wait; print $?>>8,"\n"' + } + export -f in_shell_run_command + + runit() { + OK="ash bash csh dash fish mksh posh rc sash sh static-sh tcsh" + BAD="fdsh fizsh ksh ksh93 yash zsh" + s=100 + cp /bin/sleep /tmp/mysleep + + echo '# Ideally the command should return the same' + echo '# with or without parallel' + parallel -kj500% --argsep ,, --tag in_shell_run_command {1} '{=2 $_=Q($_) =}' \ + ,, $OK $BAD ,, \ + '/tmp/mysleep '$s \ + 'parallel --halt-on-error now,fail=1 /tmp/mysleep ::: '$s \ + 'parallel --halt-on-error now,done=1 /tmp/mysleep ::: '$s \ + 'parallel --halt-on-error now,done=1 true ::: '$s \ + 'parallel --halt-on-error now,done=1 exit ::: '$s \ + 'true;/tmp/mysleep '$s \ + 'parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: '$s \ + 'parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: '$s \ + 'parallel --halt-on-error now,done=1 "true;true" ::: '$s \ + 'parallel --halt-on-error now,done=1 "true;exit" ::: '$s + } + export -f runit + + killsleep() { + sleep 5 + while true; do killall -9 mysleep 2>/dev/null; sleep 1; done + } + export -f killsleep + + parallel -uj0 --halt now,done=1 ::: runit killsleep +} + par_retries_unreachable() { echo '### Test of --retries on unreachable host' seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo diff --git a/testsuite/tests-to-run/parallel-local-10s.sh b/testsuite/tests-to-run/parallel-local-10s.sh index 7e093870..ec3d59cb 100644 --- a/testsuite/tests-to-run/parallel-local-10s.sh +++ b/testsuite/tests-to-run/parallel-local-10s.sh @@ -4,6 +4,37 @@ # Each should be taking 10-30s and be possible to run in parallel # I.e.: No race conditions, no logins +par_line_buffer() { + echo "### --line-buffer" + tmp1=$(tempfile) + tmp2=$(tempfile) + + seq 10 | parallel -j20 --line-buffer 'seq {} 10 | pv -qL 10' > $tmp1 + seq 10 | parallel -j20 'seq {} 10 | pv -qL 10' > $tmp2 + cat $tmp1 | wc + diff $tmp1 $tmp2 >/dev/null + echo These must diff: $? + rm $tmp1 $tmp2 +} + +par_pipe_line_buffer() { + echo "### --pipe --line-buffer" + tmp1=$(tempfile) + tmp2=$(tempfile) + + seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --tagstring {#} pv -qL 10 > $tmp1 + seq 200| parallel -N10 -L1 --pipe -j20 --tagstring {#} pv -qL 10 > $tmp2 + cat $tmp1 | wc + diff $tmp1 $tmp2 >/dev/null + echo These must diff: $? + rm $tmp1 $tmp2 +} + +par_pipe_line_buffer_compress() { + echo "### --pipe --line-buffer --compress" + seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --compress --tagstring {#} pv -qL 10 | wc +} + par__pipepart_spawn() { echo '### bug #46214: Using --pipepart doesnt spawn multiple jobs in version 20150922' seq 1000000 > /tmp/num1000000; @@ -49,7 +80,7 @@ par__memleak() { par_slow_total_jobs() { echo 'bug #51006: Slow total_jobs() eats job' - (echo a; sleep 10; echo b; sleep 10; seq 2) | + (echo a; sleep 15; echo b; sleep 15; seq 2) | parallel -k echo '{=total_jobs()=}' } @@ -95,7 +126,8 @@ par_k() { ulimit -n 50 (echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {}"; - echo "echo end") | stdout nice parallel -k -j0 + echo "echo end") | stdout nice parallel -k -j0 | + grep -Ev 'No more file handles.|Raising ulimit -n' } par_k_linebuffer() { @@ -157,7 +189,7 @@ par_results_compress() { par_kill_children_timeout() { echo '### Test killing children with --timeout and exit value (failed if timed out)' - pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc; + pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc doit() { for i in `seq 100 120`; do bash -c "(sleep $i)" & @@ -167,7 +199,7 @@ par_kill_children_timeout() { echo No good; } export -f doit - parallel --timeout 3 doit ::: 1000000000 1000000001; + parallel --timeout 3 doit ::: 1000000000 1000000001 echo $?; sleep 2; pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc diff --git a/testsuite/tests-to-run/parallel-local-30s.sh b/testsuite/tests-to-run/parallel-local-30s.sh index e27f3c79..c4e4a657 100755 --- a/testsuite/tests-to-run/parallel-local-30s.sh +++ b/testsuite/tests-to-run/parallel-local-30s.sh @@ -71,8 +71,8 @@ linebuffer_matters() { # with lines starting with the same string id=$1 shuf $randomfile | perl -pe 's/^/'$id' /' - # Sleep 3 sec to give time to linebuffer-print the first part - sleep 3 + # Sleep to give time to linebuffer-print the first part + sleep 10 shuf $randomfile | perl -pe 's/^/'$id' /' echo } @@ -83,9 +83,10 @@ linebuffer_matters() { perl -ne '/^(\d+)\s/ and print "$1\n"' | uniq | sort } - testfunc > $nolbfile & - testfunc > $controlfile & - testfunc --linebuffer > $lbfile & + # These can run in parallel if there are enough ressources + testfunc > $nolbfile + testfunc > $controlfile + testfunc --linebuffer > $lbfile wait nolb="$(cat $nolbfile)" diff --git a/testsuite/tests-to-run/parallel-local114.sh b/testsuite/tests-to-run/parallel-local114.sh index 52985e1b..b1d610d6 100755 --- a/testsuite/tests-to-run/parallel-local114.sh +++ b/testsuite/tests-to-run/parallel-local114.sh @@ -1,25 +1,6 @@ #!/bin/bash cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1 -echo "### --line-buffer" - seq 10 | parallel -j20 --line-buffer 'seq {} 10 | pv -qL 10' > /tmp/parallel_l$$; - seq 10 | parallel -j20 'seq {} 10 | pv -qL 10' > /tmp/parallel_$$; - cat /tmp/parallel_l$$ | wc; - diff /tmp/parallel_$$ /tmp/parallel_l$$ >/dev/null ; - echo These must diff: $?; - rm /tmp/parallel_l$$ /tmp/parallel_$$ - -echo "### --pipe --line-buffer" - seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --tagstring {#} pv -qL 10 > /tmp/parallel_pl$$; - seq 200| parallel -N10 -L1 --pipe -j20 --tagstring {#} pv -qL 10 > /tmp/parallel_p$$; - cat /tmp/parallel_pl$$ | wc; - diff /tmp/parallel_p$$ /tmp/parallel_pl$$ >/dev/null ; - echo These must diff: $?; - rm /tmp/parallel_pl$$ /tmp/parallel_p$$ - -echo "### --pipe --line-buffer --compress" - seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --compress --tagstring {#} pv -qL 10 | wc - echo "### bug #41482: --pipe --compress blocks at different -j/seq combinations" seq 1 | parallel -k -j2 --compress -N1 -L1 --pipe cat; echo echo 1-4 + 1-4 diff --git a/testsuite/tests-to-run/parallel-local8.sh b/testsuite/tests-to-run/parallel-local8.sh index 8f47b31d..cc31bec7 100644 --- a/testsuite/tests-to-run/parallel-local8.sh +++ b/testsuite/tests-to-run/parallel-local8.sh @@ -35,8 +35,9 @@ par_load_blocks() { par_load_from_PARALLEL() { echo "### Test reading load from PARALLEL" + # Ignore stderr due to 'Starting processes took > 2 sec' seq 1 1000000 | - parallel -kj200 --recend "\n" --spreadstdin gzip -1 | + parallel -kj200 --recend "\n" --spreadstdin gzip -1 2>/dev/null | zcat | sort -n | md5sum seq 1 1000000 | parallel -kj20 --recend "\n" --spreadstdin gzip -1 | diff --git a/testsuite/wanted-results/parallel-local-100s b/testsuite/wanted-results/parallel-local-100s index 3fc58a9d..a61f44a5 100644 --- a/testsuite/wanted-results/parallel-local-100s +++ b/testsuite/wanted-results/parallel-local-100s @@ -1,3 +1,189 @@ +par_exit_code par_exit_code 2>&1 +par_exit_code bug #52207: Exit status 0 when child job is killed, even with "now,fail=1" +par_exit_code # Ideally the command should return the same +par_exit_code # with or without parallel +par_exit_code ash /tmp/mysleep 100 137 +par_exit_code ash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code ash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code ash parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code ash parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code ash true;/tmp/mysleep 100 137 +par_exit_code ash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code ash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code ash parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code ash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code bash /tmp/mysleep 100 0 +par_exit_code bash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code bash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code bash parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code bash parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code bash true;/tmp/mysleep 100 137 +par_exit_code bash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code bash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code bash parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code bash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code csh /tmp/mysleep 100 137 +par_exit_code csh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code csh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code csh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code csh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code csh true;/tmp/mysleep 100 137 +par_exit_code csh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code csh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code csh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code csh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code dash /tmp/mysleep 100 137 +par_exit_code dash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code dash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code dash parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code dash parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code dash true;/tmp/mysleep 100 137 +par_exit_code dash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code dash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code dash parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code dash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code fish /tmp/mysleep 100 137 +par_exit_code fish parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code fish parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code fish parallel --halt-on-error now,done=1 true ::: 100 1 +par_exit_code fish parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code fish true;/tmp/mysleep 100 137 +par_exit_code fish parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code fish parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code fish parallel --halt-on-error now,done=1 "true;true" ::: 100 1 +par_exit_code fish parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code mksh /tmp/mysleep 100 0 +par_exit_code mksh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code mksh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code mksh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code mksh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code mksh true;/tmp/mysleep 100 137 +par_exit_code mksh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code mksh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code mksh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code mksh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code posh /tmp/mysleep 100 137 +par_exit_code posh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code posh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code posh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code posh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code posh true;/tmp/mysleep 100 137 +par_exit_code posh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code posh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code posh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code posh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code rc /tmp/mysleep 100 1 +par_exit_code rc parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 1 +par_exit_code rc parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 1 +par_exit_code rc parallel --halt-on-error now,done=1 true ::: 100 1 +par_exit_code rc parallel --halt-on-error now,done=1 exit ::: 100 1 +par_exit_code rc true;/tmp/mysleep 100 1 +par_exit_code rc parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 1 +par_exit_code rc parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 1 +par_exit_code rc parallel --halt-on-error now,done=1 "true;true" ::: 100 1 +par_exit_code rc parallel --halt-on-error now,done=1 "true;exit" ::: 100 1 +par_exit_code sash /tmp/mysleep 100 255 +par_exit_code sash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 255 +par_exit_code sash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 255 +par_exit_code sash parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code sash parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code sash true;/tmp/mysleep 100 0 +par_exit_code sash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 0 +par_exit_code sash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 0 +par_exit_code sash parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code sash parallel --halt-on-error now,done=1 "true;exit" ::: 100 0 +par_exit_code sh /tmp/mysleep 100 137 +par_exit_code sh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code sh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code sh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code sh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code sh true;/tmp/mysleep 100 137 +par_exit_code sh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code sh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code sh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code sh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code static-sh /tmp/mysleep 100 137 +par_exit_code static-sh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code static-sh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code static-sh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code static-sh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code static-sh true;/tmp/mysleep 100 137 +par_exit_code static-sh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code static-sh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code static-sh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code static-sh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code tcsh /tmp/mysleep 100 137 +par_exit_code tcsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code tcsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code tcsh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code tcsh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code tcsh true;/tmp/mysleep 100 137 +par_exit_code tcsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code tcsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code tcsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code tcsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code fdsh /tmp/mysleep 100 137 +par_exit_code fdsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 2 +par_exit_code fdsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 2 +par_exit_code fdsh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code fdsh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code fdsh true;/tmp/mysleep 100 137 +par_exit_code fdsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 2 +par_exit_code fdsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 2 +par_exit_code fdsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code fdsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code fizsh /tmp/mysleep 100 137 +par_exit_code fizsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code fizsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code fizsh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code fizsh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code fizsh true;/tmp/mysleep 100 137 +par_exit_code fizsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code fizsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code fizsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code fizsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code ksh /tmp/mysleep 100 0 +par_exit_code ksh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code ksh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code ksh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code ksh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code ksh true;/tmp/mysleep 100 0 +par_exit_code ksh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code ksh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code ksh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code ksh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code ksh93 /tmp/mysleep 100 0 +par_exit_code ksh93 parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code ksh93 parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code ksh93 parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code ksh93 parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code ksh93 true;/tmp/mysleep 100 0 +par_exit_code ksh93 parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code ksh93 parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code ksh93 parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code ksh93 parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code yash /tmp/mysleep 100 0 +par_exit_code yash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code yash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code yash parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code yash parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code yash true;/tmp/mysleep 100 0 +par_exit_code yash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code yash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code yash parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code yash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code zsh /tmp/mysleep 100 0 +par_exit_code zsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137 +par_exit_code zsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137 +par_exit_code zsh parallel --halt-on-error now,done=1 true ::: 100 0 +par_exit_code zsh parallel --halt-on-error now,done=1 exit ::: 100 100 +par_exit_code zsh true;/tmp/mysleep 100 0 +par_exit_code zsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code zsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137 +par_exit_code zsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0 +par_exit_code zsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100 +par_exit_code parallel: This job finished: +par_exit_code runit par_halt_on_error par_halt_on_error 2>&1 par_halt_on_error -2 true true 0 par_halt_on_error -2 true true 0 diff --git a/testsuite/wanted-results/parallel-local-10s b/testsuite/wanted-results/parallel-local-10s index 037f08cd..f54e6ad3 100644 --- a/testsuite/wanted-results/parallel-local-10s +++ b/testsuite/wanted-results/parallel-local-10s @@ -31,8 +31,6 @@ par_k parallel: Warning: Only enough file handles to run 9 jobs in parallel. par_k parallel: Warning: Running 'parallel -j0 -N 9 --pipe parallel -j0' or par_k parallel: Warning: raising 'ulimit -n' or 'nofile' in /etc/security/limits.conf par_k parallel: Warning: or /proc/sys/fs/file-max may help. -par_k parallel: Warning: No more file handles. -par_k parallel: Warning: Raising ulimit -n or /etc/security/limits.conf may help. par_k begin par_k 1 par_k 2 @@ -238,6 +236,9 @@ par_kill_children_timeout ### Test killing children with --timeout and exit valu par_kill_children_timeout 0 0 0 par_kill_children_timeout 2 par_kill_children_timeout 0 0 0 +par_line_buffer ### --line-buffer +par_line_buffer 55 55 120 +par_line_buffer These must diff: 1 par_linebuffer_tag_slow_output Test output tag with mixing halflines par_linebuffer_tag_slow_output localhost par_linebuffer_tag_slow_output localhost @@ -263,6 +264,11 @@ par_maxlinelen_X_I Chars per line (817788/7): 116826 par_maxlinelen_m_I ### Test max line length -m -I par_maxlinelen_m_I c78bd0799bc23d8946732f8b3ae3c94e - par_maxlinelen_m_I Chars per line (697800/6): 116300 +par_pipe_line_buffer ### --pipe --line-buffer +par_pipe_line_buffer 200 400 1202 +par_pipe_line_buffer These must diff: 1 +par_pipe_line_buffer_compress ### --pipe --line-buffer --compress +par_pipe_line_buffer_compress 200 400 1202 par_plus_dyn_repl Dynamic replacement strings defined by --plus par_plus_dyn_repl myval par_plus_dyn_repl myval diff --git a/testsuite/wanted-results/parallel-local114 b/testsuite/wanted-results/parallel-local114 index 387e2a5cff494e093318ea2a47af1654623d9fac..8154b28528064963e83ab06501baaccac1b4875f 100644 GIT binary patch delta 9 QcmaE)yg_=i5z7W%02D<7cK`qY delta 1090 zcmb7@OKyWO5Qg_iJwZ34U@0q$hnh_)r5A|0>b|1HBvght7}7-=`AVFrC+XOP6k=$p z7Z@1-|2#gZ@4sBd;@uu*uImD&Jk1$>tCEBjGsk-607!O#z=ux|Q4w*@IMDad?<)c3 z`q=4wIe7$nSmXU1R^XMH@LKIFC*)DVs4GUgYpN@nqAZR|I~x}M5$otCO_C<8uGJ7S zAXs@DcJ%U!bI>|7td|{=46;g=#%BrSNymz8K;Lhe5S$^d#lmcQ*Zo5f`i|uqI9)U% z6|6t!mXIB}fC_!T3+frc(RF|(MsXphy3jFJMq61HX}*P%dj`?Mv)Bm@4@=jmrzC0` zZm&Oi)SrpQcV6`$gL eCJH9yIN#2p|De7h-Q-zH`3rUZzl?TQ*LU9pEJ6?f