diff --git a/src/parallel b/src/parallel index bd5affae..292ae432 100755 --- a/src/parallel +++ b/src/parallel @@ -2353,8 +2353,10 @@ sub save_original_signal_handler { # Remember the original signal handler # Returns: N/A $SIG{TERM} ||= sub { exit 0; }; # $SIG{TERM} is not set on Mac OS X - $SIG{INT} = sub { if($opt::tmux) { qx { tmux kill-session -t p$$ }; } exit -1 }; - $SIG{TERM} = sub { if($opt::tmux) { qx { tmux kill-session -t p$$ }; } exit -1 }; + $SIG{INT} = sub { if($opt::tmux) { qx { tmux kill-session -t p$$ }; } + unlink keys %Global::unlink; exit -1 }; + $SIG{TERM} = sub { if($opt::tmux) { qx { tmux kill-session -t p$$ }; } + unlink keys %Global::unlink; exit -1 }; %Global::original_sig = %SIG; $SIG{TERM} = sub {}; # Dummy until jobs really start } @@ -3070,128 +3072,135 @@ sub swap_activity { return $self->{'swap_activity'}; } -sub swapactivityscript { - # Returns: - # shellscript for detecting swap activity - # - # arguments for vmstat are OS dependant - # swap_in and swap_out are in different columns depending on OS - # - my %vmstat = ( - # linux: $7*$8 - # $ vmstat 1 2 - # procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- - # r b swpd free buff cache si so bi bo in cs us sy id wa - # 5 0 51208 1701096 198012 18857888 0 0 37 153 28 19 56 11 33 1 - # 3 0 51208 1701288 198012 18857972 0 0 0 0 3638 10412 15 3 82 0 - 'linux' => ['vmstat 1 2 | tail -n1', '$7*$8'], +{ + my $script; - # solaris: $6*$7 - # $ vmstat -S 1 2 - # kthr memory page disk faults cpu - # r b w swap free si so pi po fr de sr s3 s4 -- -- in sy cs us sy id - # 0 0 0 4628952 3208408 0 0 3 1 1 0 0 -0 2 0 0 263 613 246 1 2 97 - # 0 0 0 4552504 3166360 0 0 0 0 0 0 0 0 0 0 0 246 213 240 1 1 98 - 'solaris' => ['vmstat -S 1 2 | tail -1', '$6*$7'], - - # darwin (macosx): $21*$22 - # $ vm_stat -c 2 1 - # Mach Virtual Memory Statistics: (page size of 4096 bytes) - # free active specul inactive throttle wired prgable faults copy 0fill reactive purged file-backed anonymous cmprssed cmprssor dcomprs comprs pageins pageout swapins swapouts - # 346306 829050 74871 606027 0 240231 90367 544858K 62343596 270837K 14178 415070 570102 939846 356 370 116 922 4019813 4 0 0 - # 345740 830383 74875 606031 0 239234 90369 2696 359 553 0 0 570110 941179 356 370 0 0 0 0 0 0 - 'darwin' => ['vm_stat -c 2 1 | tail -n1', '$21*$22'], - - # ultrix: $12*$13 - # $ vmstat -S 1 2 - # procs faults cpu memory page disk - # r b w in sy cs us sy id avm fre si so pi po fr de sr s0 - # 1 0 0 4 23 2 3 0 97 7743 217k 0 0 0 0 0 0 0 0 - # 1 0 0 6 40 8 0 1 99 7743 217k 0 0 3 0 0 0 0 0 - 'ultrix' => ['vmstat -S 1 2 | tail -1', '$12*$13'], - - # aix: $6*$7 - # $ vmstat 1 2 - # System configuration: lcpu=1 mem=2048MB - # - # kthr memory page faults cpu - # ----- ----------- ------------------------ ------------ ----------- - # r b avm fre re pi po fr sr cy in sy cs us sy id wa - # 0 0 333933 241803 0 0 0 0 0 0 10 143 90 0 0 99 0 - # 0 0 334125 241569 0 0 0 0 0 0 37 5368 184 0 9 86 5 - 'aix' => ['vmstat 1 2 | tail -n1', '$6*$7'], - - # freebsd: $8*$9 - # $ vmstat -H 1 2 - # procs memory page disks faults cpu - # r b w avm fre flt re pi po fr sr ad0 ad1 in sy cs us sy id - # 1 0 0 596716 19560 32 0 0 0 33 8 0 0 11 220 277 0 0 99 - # 0 0 0 596716 19560 2 0 0 0 0 0 0 0 11 144 263 0 1 99 - 'freebsd' => ['vmstat -H 1 2 | tail -n1', '$8*$9'], - - # mirbsd: $8*$9 - # $ vmstat 1 2 - # procs memory page disks traps cpu - # r b w avm fre flt re pi po fr sr wd0 cd0 int sys cs us sy id - # 0 0 0 25776 164968 34 0 0 0 0 0 0 0 230 259 38 4 0 96 - # 0 0 0 25776 164968 24 0 0 0 0 0 0 0 237 275 37 0 0 100 - 'mirbsd' => ['vmstat 1 2 | tail -n1', '$8*$9'], - - # netbsd: $7*$8 - # $ vmstat 1 2 - # procs memory page disks faults cpu - # r b avm fre flt re pi po fr sr w0 w1 in sy cs us sy id - # 0 0 138452 6012 54 0 0 0 1 2 3 0 4 100 23 0 0 100 - # 0 0 138456 6008 1 0 0 0 0 0 0 0 7 26 19 0 0 100 - 'netbsd' => ['vmstat 1 2 | tail -n1', '$7*$8'], - - # openbsd: $8*$9 - # $ vmstat 1 2 - # procs memory page disks traps cpu - # r b w avm fre flt re pi po fr sr wd0 wd1 int sys cs us sy id - # 0 0 0 76596 109944 73 0 0 0 0 0 0 1 5 259 22 0 1 99 - # 0 0 0 76604 109936 24 0 0 0 0 0 0 0 7 114 20 0 1 99 - 'openbsd' => ['vmstat 1 2 | tail -n1', '$8*$9'], - - # hpux: $8*$9 - # $ vmstat 1 2 - # procs memory page faults cpu - # r b w avm free re at pi po fr de sr in sy cs us sy id - # 1 0 0 247211 216476 4 1 0 0 0 0 0 102 73005 54 6 11 83 - # 1 0 0 247211 216421 43 9 0 0 0 0 0 144 1675 96 25269512791222387000 25269512791222387000 105 - 'hpux' => ['vmstat 1 2 | tail -n1', '$8*$9'], - - # dec_osf (tru64): $11*$12 - # $ vmstat 1 2 - # Virtual Memory Statistics: (pagesize = 8192) - # procs memory pages intr cpu - # r w u act free wire fault cow zero react pin pout in sy cs us sy id - # 3 181 36 51K 1895 8696 348M 59M 122M 259 79M 0 5 218 302 4 1 94 - # 3 181 36 51K 1893 8696 3 15 21 0 28 0 4 81 321 1 1 98 - 'dec_osf' => ['vmstat 1 2 | tail -n1', '$11*$12'], - - # gnu (hurd): $7*$8 - # $ vmstat -k 1 2 - # (pagesize: 4, size: 512288, swap size: 894972) - # free actv inact wired zeroed react pgins pgouts pfaults cowpfs hrat caobj cache swfree - # 371940 30844 89228 20276 298348 0 48192 19016 756105 99808 98% 876 20628 894972 - # 371940 30844 89228 20276 +0 +0 +0 +0 +42 +2 98% 876 20628 894972 - 'gnu' => ['vmstat -k 1 2 | tail -n1', '$7*$8'], - - # -nto (qnx has no swap) - #-irix - #-svr5 (scosysv) - ); - my $perlscript = ""; - for my $os (keys %vmstat) { - #q[ { vmstat 1 2 2> /dev/null || vmstat -c 1 2; } | ]. - # q[ awk 'NR!=4{next} NF==17||NF==16{print $7*$8} NF==22{print $21*$22} {exit}' ]; - $vmstat{$os}[1] =~ s/\$/\\\\\\\$/g; # $ => \\\$ - $perlscript .= 'if($^O eq "'.$os.'") { print `'.$vmstat{$os}[0].' | awk "{print ' . - $vmstat{$os}[1] . '}"` }'; + sub swapactivityscript { + # Returns: + # shellscript for detecting swap activity + # + # arguments for vmstat are OS dependant + # swap_in and swap_out are in different columns depending on OS + # + if(not $script) { + my %vmstat = ( + # linux: $7*$8 + # $ vmstat 1 2 + # procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- + # r b swpd free buff cache si so bi bo in cs us sy id wa + # 5 0 51208 1701096 198012 18857888 0 0 37 153 28 19 56 11 33 1 + # 3 0 51208 1701288 198012 18857972 0 0 0 0 3638 10412 15 3 82 0 + 'linux' => ['vmstat 1 2 | tail -n1', '$7*$8'], + + # solaris: $6*$7 + # $ vmstat -S 1 2 + # kthr memory page disk faults cpu + # r b w swap free si so pi po fr de sr s3 s4 -- -- in sy cs us sy id + # 0 0 0 4628952 3208408 0 0 3 1 1 0 0 -0 2 0 0 263 613 246 1 2 97 + # 0 0 0 4552504 3166360 0 0 0 0 0 0 0 0 0 0 0 246 213 240 1 1 98 + 'solaris' => ['vmstat -S 1 2 | tail -1', '$6*$7'], + + # darwin (macosx): $21*$22 + # $ vm_stat -c 2 1 + # Mach Virtual Memory Statistics: (page size of 4096 bytes) + # free active specul inactive throttle wired prgable faults copy 0fill reactive purged file-backed anonymous cmprssed cmprssor dcomprs comprs pageins pageout swapins swapouts + # 346306 829050 74871 606027 0 240231 90367 544858K 62343596 270837K 14178 415070 570102 939846 356 370 116 922 4019813 4 0 0 + # 345740 830383 74875 606031 0 239234 90369 2696 359 553 0 0 570110 941179 356 370 0 0 0 0 0 0 + 'darwin' => ['vm_stat -c 2 1 | tail -n1', '$21*$22'], + + # ultrix: $12*$13 + # $ vmstat -S 1 2 + # procs faults cpu memory page disk + # r b w in sy cs us sy id avm fre si so pi po fr de sr s0 + # 1 0 0 4 23 2 3 0 97 7743 217k 0 0 0 0 0 0 0 0 + # 1 0 0 6 40 8 0 1 99 7743 217k 0 0 3 0 0 0 0 0 + 'ultrix' => ['vmstat -S 1 2 | tail -1', '$12*$13'], + + # aix: $6*$7 + # $ vmstat 1 2 + # System configuration: lcpu=1 mem=2048MB + # + # kthr memory page faults cpu + # ----- ----------- ------------------------ ------------ ----------- + # r b avm fre re pi po fr sr cy in sy cs us sy id wa + # 0 0 333933 241803 0 0 0 0 0 0 10 143 90 0 0 99 0 + # 0 0 334125 241569 0 0 0 0 0 0 37 5368 184 0 9 86 5 + 'aix' => ['vmstat 1 2 | tail -n1', '$6*$7'], + + # freebsd: $8*$9 + # $ vmstat -H 1 2 + # procs memory page disks faults cpu + # r b w avm fre flt re pi po fr sr ad0 ad1 in sy cs us sy id + # 1 0 0 596716 19560 32 0 0 0 33 8 0 0 11 220 277 0 0 99 + # 0 0 0 596716 19560 2 0 0 0 0 0 0 0 11 144 263 0 1 99 + 'freebsd' => ['vmstat -H 1 2 | tail -n1', '$8*$9'], + + # mirbsd: $8*$9 + # $ vmstat 1 2 + # procs memory page disks traps cpu + # r b w avm fre flt re pi po fr sr wd0 cd0 int sys cs us sy id + # 0 0 0 25776 164968 34 0 0 0 0 0 0 0 230 259 38 4 0 96 + # 0 0 0 25776 164968 24 0 0 0 0 0 0 0 237 275 37 0 0 100 + 'mirbsd' => ['vmstat 1 2 | tail -n1', '$8*$9'], + + # netbsd: $7*$8 + # $ vmstat 1 2 + # procs memory page disks faults cpu + # r b avm fre flt re pi po fr sr w0 w1 in sy cs us sy id + # 0 0 138452 6012 54 0 0 0 1 2 3 0 4 100 23 0 0 100 + # 0 0 138456 6008 1 0 0 0 0 0 0 0 7 26 19 0 0 100 + 'netbsd' => ['vmstat 1 2 | tail -n1', '$7*$8'], + + # openbsd: $8*$9 + # $ vmstat 1 2 + # procs memory page disks traps cpu + # r b w avm fre flt re pi po fr sr wd0 wd1 int sys cs us sy id + # 0 0 0 76596 109944 73 0 0 0 0 0 0 1 5 259 22 0 1 99 + # 0 0 0 76604 109936 24 0 0 0 0 0 0 0 7 114 20 0 1 99 + 'openbsd' => ['vmstat 1 2 | tail -n1', '$8*$9'], + + # hpux: $8*$9 + # $ vmstat 1 2 + # procs memory page faults cpu + # r b w avm free re at pi po fr de sr in sy cs us sy id + # 1 0 0 247211 216476 4 1 0 0 0 0 0 102 73005 54 6 11 83 + # 1 0 0 247211 216421 43 9 0 0 0 0 0 144 1675 96 25269512791222387000 25269512791222387000 105 + 'hpux' => ['vmstat 1 2 | tail -n1', '$8*$9'], + + # dec_osf (tru64): $11*$12 + # $ vmstat 1 2 + # Virtual Memory Statistics: (pagesize = 8192) + # procs memory pages intr cpu + # r w u act free wire fault cow zero react pin pout in sy cs us sy id + # 3 181 36 51K 1895 8696 348M 59M 122M 259 79M 0 5 218 302 4 1 94 + # 3 181 36 51K 1893 8696 3 15 21 0 28 0 4 81 321 1 1 98 + 'dec_osf' => ['vmstat 1 2 | tail -n1', '$11*$12'], + + # gnu (hurd): $7*$8 + # $ vmstat -k 1 2 + # (pagesize: 4, size: 512288, swap size: 894972) + # free actv inact wired zeroed react pgins pgouts pfaults cowpfs hrat caobj cache swfree + # 371940 30844 89228 20276 298348 0 48192 19016 756105 99808 98% 876 20628 894972 + # 371940 30844 89228 20276 +0 +0 +0 +0 +42 +2 98% 876 20628 894972 + 'gnu' => ['vmstat -k 1 2 | tail -n1', '$7*$8'], + + # -nto (qnx has no swap) + #-irix + #-svr5 (scosysv) + ); + my $perlscript = ""; + for my $os (keys %vmstat) { + #q[ { vmstat 1 2 2> /dev/null || vmstat -c 1 2; } | ]. + # q[ awk 'NR!=4{next} NF==17||NF==16{print $7*$8} NF==22{print $21*$22} {exit}' ]; + $vmstat{$os}[1] =~ s/\$/\\\\\\\$/g; # $ => \\\$ + $perlscript .= 'if($^O eq "'.$os.'") { print `'.$vmstat{$os}[0].' | awk "{print ' . + $vmstat{$os}[1] . '}"` }'; + } + $perlscript = "perl -e " . ::shell_quote_scalar($perlscript); + $script = $Global::envvar. " " .$perlscript; + } + return $script; } - $perlscript = "perl -e " . ::shell_quote_scalar($perlscript); - return $Global::envvar. " " .$perlscript; } sub too_fast_remote_login { @@ -4804,14 +4813,16 @@ sub kill { @pidtable = `$pid_parentpid_cmd{$^O}`; for (@pidtable) { /(\S+)\s+(\S+)/ or ::die_bug("pidtable format"); - push(@{$children_of{$2}},$1); + push @{$children_of{$2}}, $1; } my @more = ($pid); + # While more (grand)*children while(@more) { my @m; - push @pids,@more; + push @pids, @more; for my $parent (@more) { if($children_of{$parent}) { + # add the children of this parent push @m, @{$children_of{$parent}}; } } @@ -5057,7 +5068,6 @@ sub sshreturn { my $rsync_opt = "-rlDzR -e".::shell_quote_scalar($sshcmd); my $pre = ""; for my $file ($self->return()) { - $file =~ s:/\./:/:g; # Rsync treats /./ special. We dont want that $file =~ s:^\./::g; # Remove ./ if any my $relpath = ($file !~ m:^/:); # Is the path relative? my $cd = ""; @@ -5070,15 +5080,20 @@ sub sshreturn { } # Only load File::Basename if actually needed $Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; - $cd = ::shell_quote_file(::dirname($file)); + # dir/./file means relative to dir, so remove dir on remote + $file =~ m:(.*)/\./:; + my $basedir = $1 ? ::shell_quote_file($1."/") : ""; + my $nobasedir = $file; + $nobasedir =~ s:.*/\./::; + $cd = ::shell_quote_file(::dirname($nobasedir)); my $rsync_cd = '--rsync-path='.::shell_quote_scalar("cd $wd$cd; rsync"); my $basename = ::shell_quote_scalar(::shell_quote_file(basename($file))); # --return # mkdir -p /home/tange/dir/subdir/; # rsync -rlDzR --rsync-path="cd /home/tange/dir/subdir/; rsync" # server:file.gz /home/tange/dir/subdir/ - $pre .= "mkdir -p $cd; rsync $rsync_cd $rsync_opt $serverlogin:". - $basename . " ".$cd.";"; + $pre .= "mkdir -p $basedir$cd; rsync $rsync_cd $rsync_opt $serverlogin:". + $basename . " ".$basedir.$cd.";"; } return $pre; } diff --git a/src/parallel.texi b/src/parallel.texi index d87d5120..c2b1c9a8 100644 --- a/src/parallel.texi +++ b/src/parallel.texi @@ -768,9 +768,9 @@ status will be the exit status from the failing job. @item 1-99% @anchor{1-99%} -If @emph{val}% of the jobs fail: Do not start new jobs, but complete the -running jobs including cleanup. The exit status will be the exit -status from the last failing job. +If @emph{val}% of the jobs fail and minimum 3: Do not start new jobs, but +complete the running jobs including cleanup. The exit status will be +the exit status from the last failing job. @end table @@ -975,11 +975,11 @@ processes on the computer is less than @emph{max-load}. @emph{max-load} uses the same syntax as @strong{--jobs}, so @emph{100%} for one per CPU is a valid setting. Only difference is 0 which is interpreted as 0.01. -@item @strong{--controlmaster} (experimental) -@anchor{@strong{--controlmaster} (experimental)} +@item @strong{--controlmaster} +@anchor{@strong{--controlmaster}} -@item @strong{-M} (experimental) -@anchor{@strong{-M} (experimental)} +@item @strong{-M} +@anchor{@strong{-M}} Use ssh's ControlMaster to make ssh connections faster. Useful if jobs run remote and are very fast to run. This is disabled for sshlogins diff --git a/src/parallel_tutorial.1 b/src/parallel_tutorial.1 index 1f7ca9ad..189c7948 100644 --- a/src/parallel_tutorial.1 +++ b/src/parallel_tutorial.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "PARALLEL_TUTORIAL 1" -.TH PARALLEL_TUTORIAL 1 "2014-07-18" "20140711" "parallel" +.TH PARALLEL_TUTORIAL 1 "2014-07-20" "20140711" "parallel" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -1631,6 +1631,29 @@ Output: \& echo 1; exit 1 .Ve .PP +If \-\-halt is given a percentage this percentage of the jobs must fail +(though minimum 3) before \s-1GNU\s0 Parallel stops spawning more jobs: +.PP +.Vb 1 +\& parallel \-j2 \-\-halt 20% echo {}\e; exit {} ::: 0 0 1 2 3 4 5 6 7 +.Ve +.PP +Output: +.PP +.Vb 11 +\& 0 +\& 0 +\& 1 +\& 2 +\& 3 +\& 4 +\& parallel: Starting no more jobs. Waiting for 2 jobs to finish. This job failed: +\& echo 4; exit 4 +\& 5 +\& parallel: Starting no more jobs. Waiting for 1 jobs to finish. This job failed: +\& echo 5; exit 5 +.Ve +.PP \&\s-1GNU\s0 Parallel can retry the command with \-\-retries. This is useful if a command fails for unkown reasons now and then. .PP diff --git a/src/parallel_tutorial.html b/src/parallel_tutorial.html index 902c5a40..56a9862d 100644 --- a/src/parallel_tutorial.html +++ b/src/parallel_tutorial.html @@ -1116,6 +1116,23 @@ with --halt 1:

1 parallel: This job failed: echo 1; exit 1 +

If --halt is given a percentage this percentage of the jobs must fail +(though minimum 3) before GNU Parallel stops spawning more jobs:

+
+  parallel -j2 --halt 20% echo {}\; exit {} ::: 0 0 1 2 3 4 5 6 7
+

Output:

+
+  0
+  0
+  1
+  2
+  3
+  4
+  parallel: Starting no more jobs. Waiting for 2 jobs to finish. This job failed:
+      echo 4; exit 4
+  5
+  parallel: Starting no more jobs. Waiting for 1 jobs to finish. This job failed:
+      echo 5; exit 5

GNU Parallel can retry the command with --retries. This is useful if a command fails for unkown reasons now and then.

diff --git a/src/parallel_tutorial.pdf b/src/parallel_tutorial.pdf
deleted file mode 100644
index ce58b2f7..00000000
Binary files a/src/parallel_tutorial.pdf and /dev/null differ
diff --git a/testsuite/tests-to-run/niceload02.sh b/testsuite/tests-to-run/niceload02.sh
index d2d59f3f..cee07087 100755
--- a/testsuite/tests-to-run/niceload02.sh
+++ b/testsuite/tests-to-run/niceload02.sh
@@ -14,7 +14,6 @@ perl -e '$|=1;while($t++<3){sleep(1);print "."}' &
 stdout /usr/bin/time -f %e niceload -l 8 -p $! | perl -ne '$_ >= 5 and print "OK\n"'
 
 echo "### Test --sensor -l negative"
-# The test does not currently work on my laptop
-#timeout 10 nice nice dd iflag=fullblock if=/dev/zero of=/dev/null bs=11G &
-#niceload -t 1 --sensor 'free | field 3 | head -3|tail -1' -l -10000000 "free -g|egrep -q /.*1[0-9]. && echo more than 6 GB used"
+timeout 10 nice nice dd iflag=fullblock if=/dev/zero of=/dev/null bs=11G &
+niceload -t 1 --sensor 'free | field 3 | head -3|tail -1' -l -10000000 "free -g|egrep -q /.*1[0-9]. && echo more than 6 GB used"
 
diff --git a/testsuite/tests-to-run/parallel-install.sh b/testsuite/tests-to-run/parallel-install.sh
index b3d4f054..24569067 100644
--- a/testsuite/tests-to-run/parallel-install.sh
+++ b/testsuite/tests-to-run/parallel-install.sh
@@ -5,13 +5,13 @@ echo '### Test installation missing pod2*'
 parallel which ::: pod2html pod2man pod2texi pod2pdf | sudo parallel mv {} {}.hidden
 
 cd ~/privat/parallel
-stdout make dist | perl -pe 's/\d{8}/00000000/g'
+stdout make dist | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g'
 LAST=$(ls *tar.gz | tail -n1)
 cd /tmp
 rm -rf parallel-20??????/
 tar xf ~/privat/parallel/$LAST
 cd parallel-20??????/
 touch src/*pod src/sql
-./configure && sudo stdout make install | perl -pe 's/\d{8}/00000000/g'
+./configure && sudo stdout make install | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g'
 
 parallel which {}.hidden ::: pod2html pod2man pod2texi pod2pdf | sudo parallel mv {} {.}
diff --git a/testsuite/tests-to-run/parallel-local-ssh1.sh b/testsuite/tests-to-run/parallel-local-ssh1.sh
index 6ed33739..3c6b7fee 100644
--- a/testsuite/tests-to-run/parallel-local-ssh1.sh
+++ b/testsuite/tests-to-run/parallel-local-ssh1.sh
@@ -75,50 +75,42 @@ echo "### Test --wd \"'\""
   cat ~/"'"/uNiQuE_sTrInG.9; 
   stdout rm ~/"'"/uNiQuE_sTrInG.9
 
-echo '### Test --trc --/--foo1'
+echo '### Test --trc ./--/--foo1'
   mkdir -p ./--; echo 'Content --/--foo1' > ./--/--foo1; 
   stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1; 
   stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: --/--foo1; cat ./--/--foo1.2
 
-echo '### Test --trc :dir/:foo2'
+echo '### Test --trc ./:dir/:foo2'
   mkdir -p ./:dir; echo 'Content :dir/:foo2' > ./:dir/:foo2; 
   stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2; cat ./:dir/:foo2.1; 
   stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: :dir/:foo2; cat ./:dir/:foo2.2
 
-echo '### Test --trc " "/" "foo3'
+echo '### Test --trc ./" "/" "foo3'
   mkdir -p ./" "; echo 'Content _/_foo3' > ./" "/" "foo3; 
   stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1; 
   stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: " "/" "foo3; cat ./" "/" "foo3.2
 
-#echo '### Test --trc --/./--foo4'
-#  mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4; 
-#  stdout parallel --trc {}.1 -S lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
-#
-#echo '### Test --trc :/:foo2'
-#  mkdir -p ./:; echo 'Content :/:foo2' > ./:/:foo2; 
-#  stdout parallel --trc {}.1 -S lo '(cat {}; echo remote) > {}.1' ::: ./:/:foo2; cat ./:/:foo2.1
-#
-#echo '### Test --trc " "/" "foo3'
-#  mkdir -p ./" "; echo 'Content _/_foo2' > ./" "/" "foo3; 
-#  stdout parallel --trc {}.1 -S lo '(cat {}; echo remote) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1
-#
-#
-#
-#
-#
-#
-#echo '### Test --trc --/./--foo4 :/./:foo5 " "/./" "foo6 ./foo10/./foo10'
-#  mkdir ./--; echo 'Content --/--foo4' > ./--/--foo4; 
-#  mkdir ./:; echo 'Content :/:foo5' > ./:/:foo5; 
-#  mkdir ./" "; echo 'Content _/_foo2' > ./" "/" "foo3; 
+echo '### Test --trc ./--/./--foo4'
+  mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4; 
+  stdout parallel --trc {}.1 -S lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
 
-### echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
-### echo missing
-### echo '### Test --trc "-- "'
-### echo missing
-### echo '### Test --trc " --"'
-### echo missing
-### 
+echo '### Test --trc ./:/./:foo5'
+  mkdir -p ./:; echo 'Content :/./:foo5' > ./:/./:foo5; 
+  stdout parallel --trc {}.1 -S lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:/./:foo5; cat ./:/./:foo5.1
+
+echo '### Test --trc ./" "/./" "foo6'
+  mkdir -p ./" "; echo 'Content _/./_foo6' > ./" "/./" "foo6; 
+  stdout parallel --trc {}.1 -S lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6; cat ./" "/./" "foo6.1
+
+echo TODO
+
+## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
+## echo missing
+## echo '### Test --trc "-- "'
+## echo missing
+## echo '### Test --trc " --"'
+## echo missing
+## 
 EOF
 
 rm -rf tmp
diff --git a/testsuite/tests-to-run/parallel-local9.sh b/testsuite/tests-to-run/parallel-local9.sh
index 3e5ad02e..9af68329 100644
--- a/testsuite/tests-to-run/parallel-local9.sh
+++ b/testsuite/tests-to-run/parallel-local9.sh
@@ -33,29 +33,21 @@ echo 'bug #41613: --compress --line-buffer with --tagstring';
 
 echo 'bug #41613: --compress --line-buffer - no newline';
  echo 'pipe compress tagstring'
- perl -e 'print "O"'| parallel --compress --tagstring {#} --pipe --line-buffer cat
- echo "K"
+ perl -e 'print "O"'| parallel --compress --tagstring {#} --pipe --line-buffer cat;  echo "K"
  echo 'pipe compress notagstring'
- perl -e 'print "O"'| parallel --compress --pipe --line-buffer cat
- echo "K"
+ perl -e 'print "O"'| parallel --compress --pipe --line-buffer cat;  echo "K"
  echo 'pipe nocompress tagstring'
- perl -e 'print "O"'| parallel --tagstring {#} --pipe --line-buffer cat
- echo "K"
+ perl -e 'print "O"'| parallel --tagstring {#} --pipe --line-buffer cat;  echo "K"
  echo 'pipe nocompress notagstring'
- perl -e 'print "O"'| parallel --pipe --line-buffer cat
- echo "K"
+ perl -e 'print "O"'| parallel --pipe --line-buffer cat;  echo "K"
  echo 'nopipe compress tagstring'
- parallel --compress --tagstring {#} --line-buffer echo {} O ::: -n
- echo "K"
+ parallel --compress --tagstring {#} --line-buffer echo {} O ::: -n;  echo "K"
  echo 'nopipe compress notagstring'
- parallel --compress --line-buffer echo {} O ::: -n
- echo "K"
+ parallel --compress --line-buffer echo {} O ::: -n;  echo "K"
  echo 'nopipe nocompress tagstring'
- parallel --tagstring {#} --line-buffer echo {} O ::: -n
- echo "K"
+ parallel --tagstring {#} --line-buffer echo {} O ::: -n;  echo "K"
  echo 'nopipe nocompress notagstring'
- parallel --line-buffer echo {} O ::: -n
- echo "K"
+ parallel --line-buffer echo {} O ::: -n;  echo "K"
 
 echo 'bug #41412: --timeout + --delay causes deadlock';
   seq 10 | parallel -j10 --timeout 1 --delay .3 echo;
diff --git a/testsuite/tests-to-run/test15.sh b/testsuite/tests-to-run/test15.sh
index 80d9bc09..95d153c5 100755
--- a/testsuite/tests-to-run/test15.sh
+++ b/testsuite/tests-to-run/test15.sh
@@ -35,9 +35,9 @@ _EOF
 echo
 cat <<'EOF' | parallel -vj0 -k -L1
 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; 
   parallel --timeout 3 'true {} ; for i in `seq 100 120`; do bash -c "(sleep $i)" & sleep $i & done; wait; echo No good' ::: 1000000000 1000000001 ; 
-  echo $?; sleep 7; pstree | grep sleep | grep -v anacron | grep -v screensave | wc
+  echo $?; sleep 2; pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc
 
 echo '### Test -L -l and --max-lines'
 (echo a_b;echo c) | parallel -km -L2 echo
diff --git a/testsuite/wanted-results/niceload02 b/testsuite/wanted-results/niceload02
index a9f11912..524c7575 100644
--- a/testsuite/wanted-results/niceload02
+++ b/testsuite/wanted-results/niceload02
@@ -4,3 +4,4 @@
 ### Test -p
 ...OK
 ### Test --sensor -l negative
+more than 6 GB used
diff --git a/testsuite/wanted-results/parallel-install b/testsuite/wanted-results/parallel-install
index 390dfb8c..33c8875c 100644
--- a/testsuite/wanted-results/parallel-install
+++ b/testsuite/wanted-results/parallel-install
@@ -1,11 +1,11 @@
 ### Test installation missing pod2*
-make[1]: Entering directory `/home/tange/privat/parallel'
+make[0]: Entering directory `/home/tange/privat/parallel'
 if test -d "parallel-00000000"; then find "parallel-00000000" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "parallel-00000000" || { sleep 5 && rm -rf "parallel-00000000"; }; else :; fi
 test -d "parallel-00000000" || mkdir "parallel-00000000"
  (cd src && make  top_distdir=../parallel-00000000 distdir=../parallel-00000000/src \
      am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
-make[2]: Entering directory `/home/tange/privat/parallel/src'
-make[2]: Leaving directory `/home/tange/privat/parallel/src'
+make[0]: Entering directory `/home/tange/privat/parallel/src'
+make[0]: Leaving directory `/home/tange/privat/parallel/src'
 test -n "" \
 	|| find "parallel-00000000" -type d ! -perm -755 \
 		-exec chmod u+rwx,go+rx {} \; -o \
@@ -15,7 +15,7 @@ test -n "" \
 	|| chmod -R a+r "parallel-00000000"
 tardir=parallel-00000000 && ${TAR-tar} chof - "$tardir" | GZIP=--best gzip -c >parallel-00000000.tar.gz
 if test -d "parallel-00000000"; then find "parallel-00000000" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "parallel-00000000" || { sleep 5 && rm -rf "parallel-00000000"; }; else :; fi
-make[1]: Leaving directory `/home/tange/privat/parallel'
+make[0]: Leaving directory `/home/tange/privat/parallel'
 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for a thread-safe mkdir -p... /bin/mkdir -p
@@ -26,7 +26,7 @@ config.status: creating Makefile
 config.status: creating src/Makefile
 config.status: creating config.h
 Making install in src
-make[1]: Entering directory `/tmp/parallel-00000000/src'
+make[0]: Entering directory `/tmp/parallel-00000000/src'
 pod2man --release='00000000' --center='parallel' \
 		--section=1 ./parallel.pod > ./parallel.1n \
 	&& mv ./parallel.1n ./parallel.1 \
@@ -127,7 +127,7 @@ pod2pdf --output-file ./parallel_tutorial.pdf ./parallel_tutorial.pod --title "G
 	|| echo "Warning: pod2pdf not found. Using old parallel_tutorial.pdf"
 /bin/bash: pod2pdf: command not found
 Warning: pod2pdf not found. Using old parallel_tutorial.pdf
-make[2]: Entering directory `/tmp/parallel-00000000/src'
+make[0]: Entering directory `/tmp/parallel-00000000/src'
  /bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c parallel sem sql niceload '/usr/local/bin'
 pod2html ./parallel.pod > ./parallel.htmln \
@@ -234,11 +234,11 @@ pod2man --release='00000000' --center='parallel' \
 Warning: pod2man not found. Using old parallel_tutorial.1
  /bin/mkdir -p '/usr/local/share/man/man1'
  /usr/bin/install -c -m 644 parallel.1 sem.1 sql.1 niceload.1 parallel_tutorial.1 '/usr/local/share/man/man1'
-make[2]: Leaving directory `/tmp/parallel-00000000/src'
-make[1]: Leaving directory `/tmp/parallel-00000000/src'
-make[1]: Entering directory `/tmp/parallel-00000000'
-make[2]: Entering directory `/tmp/parallel-00000000'
-make[2]: Nothing to be done for `install-exec-am'.
-make[2]: Nothing to be done for `install-data-am'.
-make[2]: Leaving directory `/tmp/parallel-00000000'
-make[1]: Leaving directory `/tmp/parallel-00000000'
+make[0]: Leaving directory `/tmp/parallel-00000000/src'
+make[0]: Leaving directory `/tmp/parallel-00000000/src'
+make[0]: Entering directory `/tmp/parallel-00000000'
+make[0]: Entering directory `/tmp/parallel-00000000'
+make[0]: Nothing to be done for `install-exec-am'.
+make[0]: Nothing to be done for `install-data-am'.
+make[0]: Leaving directory `/tmp/parallel-00000000'
+make[0]: Leaving directory `/tmp/parallel-00000000'
diff --git a/testsuite/wanted-results/parallel-local-ssh1 b/testsuite/wanted-results/parallel-local-ssh1
index 8284c456..844ea10e 100644
--- a/testsuite/wanted-results/parallel-local-ssh1
+++ b/testsuite/wanted-results/parallel-local-ssh1
@@ -98,46 +98,48 @@ echo "### Test --wd \"'\""
 ### Test --wd "'"
   stdout parallel --wd "'" -S lo echo OK ">"{}.9 ::: uNiQuE_sTrInG;   cat ~/"'"/uNiQuE_sTrInG.9;   stdout rm ~/"'"/uNiQuE_sTrInG.9
 OK
-echo '### Test --trc --/--foo1'
-### Test --trc --/--foo1
+echo '### Test --trc ./--/--foo1'
+### Test --trc ./--/--foo1
   mkdir -p ./--; echo 'Content --/--foo1' > ./--/--foo1;   stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1;   stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: --/--foo1; cat ./--/--foo1.2
 Content --/--foo1
 remote1
 Content --/--foo1
 remote2
-echo '### Test --trc :dir/:foo2'
-### Test --trc :dir/:foo2
+echo '### Test --trc ./:dir/:foo2'
+### Test --trc ./:dir/:foo2
   mkdir -p ./:dir; echo 'Content :dir/:foo2' > ./:dir/:foo2;   stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2; cat ./:dir/:foo2.1;   stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: :dir/:foo2; cat ./:dir/:foo2.2
 Content :dir/:foo2
 remote1
 Content :dir/:foo2
 remote2
-echo '### Test --trc " "/" "foo3'
-### Test --trc " "/" "foo3
+echo '### Test --trc ./" "/" "foo3'
+### Test --trc ./" "/" "foo3
   mkdir -p ./" "; echo 'Content _/_foo3' > ./" "/" "foo3;   stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1;   stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: " "/" "foo3; cat ./" "/" "foo3.2
 Content _/_foo3
 remote1
 Content _/_foo3
 remote2
-#echo '### Test --trc --/./--foo4'
-#  mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4; #  stdout parallel --trc {}.1 -S lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
-#
-#echo '### Test --trc :/:foo2'
-#  mkdir -p ./:; echo 'Content :/:foo2' > ./:/:foo2; #  stdout parallel --trc {}.1 -S lo '(cat {}; echo remote) > {}.1' ::: ./:/:foo2; cat ./:/:foo2.1
-#
-#echo '### Test --trc " "/" "foo3'
-#  mkdir -p ./" "; echo 'Content _/_foo2' > ./" "/" "foo3; #  stdout parallel --trc {}.1 -S lo '(cat {}; echo remote) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1
-#
-#
-#
-#
-#
-#
-#echo '### Test --trc --/./--foo4 :/./:foo5 " "/./" "foo6 ./foo10/./foo10'
-#  mkdir ./--; echo 'Content --/--foo4' > ./--/--foo4; #  mkdir ./:; echo 'Content :/:foo5' > ./:/:foo5; #  mkdir ./" "; echo 'Content _/_foo2' > ./" "/" "foo3; ### echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
-### echo missing
-### echo '### Test --trc "-- "'
-### echo missing
-### echo '### Test --trc " --"'
-### echo missing
-### 
+echo '### Test --trc ./--/./--foo4'
+### Test --trc ./--/./--foo4
+  mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4;   stdout parallel --trc {}.1 -S lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
+Content --/./--foo4
+remote--/./--foo4
+echo '### Test --trc ./:/./:foo5'
+### Test --trc ./:/./:foo5
+  mkdir -p ./:; echo 'Content :/./:foo5' > ./:/./:foo5;   stdout parallel --trc {}.1 -S lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:/./:foo5; cat ./:/./:foo5.1
+Content :/./:foo5
+remote./:/./:foo5
+echo '### Test --trc ./" "/./" "foo6'
+### Test --trc ./" "/./" "foo6
+  mkdir -p ./" "; echo 'Content _/./_foo6' > ./" "/./" "foo6;   stdout parallel --trc {}.1 -S lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6; cat ./" "/./" "foo6.1
+Content _/./_foo6
+remote./ /./ foo6
+echo TODO
+TODO
+## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
+## echo missing
+## echo '### Test --trc "-- "'
+## echo missing
+## echo '### Test --trc " --"'
+## echo missing
+## 
diff --git a/testsuite/wanted-results/parallel-local-ssh2 b/testsuite/wanted-results/parallel-local-ssh2
index 9dac8b40..7ce13f1f 100644
--- a/testsuite/wanted-results/parallel-local-ssh2
+++ b/testsuite/wanted-results/parallel-local-ssh2
@@ -23,6 +23,6 @@ Exit code 1
 echo '### bug #42725: csh with \n in variables'
 ### bug #42725: csh with \n in variables
   not_csh() { echo This is not csh/tcsh; };   export -f not_csh;   parallel --env not_csh -S csh@lo not_csh ::: 1;   parallel --env not_csh -S tcsh@lo not_csh ::: 1;   parallel --env not_csh -S parallel@lo not_csh ::: 1; 
-CSH/TCSH DO NOT SUPPORT newlines IN VARIABLES/FUNCTIONS
-CSH/TCSH DO NOT SUPPORT newlines IN VARIABLES/FUNCTIONS
+CSH/TCSH DO NOT SUPPORT newlines IN VARIABLES/FUNCTIONS
+CSH/TCSH DO NOT SUPPORT newlines IN VARIABLES/FUNCTIONS
 This is not csh/tcsh
diff --git a/testsuite/wanted-results/parallel-local18 b/testsuite/wanted-results/parallel-local18
index 101a1b10..b36cd27d 100644
--- a/testsuite/wanted-results/parallel-local18
+++ b/testsuite/wanted-results/parallel-local18
@@ -30,9 +30,6 @@ a'   * ? >o  o