From 84e1c33182096deda90e99c8ed2d57f01dbfd2ff Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 13 Dec 2015 03:01:11 +0100 Subject: [PATCH] Test for bug #46520: --basefile cleans up without --cleanup. --- testsuite/tests-to-run/parallel-local-ssh5.sh | 25 +++++++---- testsuite/wanted-results/parallel-local-ssh5 | 41 +++++++++++-------- testsuite/wanted-results/parallel-polarhome | 4 +- testsuite/wanted-results/parallel-tutorial | 2 +- 4 files changed, 43 insertions(+), 29 deletions(-) diff --git a/testsuite/tests-to-run/parallel-local-ssh5.sh b/testsuite/tests-to-run/parallel-local-ssh5.sh index c43746f3..88bbf977 100644 --- a/testsuite/tests-to-run/parallel-local-ssh5.sh +++ b/testsuite/tests-to-run/parallel-local-ssh5.sh @@ -1,9 +1,23 @@ #!/bin/bash # SSH only allowed to localhost/lo -cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj2 --retries 3 -k --joblog /tmp/jl-`basename $0` -L1 +cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj3 --delay 0.1 --retries 3 -k --joblog /tmp/jl-`basename $0` -L1 +echo '### --ssh autossh - add commands that fail here' + export PARALLEL_SSH=autossh; export AUTOSSH_PORT=0; + parallel -S lo echo ::: OK; + echo OK | parallel --pipe -S lo cat; + parallel -S lo false ::: a || echo OK should fail; + touch foo_autossh; stdout parallel -S csh@lo --trc {}.out touch {}.out ::: foo_autossh; rm foo_autossh*; + +echo '### bug #46520: --basefile cleans up without --cleanup' + touch bug_46520; + parallel -S parallel@lo --bf bug_46520 ls ::: bug_46520; + ssh parallel@lo ls bug_46520; + parallel -S parallel@lo --cleanup --bf bug_46520 ls ::: bug_46520; + stdout ssh parallel@lo ls bug_46520 # should not exist + echo '### bug #36595: silent loss of input with --pipe and --sshlogin' - seq 10000 | xargs | parallel --pipe -S 10/localhost cat 2>/dev/null | wc + seq 10000 | xargs | parallel --pipe -S 8/localhost cat 2>/dev/null | wc echo 'bug #36707: --controlmaster eats jobs' seq 2 | parallel -k --controlmaster --sshlogin localhost echo OK{} @@ -14,13 +28,6 @@ echo '### --ssh lsh' # Todo rsync/trc csh@lo # Test gl. parallel med --ssh lsh: Hvilke fejler? brug dem. Også hvis de fejler -echo '### --ssh autossh - add commands that fail here' - export PARALLEL_SSH=autossh; export AUTOSSH_PORT=0; - parallel -S lo echo ::: OK; - echo OK | parallel --pipe -S lo cat; - parallel -S lo false ::: a || echo OK should fail; - touch foo_autossh; stdout parallel -S csh@lo --trc {}.out touch {}.out ::: foo_autossh; rm foo_autossh*; - echo '### bug #45025: --pipe --retries does not reschedule on other host' seq 1 300030| stdout parallel -k --retries 2 -S a.a,: --pipe 'wc;hostname' stdout parallel --retries 2 --roundrobin echo ::: should fail diff --git a/testsuite/wanted-results/parallel-local-ssh5 b/testsuite/wanted-results/parallel-local-ssh5 index 483c78ef..f858bd86 100644 --- a/testsuite/wanted-results/parallel-local-ssh5 +++ b/testsuite/wanted-results/parallel-local-ssh5 @@ -1,20 +1,3 @@ -echo '### bug #36595: silent loss of input with --pipe and --sshlogin' -### bug #36595: silent loss of input with --pipe and --sshlogin - seq 10000 | xargs | parallel --pipe -S 10/localhost cat 2>/dev/null | wc - 1 10000 48894 -echo 'bug #36707: --controlmaster eats jobs' -bug #36707: --controlmaster eats jobs - seq 2 | parallel -k --controlmaster --sshlogin localhost echo OK{} -OK1 -OK2 -echo '### --ssh lsh' -### --ssh lsh - parallel --ssh lsh -S lo echo ::: OK -OK - echo OK | parallel --ssh lsh --pipe -S csh@lo cat -OK - # Todo rsync/trc csh@lo - # Test gl. parallel med --ssh lsh: Hvilke fejler? brug dem. Også hvis de fejler echo '### --ssh autossh - add commands that fail here' ### --ssh autossh - add commands that fail here export PARALLEL_SSH=autossh; export AUTOSSH_PORT=0; parallel -S lo echo ::: OK; echo OK | parallel --pipe -S lo cat; parallel -S lo false ::: a || echo OK should fail; touch foo_autossh; stdout parallel -S csh@lo --trc {}.out touch {}.out ::: foo_autossh; rm foo_autossh*; @@ -84,6 +67,30 @@ Environment variables are: rsync: connection unexpectedly closed (0 bytes received so far) [Receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.1] +echo '### bug #46520: --basefile cleans up without --cleanup' +### bug #46520: --basefile cleans up without --cleanup + touch bug_46520; parallel -S parallel@lo --bf bug_46520 ls ::: bug_46520; ssh parallel@lo ls bug_46520; parallel -S parallel@lo --cleanup --bf bug_46520 ls ::: bug_46520; stdout ssh parallel@lo ls bug_46520 # should not exist +bug_46520 +bug_46520 +bug_46520 +ls: cannot access bug_46520: No such file or directory +echo '### bug #36595: silent loss of input with --pipe and --sshlogin' +### bug #36595: silent loss of input with --pipe and --sshlogin + seq 10000 | xargs | parallel --pipe -S 8/localhost cat 2>/dev/null | wc + 1 10000 48894 +echo 'bug #36707: --controlmaster eats jobs' +bug #36707: --controlmaster eats jobs + seq 2 | parallel -k --controlmaster --sshlogin localhost echo OK{} +OK1 +OK2 +echo '### --ssh lsh' +### --ssh lsh + parallel --ssh lsh -S lo echo ::: OK +OK + echo OK | parallel --ssh lsh --pipe -S csh@lo cat +OK + # Todo rsync/trc csh@lo + # Test gl. parallel med --ssh lsh: Hvilke fejler? brug dem. Også hvis de fejler echo '### bug #45025: --pipe --retries does not reschedule on other host' ### bug #45025: --pipe --retries does not reschedule on other host seq 1 300030| stdout parallel -k --retries 2 -S a.a,: --pipe 'wc;hostname' diff --git a/testsuite/wanted-results/parallel-polarhome b/testsuite/wanted-results/parallel-polarhome index 67cbdd9c..2381383c 100644 --- a/testsuite/wanted-results/parallel-polarhome +++ b/testsuite/wanted-results/parallel-polarhome @@ -22,7 +22,7 @@ netbsd.polarhome.com Error in tempfile() using template /XXXXXXXX.arg: Could not copy_and_test debian.polarhome.com debian.polarhome.com ### Run the test on debian.polarhome.com debian.polarhome.com Works on debian.polarhome.com -debian.polarhome.com Error in tempfile() using /XXXXXXXX.arg: Could not create temp file /XXXXXXXX.arg: Permission denied at bin/parallel line 0000 +debian.polarhome.com Error in tempfile() using template /XXXXXXXX.arg: Could not create temp file /XXXXXXXX.arg: Permission denied at bin/parallel line 0000. copy_and_test aix.polarhome.com aix.polarhome.com ### Run the test on aix.polarhome.com aix.polarhome.com Works on aix.polarhome.com @@ -30,7 +30,7 @@ aix.polarhome.com Error in tempfile() using /XXXXXXXX.arg: Could not create temp copy_and_test redhat.polarhome.com redhat.polarhome.com ### Run the test on redhat.polarhome.com redhat.polarhome.com Works on redhat.polarhome.com -redhat.polarhome.com Error in tempfile() using template /XXXXXXXX.arg: Could not create temp file /XXXXXXXX.arg: Permission denied at bin/parallel line 0000. +redhat.polarhome.com Error in tempfile() using /XXXXXXXX.arg: Could not create temp file /XXXXXXXX.arg: Permission denied at bin/parallel line 0000 copy_and_test hpux.polarhome.com hpux.polarhome.com ### Run the test on hpux.polarhome.com hpux.polarhome.com Works on hpux.polarhome.com diff --git a/testsuite/wanted-results/parallel-tutorial b/testsuite/wanted-results/parallel-tutorial index 9eecb504..36ccf9d9 100644 --- a/testsuite/wanted-results/parallel-tutorial +++ b/testsuite/wanted-results/parallel-tutorial @@ -1013,7 +1013,7 @@ please cite: volume = {36}, url = {http://www.gnu.org/s/parallel}, year = {2011}, - pages = {42-47} + pages = {42-47}, doi = {10.5281/zenodo.16303} }