Bug and stress fixes for --sshlogin. Better unittests.

This commit is contained in:
Ole Tange 2010-05-27 08:09:28 +02:00
parent 26868cdc4f
commit 55fa0189fb
28 changed files with 1719 additions and 187 deletions

View file

@ -191,7 +191,7 @@ use B<-I> instead.
=item B<-P> I<N>
Run up to N jobs in parallel. 0 means as many as possible. Default is 10.
Run up to N jobs in parallel. 0 means as many as possible. Default is 9.
=item B<--jobs> I<+N>
@ -356,14 +356,17 @@ to do anything.
=item B<--sshlogin> I<[ncpu/]sshlogin[,[ncpu/]sshlogin[,...]]> (beta testing)
Distribute jobs to remote servers. The jobs will be run on a list of
remote servers. GNU B<parallel> will determine the number of CPU cores on
the remote servers and run the number of jobs as specified by B<-j>. If
the number I<ncpu> is given GNU B<parallel> will use this number for
number of CPUs on the host. Normally I<ncpu> will not be needed.
remote servers. GNU B<parallel> will determine the number of CPU
cores on the remote servers and run the number of jobs as specified by
B<-j>. If the number I<ncpu> is given GNU B<parallel> will use this
number for number of CPUs on the host. Normally I<ncpu> will not be
needed.
An I<sshlogin> is the string you would normally pass to SSH to login,
e.g. I<server.example.com>, I<foo@server.example.com>, or I<"-l foo -p
2222 server.example.com">. The sshlogin must not require a password.
An I<sshlogin> is of the form:
[sshcommand [options]][username@]hostname
The sshlogin must not require a password.
The sshlogin ':' is special, it means 'no ssh' and will therefore run
on the local machine.
@ -386,8 +389,12 @@ lines. Empty lines and lines starting with '#' are ignored. Example:
8/my-8-core-server.example.com
2/myusername@my-dualcore.example.net
# This server has SSH running on port 2222
-p 2222 server.example.net
4/-p 2222 quadserver.example.net
ssh -p 2222 server.example.net
4/ssh -p 2222 quadserver.example.net
# Use a different ssh program
myssh -p 2222 -l compute hexacpu.example.net
/usr/local/bin/myssh -p 2222 -l compute hexacpu.example.net
6//usr/local/bin/myssh -p 2222 -l compute hexacpu.example.net
# Assume 16 cores on the local machine
16/:
@ -961,7 +968,7 @@ B<ls | parallel "wc {} >> B<{}.wc">
becomes
B<ls | xargs -d "\n" -P10 -I {} bash -c "wc {} >>B< {}.wc">
B<ls | xargs -d "\n" -P9 -I {} bash -c "wc {} >>B< {}.wc">
and
@ -969,7 +976,7 @@ B<ls | parallel "echo {}; ls {}|wc">
becomes
B<ls | xargs -d "\n" -P10 -I {} bash -c "echo {}; ls {}|wc">
B<ls | xargs -d "\n" -P9 -I {} bash -c "echo {}; ls {}|wc">
=head1 DIFFERENCES BETWEEN mdm/middleman AND parallel
@ -1161,6 +1168,7 @@ sub parse_options {
$Global::argfile = *STDIN;
$Global::interactive = 0;
$Global::stderr_verbose = 0;
$Global::default_simultaneous_sshlogins = 9;
Getopt::Long::Configure ("bundling","require_order");
GetOptions("debug|D" => \$::opt_D,
@ -1275,10 +1283,9 @@ sub parse_options {
}
} else {
for my $sshlogin (keys %Global::host) {
$Global::host{$sshlogin}{'max_no_of_running'} = 10;
$Global::host{$sshlogin}{'max_no_of_running'} = $Global::default_simultaneous_sshlogins;
}
}
$Global::job_end_sequence=1;
}
@ -1288,7 +1295,7 @@ sub parse_options {
sub no_extension {
my $no_ext = shift;
$no_ext =~ s/\.[^\.]*$//; # Remove .ext from argument
$no_ext =~ s:\.[^/\.]*$::; # Remove .ext from argument
return $no_ext;
}
@ -1517,6 +1524,7 @@ sub processes_available_by_system_limit {
# Limit them to the system limits
# Limits are: File handles, number of input lines, processes,
# and taking > 1 second to spawn 10 extra processes
my $wanted_processes = shift;
my $sshlogin = shift;
my $system_limit=0;
@ -1600,9 +1608,45 @@ sub processes_available_by_system_limit {
wait();
# Cleanup: Unget the command_lines (and args_refs)
unget_command_line(@command_lines);
if($sshlogin ne ":" and $system_limit > $Global::default_simultaneous_sshlogins) {
$system_limit = simultaneous_sshlogin_limit($sshlogin,$system_limit);
}
return $system_limit;
}
sub simultaneous_sshlogin {
my $sshlogin = shift;
my $wanted_processes = shift;
my ($sshcmd,$serverlogin) = sshcommand_of_sshlogin($sshlogin);
my $cmd = "$sshcmd $serverlogin echo simultaneouslogin 2>&1 &"x$wanted_processes;
open (SIMUL, "($cmd)|grep simultaneouslogin | wc -l|") or die;
my $ssh_limit = <SIMUL>;
close SIMUL;
chomp $ssh_limit;
return $ssh_limit;
}
sub simultaneous_sshlogin_limit {
# Test by logging in wanted number of times simultaneously
# (ssh e echo simultaneouslogin &ssh e echo simultaneouslogin &...)|grep simul|wc -l
# Return min($wanted_processes,$working_simultaneous_ssh_logins-1)
my $sshlogin = shift;
my $wanted_processes = shift;
my ($sshcmd,$serverlogin) = sshcommand_of_sshlogin($sshlogin);
# Try twice because it guesses wrong sometimes
# Choose the minimal
my $ssh_limit = min(simultaneous_sshlogin($sshlogin,$wanted_processes),
simultaneous_sshlogin($sshlogin,$wanted_processes));
if($ssh_limit < $wanted_processes) {
print STDERR ("Warning: ssh to $serverlogin only allows for $ssh_limit simultaneous logins.\n",
"You may raise this by changing /etc/ssh/sshd_config:MaxStartup on $serverlogin\n",
"Using only ",$ssh_limit-1," connections to avoid race conditions\n");
}
# Race condition can cause problem if using all sshs.
if($ssh_limit > 1) { $ssh_limit -= 1; }
return $ssh_limit;
}
sub enough_file_handles {
# check that we have enough filehandles available for starting
# another job
@ -1662,13 +1706,19 @@ sub no_of_cores {
sub no_of_cpus_sshlogin {
# Number of CPUs at this sshlogin
my $sshlogin = shift;
my ($sshcmd,$serverlogin) = sshcommand_of_sshlogin($sshlogin);
if(not $Global::host{$sshlogin}{'ncpus'}) {
if($sshlogin eq ":") {
if($serverlogin eq ":") {
$Global::host{$sshlogin}{'ncpus'} = no_of_cpus();
} else {
my $ncpu = qx(echo|ssh $sshlogin parallel --number-of-cpus);
my $ncpu = qx(echo|$sshcmd $serverlogin parallel --number-of-cpus);
chomp($ncpu);
$Global::host{$sshlogin}{'ncpus'} = $ncpu;
if($ncpu =~ /^[0-9]+$/) {
$Global::host{$sshlogin}{'ncpus'} = $ncpu;
} else {
print STDERR ("Warning: Could not figure out number of cpus on $serverlogin. Using 1");
$Global::host{$sshlogin}{'ncpus'} = 1;
}
}
}
return $Global::host{$sshlogin}{'ncpus'};
@ -1724,11 +1774,33 @@ sub no_of_cpus_solaris {
return undef;
}
#
# General useful library functions
#
sub min {
my $min = shift;
my @args = @_;
for my $a (@args) {
$min = ($min < $a) ? $min : $a;
}
return $min;
}
#
# Running and printing the jobs
#
# Variable structure:
# $Global::running{$pid}{'seq'} = printsequence
# $Global::running{$pid}{sshlogin} = server to run on
# $Global::host{$sshlogin}{'no_of_running'} = number of currently running jobs
# $Global::host{$sshlogin}{'ncpus'} = number of cpus
# $Global::host{$sshlogin}{'maxlength'} = max line length (currently buggy for remote)
# $Global::host{$sshlogin}{'max_no_of_running'} = number of currently running jobs
# $Global::running_jobs = total number of running jobs
sub init_run_jobs {
# Remember the original STDOUT and STDERR
open $Global::original_stdout, ">&STDOUT" or die "Can't dup STDOUT: $!";
@ -1749,24 +1821,37 @@ sub login_and_host {
sub next_command_line_with_sshlogin {
my $sshlogin = shift;
my ($next_command_line, $args_ref) = next_command_line();
my ($sshcmd,$serverlogin) = sshcommand_of_sshlogin($sshlogin);
my ($pre,$post)=("","");
if($next_command_line and $sshlogin ne ":") {
my $remote = login_and_host($sshlogin);
if($next_command_line and $serverlogin ne ":") {
for my $file (@$args_ref) {
$file =~ s:^([^/]):./$1:; # If relative path: prepend ./ (to avoid problems with ':')
$file =~ s:/\./:/:g; # Rsync treats /./ special. We dont want that
my $noext = no_extension($file); # Remove .ext before prepending ./
my $relpath = ($file !~ m:^/:); # Is the path relative?
# If relative path: prepend ./ (to avoid problems with ':')
$noext = ($relpath ? "./".$noext : $noext);
my $rsync_opt = "-rlDzR -e".shell_quote($sshcmd);
# Use different subdirs depending on abs or rel path
my $rsync_destdir = ($relpath ? "./" : "/");
if($::opt_transfer) {
$pre = "rsync -az $file $remote:".shell_quote($file)." ;";
# --transfer
# Abs path: rsync -rlDzR /home/tange/dir/subdir/file.gz server:/
# Rel path: rsync -rlDzR ./subdir/file.gz server:./
$pre = "rsync $rsync_opt $file $serverlogin:$rsync_destdir ;";
}
for my $ret_file (@Global::ret_files) {
my $remove = $::opt_cleanup ? "--remove-source-files" : "";
my $replaced = context_replace($ret_file,[$file],[no_extension($file)]);
$post .= "rsync -az $remove $remote:".shell_quote($replaced)." $replaced ;";
my $replaced = context_replace($ret_file,[$file],[$noext]);
# --return
# Abs path: rsync -rlDzR server:/home/tange/dir/subdir/file.gz /
# Rel path: rsync -rlDzR server:./subsir/file.gz ./
$post .= "rsync $rsync_opt $remove $serverlogin:".shell_quote($replaced)." $rsync_destdir ;";
}
if($::opt_cleanup) {
$post .= "ssh $sshlogin rm ".shell_quote($file).";";
$post .= "$sshcmd $serverlogin rm -f ".shell_quote($file).";";
}
}
return "$pre ssh $sshlogin ".shell_quote($next_command_line)."; $post";
return "$pre$sshcmd $serverlogin ".shell_quote($next_command_line)."; $post";
} else {
return $next_command_line;
}
@ -1989,7 +2074,7 @@ sub print_job {
}
#
# Remote ssh stuff
# Remote ssh
#
sub read_sshloginfile {
@ -2011,9 +2096,11 @@ sub parse_sshlogin {
push (@login, (split /,/, $sshlogin));
}
for my $sshlogin (@login) {
if($sshlogin =~ s:^(\d+)/::) {
# Override default autodetected ncpus
$Global::host{$sshlogin}{'ncpus'} = $1;
if($sshlogin =~ s:^(\d*)/::) {
# Override default autodetected ncpus unless zero or missing
if($1) {
$Global::host{$sshlogin}{'ncpus'} = $1;
}
}
$Global::host{$sshlogin}{'no_of_running'} = 0;
$Global::host{$sshlogin}{'maxlength'} = max_length_of_command_line();
@ -2021,9 +2108,25 @@ sub parse_sshlogin {
debug("sshlogin: ", my_dump(%Global::host));
}
sub sshcommand_of_sshlogin {
# 'server' -> ('ssh','server')
# 'user@server' -> ('ssh','user@server')
# 'myssh user@server' -> ('myssh','user@server')
# 'myssh -l user server' -> ('myssh -l user','server')
# '/usr/local/bin/myssh -l user server' -> ('/usr/local/bin/myssh -l user','server')
my $sshlogin = shift;
my ($sshcmd, $serverlogin);
if($sshlogin =~ /(.+) (\S+)$/) {
$sshcmd = $1; $serverlogin = $2;
} else {
$sshcmd = "ssh"; $serverlogin = $sshlogin;
}
return ($sshcmd, $serverlogin);
}
#
# Signal handling stuff
# Signal handling
#
sub ListRunningJobs {
@ -2206,32 +2309,25 @@ $main::opt_version = $main::opt_L = $main::opt_l =
$main::opt_show_limits = $main::opt_n = $main::opt_e = $main::opt_verbose =
$main::opt_E = $main::opt_r = $Global::xargs = $Global::keeporder = 0;
# Per host variables:
# Can depend on OS
#$Global::command_line_max_len =
# Can depend on processes_available_by_system_limit
#$Global::processes_to_run =
#
# $sshlogin, $ncpus
# $Global::running_jobs = 0;
# $Global::running{$pid}{'seq'} = printsequence
# $Global::running{$pid}{sshlogin} = server to run on
# $Global::host{sshlogin}{'no_of_running'} = number of currently running jobs
# $Global::host{sshlogin}{'ncpus'} = number of cpus
# $Global::host{sshlogin}{'maxlength'} = $Global::command_line_max_len
# $Global::host{sshlogin}{'max_no_of_running'} = number of currently running jobs
# $Global::running_jobs = sum $Global::host{sshlogin}{'no_of_running'}
# Hvordan udregnes system limits på remote systems hvis jeg ikke ved, hvormange
# argumenter, der er? Lav system limits lokalt og lad det være max
# Compress ide: identificer blokke af samme type (ascii binary picture
# sound). Flyt dem rundt, så de står ved siden af hinanden. Kompremer
# blokkene samlet med den mest egnede algoritme.
# Moved parse options to parse_options
# TODO max_line_length on remote
# TODO compute how many can be transferred within max_line_length
# TODO Unittest with filename that is long and requires a lot of quoting. Will there be to many
# TODO Unittest --trc without -S should warn
# TODO Unittest --transfer file called ' : & ) *.jpg'
# TODO Unittest --trc/--transfer/--return without -S should warn
# TODO --max-number-of-jobs print the system limited number of jobs
# TODO Unittest with dir containing . and file with noextension and {.}
#=item B<--sshlogin> I<[ncpu/]sshlogin[,[ncpu/]sshlogin[,...]]> (beta testing)
# Skilletegn:
# No: "#!&()?\<>|;*'~ shellspecial
# No: @.- part of user@i.p.n.r i.p.n.r host-name
# No: , separates different sshlogins
# No: space Will make it hard to do: 8/server1,server2
# Maybe: / 8//usr/bin/myssh,//usr/bin/ssh
# %/=:_^
# Check transfer of newline file to sshlogin with own ssh and more than 9 simultaneously
# TODO Unittest seq 1 11 | parallel --trc -j10000% -S "myssh -l tange nlv.pi.dk" echo

View file

@ -1,6 +1,7 @@
unittest: ../src/parallel tests-to-run/* wanted-results/*
echo | mop || (echo mop is required for unittest; /bin/false)
seq 1 2 | mop || (echo seq is required for unittest; /bin/false)
stdout echo || (echo stdout is required for unittest; /bin/false)
sh Start.sh
clean:

View file

@ -1,4 +1,7 @@
#!/bin/bash
ls -t tests-to-run/test*.sh | perl -pe 's:(.*/(.*)).sh:sh $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2:' | sh -x
ls -t tests-to-run/test*.sh \
| perl -pe 's:(.*/(.*)).sh:sh $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2:' \
| sh -x

View file

@ -1,3 +1,4 @@
### Test -k
begin
1
2
@ -30,6 +31,7 @@ begin
29
30
end
### Test SIGTERM
1
2
3
@ -48,5 +50,3 @@ end
16
17
18
19
20

View file

@ -1,4 +1,6 @@
### Test weird regexp chars
a1b1^c1[.}c a2b2^c2[.}c a3b3^c3[.}c a4b4^c4[.}c a5b5^c5[.}c a6b6^c6[.}c
### Test {.} and {}
ls 1-col.diff|wc;echo 1-col.diff
1 1 11
1-col.diff
@ -12,10 +14,10 @@ ls 2-col.txt|wc;echo 2-col.txt
1 1 10
2-col.txt
ls a|wc;echo a
3 3 13
6 6 41
a
ls b|wc;echo b
2 2 8
4 4 26
b
ls 中国\ \(Zhōngguó\)|wc;echo 中国\ \(Zhōngguó\)
4 12 118
@ -24,15 +26,15 @@ ls 中国\ \(Zhōngguó\)|wc;echo 中国\ \(Zhōngguó\)
1 1-col.txt
1 2-col.diff
1 2-col.txt
3 a
2 b
6 a
4 b
4 中国 (Zhōngguó)
1 1-col.diff
1 1-col.txt
1 2-col.diff
1 2-col.txt
3 a
2 b
6 a
4 b
4 中国 (Zhōngguó)
touch -- 1-col/abc-1-col-1-col
touch -- 1-col/abc-1-col-1-col.diff
@ -52,23 +54,29 @@ rm -- 2-col/abc-2-col-2-col.txt
rm -- a/abc-a-a
rm -- b/abc-b-b
rm -- 中国\ \(Zhōngguó\)/abc-中国\ \(Zhōngguó\)-中国\ \(Zhōngguó\)
### Test -m
1foo bar joe.gif2foo bar joe3 Afoo bar joeBfoo bar joeC
1foo2foo3 1bar2bar3 1joe.gif2joe3 AfooBfooC AbarBbarC AjoeBjoeC
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif b1 2 3 4 5 6 c1 2 3 4 5 6
a1.gifb1c1 a 2.gifb 2c 2 a 3.gifb 3c 3 a 4.gifb 4c 4 a 5.gifb 5c 5 a 6.gifb 6c 6 abc
### Test -m with 60000 args
98c94dcab1efedab3f820935d230bc77 -
12 180011 1286837
### Test -X with 60000 args
12de4813eda45d364a51bef697eee299 -
13 120000 1586682
### Test -X with 60000 args and 5 expansions
19
15
13
10
7
### Test -I with shell meta chars
9
9
9
9
### Test {.}
'a'
'a'
begin
@ -103,6 +111,7 @@ begin
29
30
end
### Test -I with -X and -m
1 1
2 1
2 2
@ -178,11 +187,15 @@ a7 b1 2 3 4 5 6 7
a8 b1 2 3 4 5 6 7 8
a9 b1 2 3 4 5 6 7 8 9
a10 b1 2 3 4 5 6 7 8 9 10
### Test -i
replace
### Test --replace
replace
### Test -t
echo bar
echo car
echo far
### Test --verbose
echo bar
echo car
echo far

View file

@ -1,53 +1,578 @@
1
2
3
sleep 1; echo 2
2
sleep 1; echo 1
1
ssh nlv.pi.dk sleep\ 1\;\ echo\ 3;
3
sleep 1; echo \>/tmp/fire
>/tmp/fire
sleep 1; echo 5
5
ssh nlv.pi.dk sleep\ 1\;\ echo\ 6;
6
sleep 1; echo 7
7
sleep 1; echo 8
8
ssh nlv.pi.dk sleep\ 1\;\ echo\ 9;
9
sleep 1; echo 10
10
sleep 1; hostname; echo 1
alpha
1
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 2;
nlv.pi.dk
2
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 3;
nlv.pi.dk
3
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ \\\>/tmp/fire;
nlv.pi.dk
>/tmp/fire
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 5;
nlv.pi.dk
5
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 6;
nlv.pi.dk
6
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 7;
nlv.pi.dk
7
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 8;
nlv.pi.dk
8
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 9;
nlv.pi.dk
9
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 10;
nlv.pi.dk
10
### Test --transfer --return --cleanup
### --transfer - abspath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
### --transfer - relpath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access tmp/parallel.file*: No such file or directory
### --transfer - file with newline
### --transfer --cleanup - abspath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
### --transfer --cleanup - relpath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access tmp/parallel.file*: No such file or directory
OK
### --transfer --cleanup - file with newline
### --return - abspath
/tmp/parallel.file10.out
/tmp/parallel.file13.out
/tmp/parallel.file14.out
/tmp/parallel.file15.out
/tmp/parallel.file16.out
/tmp/parallel.file17.out
/tmp/parallel.file18.out
/tmp/parallel.file19.out
/tmp/parallel.file1.out
/tmp/parallel.file20.out
/tmp/parallel.file2.out
/tmp/parallel.file3.out
/tmp/parallel.file5.out
/tmp/parallel.file6.out
/tmp/parallel.file7.out
/tmp/parallel.file8.out
/tmp/parallel.file9.out
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.out
### --return - relpath
tmp/parallel.file10.out
tmp/parallel.file13.out
tmp/parallel.file14.out
tmp/parallel.file15.out
tmp/parallel.file16.out
tmp/parallel.file17.out
tmp/parallel.file18.out
tmp/parallel.file19.out
tmp/parallel.file1.out
tmp/parallel.file20.out
tmp/parallel.file2.out
tmp/parallel.file3.out
tmp/parallel.file5.out
tmp/parallel.file6.out
tmp/parallel.file7.out
tmp/parallel.file8.out
tmp/parallel.file9.out
tmp/parallel.file>fire.out
tmp/parallel.file : & ) \n*.jpg.out
tmp/parallel.file/sub dir.out
### --return - file with newline
### --return - multiple files
tmp/parallel.file10.file.done
tmp/parallel.file10.out
tmp/parallel.file13.file.done
tmp/parallel.file13.out
tmp/parallel.file14.file.done
tmp/parallel.file14.out
tmp/parallel.file15.file.done
tmp/parallel.file15.out
tmp/parallel.file16.file.done
tmp/parallel.file16.out
tmp/parallel.file17.file.done
tmp/parallel.file17.out
tmp/parallel.file18.file.done
tmp/parallel.file18.out
tmp/parallel.file19.file.done
tmp/parallel.file19.out
tmp/parallel.file1.file.done
tmp/parallel.file1.out
tmp/parallel.file20.file.done
tmp/parallel.file20.out
tmp/parallel.file2.file.done
tmp/parallel.file2.out
tmp/parallel.file3.file.done
tmp/parallel.file3.out
tmp/parallel.file5.file.done
tmp/parallel.file5.out
tmp/parallel.file6.file.done
tmp/parallel.file6.out
tmp/parallel.file7.file.done
tmp/parallel.file7.out
tmp/parallel.file8.file.done
tmp/parallel.file8.out
tmp/parallel.file9.file.done
tmp/parallel.file9.out
tmp/parallel.file>fire.file.done
tmp/parallel.file>fire.out
tmp/parallel.file : & ) \n*.jpg.file.done
tmp/parallel.file : & ) \n*.jpg.out
tmp/parallel.file/sub dir.file.done
tmp/parallel.file/sub dir.out
### --return --cleanup - abspath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --return --cleanup - relpath
tmp/parallel.file10.file.done
tmp/parallel.file10.out
tmp/parallel.file13.file.done
tmp/parallel.file13.out
tmp/parallel.file14.file.done
tmp/parallel.file14.out
tmp/parallel.file15.file.done
tmp/parallel.file15.out
tmp/parallel.file16.file.done
tmp/parallel.file16.out
tmp/parallel.file17.file.done
tmp/parallel.file17.out
tmp/parallel.file18.file.done
tmp/parallel.file18.out
tmp/parallel.file19.file.done
tmp/parallel.file19.out
tmp/parallel.file1.file.done
tmp/parallel.file1.out
tmp/parallel.file20.file.done
tmp/parallel.file20.out
tmp/parallel.file2.file.done
tmp/parallel.file2.out
tmp/parallel.file3.file.done
tmp/parallel.file3.out
tmp/parallel.file5.file.done
tmp/parallel.file5.out
tmp/parallel.file6.file.done
tmp/parallel.file6.out
tmp/parallel.file7.file.done
tmp/parallel.file7.out
tmp/parallel.file8.file.done
tmp/parallel.file8.out
tmp/parallel.file9.file.done
tmp/parallel.file9.out
tmp/parallel.file>fire.file.done
tmp/parallel.file>fire.out
tmp/parallel.file : & ) \n*.jpg.file.done
tmp/parallel.file : & ) \n*.jpg.out
tmp/parallel.file/sub dir.file.done
tmp/parallel.file/sub dir.out
good if no file
ls: cannot access tmp/parallel.file*: No such file or directory
OK
### --return --cleanup - file with newline
### --return --cleanup - multiple returns
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access tmp/parallel.file*: No such file or directory
OK
### --transfer --return --cleanup - abspath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --transfer --return --cleanup - relpath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access tmp/parallel.file*: No such file or directory
OK
### --transfer --return --cleanup - file with newline
### --transfer --return --cleanup - multiple files
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
ls: cannot access tmp/parallel.file*: No such file or directory
OK
### --trc - abspath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --trc - relpath
tmp/parallel.file10.file.done
tmp/parallel.file10.out
tmp/parallel.file13.file.done
tmp/parallel.file13.out
tmp/parallel.file14.file.done
tmp/parallel.file14.out
tmp/parallel.file15.file.done
tmp/parallel.file15.out
tmp/parallel.file16.file.done
tmp/parallel.file16.out
tmp/parallel.file17.file.done
tmp/parallel.file17.out
tmp/parallel.file18.file.done
tmp/parallel.file18.out
tmp/parallel.file19.file.done
tmp/parallel.file19.out
tmp/parallel.file1.file.done
tmp/parallel.file1.out
tmp/parallel.file20.file.done
tmp/parallel.file20.out
tmp/parallel.file2.file.done
tmp/parallel.file2.out
tmp/parallel.file3.file.done
tmp/parallel.file3.out
tmp/parallel.file5.file.done
tmp/parallel.file5.out
tmp/parallel.file6.file.done
tmp/parallel.file6.out
tmp/parallel.file7.file.done
tmp/parallel.file7.out
tmp/parallel.file8.file.done
tmp/parallel.file8.out
tmp/parallel.file9.file.done
tmp/parallel.file9.out
tmp/parallel.file>fire.file.done
tmp/parallel.file>fire.out
tmp/parallel.file : & ) \n*.jpg.file.done
tmp/parallel.file : & ) \n*.jpg.out
tmp/parallel.file/sub dir.file.done
tmp/parallel.file/sub dir.out
good if no file
ls: cannot access tmp/parallel.file*: No such file or directory
OK
### --trc - file with newline
### --trc - multiple files
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK

View file

@ -0,0 +1,72 @@
### Test --sshlogin -S --sshloginfile
1
2
3
### Test --sshloginfile with extra content
1
2
3
4
5
6
7
8
9
10
### Check forced number of CPUs being respected
alpha
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
alpha
alpha
alpha
alpha
alpha
alpha
alpha
alpha
alpha
alpha
### Check more than 9 simultaneous sshlogins
1
2
3
4
5
6
7
8
9
10
11
### Check more than 9(relative) simultaneous sshlogins
1
2
3
4
5
6
7
8
9
10
11
### Check -S syntax
1
2
3
4
5
6
7
8
9
10
11

0
unittest/tests-to-run/test01.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test02.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test03.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test04.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test05.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test06.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test08.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test09.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test10.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test11.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test12.sh Normal file → Executable file
View file

4
unittest/tests-to-run/test13.sh Normal file → Executable file
View file

@ -2,10 +2,10 @@
PAR=parallel
# Test -k
echo '### Test -k'
ulimit -n 50
(echo "sleep 3; echo begin"; seq 1 30 | $PAR -kq echo "sleep 1; echo {}"; echo "echo end") \
| $PAR -k -j0
# Test SIGTERM
echo '### Test SIGTERM'
(sleep 5; killall $PAR -TERM) & seq 1 100 | $PAR -k sleep 3';' echo

0
unittest/tests-to-run/test14.sh Normal file → Executable file
View file

0
unittest/tests-to-run/test15.sh Normal file → Executable file
View file

18
unittest/tests-to-run/test16.sh Normal file → Executable file
View file

@ -4,12 +4,13 @@ PAR=parallel
# Test {.}
# Test weird regexp chars
seq 1 6 | $PAR -j1 -I :: -X echo a::b::^c::[.}c | mop
echo '### Test weird regexp chars'
seq 1 6 | $PAR -j1 -I :: -X echo a::b::^c::[.}c
rsync -Ha --delete input-files/testdir2/ tmp/
cd tmp
echo '### Test {.} and {}'
find . -name '*.jpg' | $PAR -j +0 convert -geometry 120 {} {.}_thumb.jpg
find -type f | $PAR -k diff {} a/foo ">"{.}.diff
@ -22,29 +23,42 @@ ls | $PAR -kv rm -- {.}/abc-{.}-{} 2>&1
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | $PAR -0 -v touch -- {}/abc-{}-{} 2>&1 \
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | $PAR -0 -v rm -- {}/abc-{}-{} 2>&1 \
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | $PAR -0 -v rmdir -- {} 2>&1 \
echo '### Test -m'
(echo foo;echo bar;echo joe.gif) | $PAR -km echo 1{}2{.}3 A{.}B{.}C
(echo foo;echo bar;echo joe.gif) | $PAR -kX echo 1{}2{.}3 A{.}B{.}C
seq 1 6 | $PAR -kX echo -e '{}.gif\\n' | $PAR -km echo a{}b{.}c{.}
seq 1 6 | $PAR -kX echo -e '{}.gif\\n' | $PAR -kX echo a{}b{.}c{.}
echo '### Test -m with 60000 args'
seq 1 60000 | perl -pe 's/$/.gif\n/' | $PAR -km echo a{}b{.}c{.} | mop -d 4 "|md5sum" "| wc"
echo '### Test -X with 60000 args'
seq 1 60000 | perl -pe 's/$/.gif\n/' | $PAR -kX echo a{}b{.}c{.} | mop -d 4 "|md5sum" "| wc"
echo '### Test -X with 60000 args and 5 expansions'
seq 1 60000 | perl -pe 's/$/.gif\n/' | $PAR -kX echo a{}b{.}c{.}{.}{} | wc -l
seq 1 60000 | perl -pe 's/$/.gif\n/' | $PAR -kX echo a{}b{.}c{.}{.} | wc -l
seq 1 60000 | perl -pe 's/$/.gif\n/' | $PAR -kX echo a{}b{.}c{.} | wc -l
seq 1 60000 | perl -pe 's/$/.gif\n/' | $PAR -kX echo a{}b{.}c | wc -l
seq 1 60000 | perl -pe 's/$/.gif\n/' | $PAR -kX echo a{}b | wc -l
echo '### Test -I with shell meta chars'
seq 1 60000 | $PAR -I :: -X echo a::b::c:: | wc -l
seq 1 60000 | $PAR -I '<>' -X echo 'a<>b<>c<>' | wc -l
seq 1 60000 | $PAR -I '<' -X echo 'a<b<c<' | wc -l
seq 1 60000 | $PAR -I '>' -X echo 'a>b>c>' | wc -l
echo '### Test {.}'
echo a | $PAR -qX echo "'"{.}"' "
echo a | $PAR -qX echo "'{.}'"
(echo "sleep 3; echo begin"; seq 1 30 | $PAR -kq echo "sleep 1; echo {.}"; echo "echo end") \
| $PAR -k -j0
echo '### Test -I with -X and -m'
seq 1 10 | $PAR -k 'seq 1 {.} | '$PAR' -k -I :: echo {.} ::'
seq 1 10 | $PAR -k 'seq 1 {.} | '$PAR' -X -k -I :: echo a{.} b::'
seq 1 10 | $PAR -k 'seq 1 {.} | '$PAR' -m -k -I :: echo a{.} b::'
echo '### Test -i'
(echo a; echo END; echo b) | $PAR -k -i -eEND echo repl{.}ce
echo '### Test --replace'
(echo a; echo END; echo b) | $PAR -k --replace -eEND echo repl{.}ce
echo '### Test -t'
(echo b; echo c; echo f) | $PAR -k -t echo {.}ar 2>&1 >/dev/null
echo '### Test --verbose'
(echo b; echo c; echo f) | $PAR -k --verbose echo {.}ar 2>&1 >/dev/null

180
unittest/tests-to-run/test17.sh Normal file → Executable file
View file

@ -2,10 +2,178 @@
PAR=parallel
# Test sshlogin
echo localhost >/tmp/localhost
seq 1 3 | $PAR -k --sshlogin 8/nlv.pi.dk -S 7/"-l tange nlv.pi.dk",: --sshloginfile /tmp/localhost echo
SERVER1=parallel-server1
SERVER2=parallel-server2
(seq 1 3;echo '>/tmp/fire';seq 5 10) | parallel -k -v -j+0 -S nlv.pi.dk,: "sleep 1; echo {}"
# Check number of CPUs being respected
(seq 1 3;echo '>/tmp/fire';seq 5 10) | parallel -k -v -j+0 -S 1/:,9/nlv.pi.dk "sleep 1; hostname; echo {}"
echo '### Test --transfer --return --cleanup'
rm -rf /tmp/parallel.file*
(seq 1 3;echo '>fire';seq 5 10; echo ' : & ) \n*.jpg'; echo '/./sub dir'; seq 13 20) >/tmp/test17
# Create some weirdly files in /tmp
mkdir -p /tmp/parallel.file
cat /tmp/test17 | $PAR -k echo file{} '>'/tmp/parallel.file{}.file
cat /tmp/test17 | $PAR -k echo /tmp/parallel.file{}.file >/tmp/test17abs
cat /tmp/test17 | $PAR -k echo tmp/parallel.file{}.file >/tmp/test17rel
echo '### --transfer - abspath'
stdout ssh $SERVER1 'rm -rf tmp/parallel.file*'
stdout ssh parallel@$SERVER2 'rm -rf tmp/parallel.file*'
cat /tmp/test17abs | $PAR -k --transfer --sshlogin $SERVER1,parallel@$SERVER2 cat {}";"rm {}
# One of these should give the empty dir /tmp/parallel.file
echo good if no file
stdout ssh $SERVER1 ls '/tmp/parallel.file*'
# The other: No such file or directory
stdout ssh parallel@$SERVER2 ls '/tmp/parallel.file*'
echo '### --transfer - relpath'
stdout ssh $SERVER1 'rm -rf tmp/parallel.file*'
stdout ssh parallel@$SERVER2 'rm -rf tmp/parallel.file*'
cd /
cat /tmp/test17rel | $PAR -k --transfer --sshlogin $SERVER1,parallel@$SERVER2 cat {}";"rm {}
# Should give: No such file or directory
echo good if no file
stdout ssh $SERVER1 ls 'tmp/parallel.file*'
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*'
echo '### --transfer - file with newline'
## TODO
echo '### --transfer --cleanup - abspath'
cat /tmp/test17abs | $PAR -k --transfer --cleanup --sshlogin $SERVER1,parallel@$SERVER2 cat {}
echo good if no file
# Should give: No such file or directory
stdout ssh $SERVER1 ls '/tmp/parallel.file*'
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls '/tmp/parallel.file*'
echo '### --transfer --cleanup - relpath'
cat /tmp/test17rel | $PAR -k --transfer --cleanup --sshlogin $SERVER1,parallel@$SERVER2 cat {}
# Should give: No such file or directory
echo good if no file
stdout ssh $SERVER1 ls 'tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
echo '### --transfer --cleanup - file with newline'
# TODO
echo '### --return - abspath'
rm -rf /tmp/parallel.file*out
cat /tmp/test17abs | $PAR -k --return {.}.out --sshlogin $SERVER1,parallel@$SERVER2 echo {} ">"{.}.out
ls /tmp/parallel.file*out /tmp/parallel.file/*out
echo '### --return - relpath'
rm -rf /tmp/parallel.file*out
cat /tmp/test17rel | $PAR -k --return {.}.out --sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'echo {} ">"{.}.out
ls tmp/parallel.file*out tmp/parallel.file/*out
echo '### --return - file with newline'
# TODO
echo '### --return - multiple files'
rm -rf tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
cat /tmp/test17rel | $PAR -k --return {.}.out --return {}.done \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'echo {} ">"{.}.out';'echo {} ">"{}.done';'
ls tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
echo '### --return --cleanup - abspath'
rm -rf /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
cat /tmp/test17abs | $PAR -k --return {.}.out --return {}.done --cleanup \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'echo {} ">"{.}.out';'echo {} ">"{}.done';'
ls /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls '/tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls '/tmp/parallel.file*' || echo OK
echo '### --return --cleanup - relpath'
rm -rf tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
cat /tmp/test17rel | $PAR -k --return {.}.out --return {}.done --cleanup \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'echo {} ">"{.}.out';'echo {} ">"{}.done';'
ls tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls 'tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
echo '### --return --cleanup - file with newline'
#
# TODO
echo '### --return --cleanup - multiple returns'
rm -rf tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
cat /tmp/test17rel | $PAR -k --return {.}.out --return {}.done --cleanup \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'echo {} ">"{.}.out';'echo {} ">"{}.done';'
ls /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls 'tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
echo '### --transfer --return --cleanup - abspath'
rm -rf /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
cat /tmp/test17abs | $PAR -k --transfer --return {.}.out --return {}.done --cleanup \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'cat {} ">"{.}.out';'cat {} ">"{}.done';'
ls /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls '/tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls '/tmp/parallel.file*' || echo OK
echo '### --transfer --return --cleanup - relpath'
rm -rf tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
cat /tmp/test17rel | $PAR -k --transfer --return {.}.out --return {}.done --cleanup \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'cat {} ">"{.}.out';'cat {} ">"{}.done';'
ls /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls 'tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
echo '### --transfer --return --cleanup - file with newline'
# TODO
echo '### --transfer --return --cleanup - multiple files'
rm -rf tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
cat /tmp/test17rel | $PAR -k --transfer --return {.}.out --return {}.done --cleanup \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'cat {} ">"{.}.out';'cat {} ">"{}.done';'
ls /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
stdout ssh $SERVER1 ls 'tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
echo '### --trc - abspath'
rm -rf /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
cat /tmp/test17abs | $PAR -k --trc {.}.out --trc {}.done \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'cat {} ">"{.}.out';'cat {} ">"{}.done';'
ls /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls '/tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls '/tmp/parallel.file*' || echo OK
echo '### --trc - relpath'
rm -rf tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
cat /tmp/test17rel | $PAR -k --trc {.}.out --trc {}.done \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'cat {} ">"{.}.out';'cat {} ">"{}.done';'
ls tmp/parallel.file*out tmp/parallel.file/*out tmp/parallel.file*done tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls 'tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
echo '### --trc - file with newline'
# TODO
echo '### --trc - multiple files'
rm -rf /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
cat /tmp/test17abs | $PAR -k --trc {.}.out --trc {}.done \
--sshlogin $SERVER1,parallel@$SERVER2 mkdir -p tmp ';'cat {} ">"{.}.out';'cat {} ">"{}.done';'
ls /tmp/parallel.file*out /tmp/parallel.file/*out /tmp/parallel.file*done /tmp/parallel.file/*done
echo good if no file
stdout ssh $SERVER1 ls '/tmp/parallel.file*' || echo OK
# Should give: No such file or directory
stdout ssh parallel@$SERVER2 ls '/tmp/parallel.file*' || echo OK

View file

@ -0,0 +1,30 @@
#!/bin/bash
PAR=parallel
SERVER1=parallel-server1
SERVER2=parallel-server2
echo '### Test --sshlogin -S --sshloginfile'
echo localhost >/tmp/parallel-sshlogin
seq 1 3 | $PAR -k --sshlogin 8/$SERVER1 -S "7/ssh -l parallel $SERVER2",: --sshloginfile /tmp/parallel-sshlogin echo
echo '### Test --sshloginfile with extra content'
echo "2/ssh -l parallel $SERVER2" >>/tmp/parallel-sshlogin
echo ":" >>/tmp/parallel-sshlogin
echo "#2/ssh -l tange nothing" >>/tmp/parallel-sshlogin
seq 1 10 | $PAR -k --sshloginfile /tmp/parallel-sshlogin echo
echo '### Check forced number of CPUs being respected'
stdout cat /tmp/test17 | parallel -k -j+0 -S 1/:,9/$SERVER1 "hostname; echo {} >/dev/null"
echo '### Check more than 9 simultaneous sshlogins'
seq 1 11 | $PAR -k -j0 -S "/ssh $SERVER1" echo
echo '### Check more than 9(relative) simultaneous sshlogins'
seq 1 11 | $PAR -k -j10000% -S "ssh $SERVER1" echo
echo '### Check -S syntax'
seq 1 11 | $PAR -k -j100% -S "/:" echo

View file

@ -1,3 +1,4 @@
### Test -k
begin
1
2
@ -30,6 +31,7 @@ begin
29
30
end
### Test SIGTERM
1
2
3
@ -48,5 +50,3 @@ end
16
17
18
19
20

View file

@ -1,4 +1,6 @@
### Test weird regexp chars
a1b1^c1[.}c a2b2^c2[.}c a3b3^c3[.}c a4b4^c4[.}c a5b5^c5[.}c a6b6^c6[.}c
### Test {.} and {}
ls 1-col.diff|wc;echo 1-col.diff
1 1 11
1-col.diff
@ -12,10 +14,10 @@ ls 2-col.txt|wc;echo 2-col.txt
1 1 10
2-col.txt
ls a|wc;echo a
3 3 13
6 6 41
a
ls b|wc;echo b
2 2 8
4 4 26
b
ls 中国\ \(Zhōngguó\)|wc;echo 中国\ \(Zhōngguó\)
4 12 118
@ -24,15 +26,15 @@ ls 中国\ \(Zhōngguó\)|wc;echo 中国\ \(Zhōngguó\)
1 1-col.txt
1 2-col.diff
1 2-col.txt
3 a
2 b
6 a
4 b
4 中国 (Zhōngguó)
1 1-col.diff
1 1-col.txt
1 2-col.diff
1 2-col.txt
3 a
2 b
6 a
4 b
4 中国 (Zhōngguó)
touch -- 1-col/abc-1-col-1-col
touch -- 1-col/abc-1-col-1-col.diff
@ -52,23 +54,29 @@ rm -- 2-col/abc-2-col-2-col.txt
rm -- a/abc-a-a
rm -- b/abc-b-b
rm -- 中国\ \(Zhōngguó\)/abc-中国\ \(Zhōngguó\)-中国\ \(Zhōngguó\)
### Test -m
1foo bar joe.gif2foo bar joe3 Afoo bar joeBfoo bar joeC
1foo2foo3 1bar2bar3 1joe.gif2joe3 AfooBfooC AbarBbarC AjoeBjoeC
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif b1 2 3 4 5 6 c1 2 3 4 5 6
a1.gifb1c1 a 2.gifb 2c 2 a 3.gifb 3c 3 a 4.gifb 4c 4 a 5.gifb 5c 5 a 6.gifb 6c 6 abc
### Test -m with 60000 args
98c94dcab1efedab3f820935d230bc77 -
12 180011 1286837
### Test -X with 60000 args
12de4813eda45d364a51bef697eee299 -
13 120000 1586682
### Test -X with 60000 args and 5 expansions
19
15
13
10
7
### Test -I with shell meta chars
9
9
9
9
### Test {.}
'a'
'a'
begin
@ -103,6 +111,7 @@ begin
29
30
end
### Test -I with -X and -m
1 1
2 1
2 2
@ -178,11 +187,15 @@ a7 b1 2 3 4 5 6 7
a8 b1 2 3 4 5 6 7 8
a9 b1 2 3 4 5 6 7 8 9
a10 b1 2 3 4 5 6 7 8 9 10
### Test -i
replace
### Test --replace
replace
### Test -t
echo bar
echo car
echo far
### Test --verbose
echo bar
echo car
echo far

View file

@ -1,53 +1,578 @@
1
2
3
sleep 1; echo 2
2
sleep 1; echo 1
1
ssh nlv.pi.dk sleep\ 1\;\ echo\ 3;
3
sleep 1; echo \>/tmp/fire
>/tmp/fire
sleep 1; echo 5
5
ssh nlv.pi.dk sleep\ 1\;\ echo\ 6;
6
sleep 1; echo 7
7
sleep 1; echo 8
8
ssh nlv.pi.dk sleep\ 1\;\ echo\ 9;
9
sleep 1; echo 10
10
sleep 1; hostname; echo 1
alpha
1
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 2;
nlv.pi.dk
2
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 3;
nlv.pi.dk
3
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ \\\>/tmp/fire;
nlv.pi.dk
>/tmp/fire
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 5;
nlv.pi.dk
5
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 6;
nlv.pi.dk
6
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 7;
nlv.pi.dk
7
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 8;
nlv.pi.dk
8
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 9;
nlv.pi.dk
9
ssh nlv.pi.dk sleep\ 1\;\ hostname\;\ echo\ 10;
nlv.pi.dk
10
### Test --transfer --return --cleanup
### --transfer - abspath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
### --transfer - relpath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access tmp/parallel.file*: No such file or directory
### --transfer - file with newline
### --transfer --cleanup - abspath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
### --transfer --cleanup - relpath
file1
file2
file3
file>fire
file5
file6
file7
file8
file9
file10
file : & ) \n*.jpg
file/./sub dir
file13
file14
file15
file16
file17
file18
file19
file20
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --transfer --cleanup - file with newline
### --return - abspath
/tmp/parallel.file10.out
/tmp/parallel.file13.out
/tmp/parallel.file14.out
/tmp/parallel.file15.out
/tmp/parallel.file16.out
/tmp/parallel.file17.out
/tmp/parallel.file18.out
/tmp/parallel.file19.out
/tmp/parallel.file1.out
/tmp/parallel.file20.out
/tmp/parallel.file2.out
/tmp/parallel.file3.out
/tmp/parallel.file5.out
/tmp/parallel.file6.out
/tmp/parallel.file7.out
/tmp/parallel.file8.out
/tmp/parallel.file9.out
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.out
### --return - relpath
/tmp/parallel.file10.out
/tmp/parallel.file13.out
/tmp/parallel.file14.out
/tmp/parallel.file15.out
/tmp/parallel.file16.out
/tmp/parallel.file17.out
/tmp/parallel.file18.out
/tmp/parallel.file19.out
/tmp/parallel.file1.out
/tmp/parallel.file20.out
/tmp/parallel.file2.out
/tmp/parallel.file3.out
/tmp/parallel.file5.out
/tmp/parallel.file6.out
/tmp/parallel.file7.out
/tmp/parallel.file8.out
/tmp/parallel.file9.out
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.out
### --return - file with newline
### --return - multiple files
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
### --return --cleanup - abspath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --return --cleanup - relpath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --return --cleanup - file with newline
### --return --cleanup - multiple returns
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --transfer --return --cleanup - abspath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --transfer --return --cleanup - relpath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --transfer --return --cleanup - file with newline
### --transfer --return --cleanup - multiple files
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --trc - abspath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --trc - relpath
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK
### --trc - file with newline
### --trc - multiple files
/tmp/parallel.file10.file.done
/tmp/parallel.file10.out
/tmp/parallel.file13.file.done
/tmp/parallel.file13.out
/tmp/parallel.file14.file.done
/tmp/parallel.file14.out
/tmp/parallel.file15.file.done
/tmp/parallel.file15.out
/tmp/parallel.file16.file.done
/tmp/parallel.file16.out
/tmp/parallel.file17.file.done
/tmp/parallel.file17.out
/tmp/parallel.file18.file.done
/tmp/parallel.file18.out
/tmp/parallel.file19.file.done
/tmp/parallel.file19.out
/tmp/parallel.file1.file.done
/tmp/parallel.file1.out
/tmp/parallel.file20.file.done
/tmp/parallel.file20.out
/tmp/parallel.file2.file.done
/tmp/parallel.file2.out
/tmp/parallel.file3.file.done
/tmp/parallel.file3.out
/tmp/parallel.file5.file.done
/tmp/parallel.file5.out
/tmp/parallel.file6.file.done
/tmp/parallel.file6.out
/tmp/parallel.file7.file.done
/tmp/parallel.file7.out
/tmp/parallel.file8.file.done
/tmp/parallel.file8.out
/tmp/parallel.file9.file.done
/tmp/parallel.file9.out
/tmp/parallel.file>fire.file.done
/tmp/parallel.file>fire.out
/tmp/parallel.file : & ) \n*.jpg.file.done
/tmp/parallel.file : & ) \n*.jpg.out
/tmp/parallel.file/sub dir.file.done
/tmp/parallel.file/sub dir.out
good if no file
ls: cannot access /tmp/parallel.file*: No such file or directory
OK

View file

@ -0,0 +1,72 @@
### Test --sshlogin -S --sshloginfile
1
2
3
### Test --sshloginfile with extra content
1
2
3
4
5
6
7
8
9
10
### Check forced number of CPUs being respected
alpha
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
nlv.pi.dk
alpha
alpha
alpha
alpha
alpha
alpha
alpha
alpha
alpha
alpha
### Check more than 9 simultaneous sshlogins
1
2
3
4
5
6
7
8
9
10
11
### Check more than 9(relative) simultaneous sshlogins
1
2
3
4
5
6
7
8
9
10
11
### Check -S syntax
1
2
3
4
5
6
7
8
9
10
11