Testsuite fixup for new --block reading and for running on 2-core machine.

This commit is contained in:
Ole Tange 2015-07-22 08:28:05 +02:00
parent 2ca714a58e
commit 68d3abbbab
36 changed files with 219 additions and 213 deletions

View file

@ -791,7 +791,7 @@ sub options_hash {
"files|output-as-files|outputasfiles" => \$opt::files,
"block|block-size|blocksize=s" => \$opt::blocksize,
"tollef" => \$opt::tollef,
"gnu" => \$opt::ignored_option,
"gnu" => \$opt::gnu,
"xapply" => \$opt::xapply,
"bibtex" => \$opt::bibtex,
"wc|willcite|will-cite|nn|nonotice|no-notice" => \$opt::willcite,
@ -1089,7 +1089,7 @@ sub parse_options {
sub init_globals {
# Defaults:
$Global::version = 20150630;
$Global::version = 20150719;
$Global::progname = 'parallel';
$Global::infinity = 2**31;
$Global::debug = 0;
@ -4520,7 +4520,7 @@ sub loadavg {
# Should we update the loadavg file?
my $update_loadavg_file = 0;
if(open(my $load_fh, "<", $self->{'loadavg_file'})) {
local $/ = undef;
local $/; # $/ = undef => slurp whole file
my $load_out = <$load_fh>;
close $load_fh;
# Count lines starting with D,O,R but command does not start with [
@ -4777,9 +4777,9 @@ sub compute_number_of_processes {
}
# Cleanup: Unget the command_lines or the @args
$Global::JobQueue->{'commandlinequeue'}->{'arg_queue'}->unget(@args);
@args = undef;
@args = ();
$Global::JobQueue->unget(@jobs);
@jobs = undef;
@jobs = ();
}
sub processes_available_by_system_limit {
@ -7483,7 +7483,7 @@ sub linebuffer_print {
}
print $out_fd $$partial;
# Release the memory
$$partial = undef;
undef $$partial;
if($self->fh($fdno,"rpid") and CORE::kill 0, $self->fh($fdno,"rpid")) {
# decompress still running
} else {
@ -7632,7 +7632,7 @@ sub set_exitstatus {
sub reset_exitstatus {
my $self = shift;
$self->{'exitstatus'} = undef;
undef $self->{'exitstatus'};
}
sub exitsignal {
@ -8810,7 +8810,7 @@ sub xapply_get {
return shift @{$self->{'unget'}};
}
my @record = ();
my $prepend = undef;
my $prepend;
my $empty = 1;
for my $fh (@{$self->{'fhs'}}) {
my $arg = read_arg_from_fh($fh);
@ -8840,7 +8840,7 @@ sub nest_get {
return shift @{$self->{'unget'}};
}
my @record = ();
my $prepend = undef;
my $prepend;
my $empty = 1;
my $no_of_inputsources = $#{$self->{'fhs'}} + 1;
if(not $self->{'arg_matrix'}) {
@ -8917,7 +8917,7 @@ sub read_arg_from_fh {
# Arg-object with one read line
# undef if end of file
my $fh = shift;
my $prepend = undef;
my $prepend;
my $arg;
do {{
# This makes 10% faster
@ -8944,7 +8944,7 @@ sub read_arg_from_fh {
}
if(defined $prepend) {
$arg = $prepend.$arg; # For line continuation
$prepend = undef; #undef;
undef $prepend;
}
if($Global::ignore_empty) {
if($arg =~ /^\s*$/) {
@ -9427,5 +9427,5 @@ sub mkdir_or_die {
# Keep perl -w happy
$opt::x = $Semaphore::timeout = $Semaphore::wait =
$opt::ignored_option = $Job::file_descriptor_warning_printed =
$Job::file_descriptor_warning_printed =
$Global::envdef = 0;

View file

@ -23,7 +23,7 @@ local: testlocal
true
testlocal: ../src/parallel tests-to-run/*local* wanted-results/*local* prereqlocal installparallel
time bash Start.sh local NONE
time bash Start.sh local mem
prereqlocal: installparallel
tcsh -c echo tcsh installed || (echo tcsh is required for testsuite; /bin/false)

View file

@ -37,7 +37,7 @@ run_test() {
export -f run_test
# Create a monitor script
echo forever pstree -lp $$ >/tmp/monitor
echo forever "'echo; pstree -lp '"$$"'; pstree -l'" $$ >/tmp/monitor
chmod 755 /tmp/monitor
# Log rotate
seq 10 -1 1 | parallel -j1 mv log/testsuite.log.{} log/testsuite.log.'{= $_++ =}'

View file

@ -3,6 +3,19 @@
# Simple jobs that never fails
# Each should be taking 0.3-1s and be possible to run in parallel
# I.e.: No race conditions, no logins
SMALLDISK=${SMALLDISK:-/mnt/ram}
export SMALLDISK
(
cd /tmp
sudo umount -l smalldisk.img
dd if=/dev/zero of=smalldisk.img bs=100k count=1k
yes|mkfs smalldisk.img
mkdir -p /mnt/ram
sudo mount smalldisk.img /mnt/ram
sudo chmod 777 /mnt/ram
) >/dev/null 2>/dev/null
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
echo '### Test exit val - true';
echo true | parallel;
@ -70,9 +83,9 @@ parallel --plus --rpl '%'
echo '**'
echo '### Disk full'
cat /dev/zero >/mnt/ram/out;
parallel --tmpdir /mnt/ram echo ::: OK;
rm /mnt/ram/out
cat /dev/zero >$SMALLDISK/out;
parallel --tmpdir $SMALLDISK echo ::: OK;
rm $SMALLDISK/out
echo '**'
@ -145,8 +158,8 @@ echo '### TMUX not found'
echo '**'
parallel --halt 2 ::: 'sleep 1' burnP6 false; killall burnP6 && echo ERROR: burnP6 should be killed
parallel --halt -2 ::: 'sleep 1' burnP5 true; killall burnP5 && echo ERROR: burnP5 should be killed
parallel -j4 --halt 2 ::: 'sleep 1' burnP6 false; killall burnP6 && echo ERROR: burnP6 should be killed
parallel -j4 --halt -2 ::: 'sleep 1' burnP5 true; killall burnP5 && echo ERROR: burnP5 should be killed
parallel --halt error echo ::: should not print
parallel --halt soon echo ::: should not print
@ -171,3 +184,4 @@ echo '### 1 .par file from --files expected'
find /tmp{/*,}/*.{par,tms,tmx} 2>/dev/null -mmin -10 | wc -l
find /tmp{/*,}/*.{par,tms,tmx} 2>/dev/null -mmin -10 | parallel rm
sudo umount -l /tmp/smalldisk.img

View file

@ -3,10 +3,14 @@
# Simple jobs that never fails
# Each should be taking >100s and be possible to run in parallel
# I.e.: No race conditions, no logins
TMP5G=${TMP5G:-/dev/shm}
export TMP5G
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
echo '### Test if we can deal with output > 4 GB'
## echo | niceload --io 10 parallel -q perl -e '"\$a=\"x\"x1000000;for(0..4300){print \$a}"' | md5sum
echo | parallel --tmpdir /dev/shm -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
echo | parallel --tmpdir $TMP5G -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
echo '**'

View file

@ -96,7 +96,7 @@ echo '### Are children killed if GNU Parallel receives TERM twice? There should
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 &
T=$!;
sleep 2;
sleep 5;
pstree $$;
kill -TERM $T;
sleep 1;
@ -111,7 +111,7 @@ echo '### Are children killed if GNU Parallel receives INT twice? There should b
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 &
T=$!;
sleep 2;
sleep 5;
pstree $$;
kill -INT $T;
sleep 1;

View file

@ -4,6 +4,7 @@
rm -rf tmp
mkdir tmp
cd tmp
unset run_test
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj5 -k --joblog /tmp/jl-`basename $0` -L1
echo '### Stop if all hosts are filtered and there are no hosts left to run on'

View file

@ -68,7 +68,7 @@ EOF
echo
echo "### Fish environment"
stdout ssh -q fish@lo <<'EOS' | grep -v 'packages can be updated.'
stdout ssh -q fish@lo <<'EOS' | egrep -v 'Welcome to |packages can be updated.'
alias alias_echo=echo;
function func_echo
echo $argv;
@ -86,7 +86,7 @@ EOS
echo
echo "### Zsh environment"
stdout ssh -q zsh@lo <<'EOS' | grep -v 'packages can be updated.'
stdout ssh -q zsh@lo <<'EOS' | egrep -v 'Welcome to |packages can be updated.'
alias alias_echo=echo;
func_echo() {
echo $*;
@ -105,13 +105,13 @@ EOS
echo
echo "### Ksh environment"
stdout ssh -q ksh@lo <<'EOS' | grep -v 'packages can be updated.'
stdout ssh -q ksh@lo <<'EOS' | egrep -v 'Welcome to |packages can be updated.'
alias alias_echo=echo;
func_echo() {
echo $*;
}
env_parallel() {
export PARALLEL_ENV="$(alias | perl -pe 's/^/alias /';typeset -p;typeset -f)";
export PARALLEL_ENV="$(alias | perl -pe 's/^/alias /';typeset -p|egrep -v 'typeset( -i)? -r|PIPESTATUS';typeset -f)";
`which parallel` "$@";
unset PARALLEL_ENV;
}

View file

@ -40,7 +40,8 @@ echo "### bug #41609: --compress fails"
seq 12 | parallel --compress -k seq {} 1000000 | md5sum
echo "### --compress race condition (use nice): Fewer than 400 would run"
seq 400| nice parallel -j200 --compress echo | wc
# 2>/dev/null to ignore Warning: Starting 45 processes took > 2 sec.
seq 400| nice parallel -j200 --compress echo 2>/dev/null | wc
echo "### -v --pipe: Dont spawn too many - 1 is enough"
seq 1 | parallel -j10 -v --pipe cat

View file

@ -5,6 +5,9 @@ echo '### Tests from xargs'
rsync -Ha --delete input-files/xargs-inputs/ tmp/
cd tmp
PARALLEL=-j8
export PARALLEL
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
echo '### -0 -n3 echo < files0.xi'
stdout xargs -0 -n3 echo < files0.xi

View file

@ -17,7 +17,7 @@ echo '### Check that we can have more input than max procs (-j 0) - touch'
perl -e 'print map {"more_than_5000-$_\n" } (4000..9999)' | parallel -vj 0 touch | sort | tail
echo '### rm'
perl -e 'print map {"more_than_5000-$_\n" } (4000..9900)' | parallel -j 0 rm | sort
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1 | egrep -v 'parallel: Warning: Starting|parallel: Warning: Consider'
ls | parallel -j500 'sleep 1; find {} -type f | perl -ne "END{print $..\" {}\n\"}"' | sort
ls | parallel --group -j500 'sleep 1; find {} -type f | perl -ne "END{print $..\" {}\n\"}"' | sort
find . -type f | parallel --group "perl -ne '/^\\S+\\s+\\S+$/ and print \$ARGV,\"\\n\"'" | sort
@ -26,5 +26,5 @@ find . -type f | parallel -q --group perl -ne '/^\S+\s+\S+$/ and print $ARGV,"\
find . -type f | parallel -qv --group perl -ne '/^\S+\s+\S+$/ and print $ARGV,"\n"' | sort
EOF
cd -
cd - >/dev/null
rm -rf $TMP/

View file

@ -10,9 +10,9 @@ export -f median
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
echo '### bug #41565: Print happens in blocks - not after each job complete'
echo 'The timing here is important: a full second between each'
perl -e 'for(1..10){print("$_\n");`sleep 1`}' | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
perl -e 'for(1..30){print("$_\n");`sleep 1`}' | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
echo '300 ms jobs:'
perl -e 'for(1..10){print("$_\n");`sleep .3`}' | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
perl -e 'for(1..30){print("$_\n");`sleep .3`}' | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
echo '### Test --tagstring'
nice parallel -j1 -X -v --tagstring a{}b echo ::: 3 4

View file

@ -1,9 +1,11 @@
#!/bin/bash
echo "### test global config - must run alone so the global config does not confuse others"
echo "### test --tollef in global config"
echo /etc/parallel/config | sudo parallel "mkdir -p /etc/parallel; echo --tollef > "
stdout parallel -k echo -- 1 2 3 ::: a b c
stdout parallel -k --gnu echo ::: 1 2 3 -- a b c
echo "### test --gnu in global config"
echo --gnu > ~/.parallel/config
stdout parallel -k echo ::: 1 2 3 -- a b c
stdout parallel -k --gnu echo ::: 1 2 3 -- a b c

View file

@ -144,7 +144,7 @@ echo '### Negative replacement strings'
parallel --colsep ' ' echo '{-3}orrect' ::: "1 c 3 4"
echo 'bug #38439: "open files" with --files --pipe blocks after a while'
ulimit -n 20; yes "`seq 3000`" |head -c 20M | parallel --pipe -k echo {#} of 20
ulimit -n 20; yes "`seq 3000`" |head -c 20M | parallel --pipe -k echo {#} of 21
echo 'bug #34241: --pipe should not spawn unneeded processes - part 2'
seq 500 | parallel --tmpdir . -j10 --pipe --block 1k --files wc >/dev/null;

View file

@ -47,14 +47,16 @@ seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
echo '### Test -m with 60000 args';
seq 1 60000 | perl -pe 's/$/.gif/' |
parallel -j1 -km echo a{}b{.}c{.} |
tee >(wc) >(md5sum) >/dev/null;
wait
tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null;
wait;
sleep 1
echo '### Test -X with 60000 args';
seq 1 60000 | perl -pe 's/$/.gif/' |
parallel -j1 -kX echo a{}b{.}c{.} |
tee >(wc) >(md5sum) >/dev/null;
wait
tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null;
wait;
sleep 1
echo '### Test -X with 60000 args and 5 expansions'
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l

View file

@ -23,10 +23,12 @@ echo '### Test of xargs -m command lines > 130k';
seq 1 60000 | parallel -k -j1 -m echo | md5sum
echo '### This causes problems if we kill child processes';
seq 2 40 | parallel -j 0 seq 1 10 | sort | md5sum
# 2>/dev/null to avoid parallel: Warning: Starting 45 processes took > 2 sec.
seq 2 40 | parallel -j 0 seq 1 10 2>/dev/null | sort | md5sum
echo '### This causes problems if we kill child processes (II)';
seq 1 40 | parallel -j 0 seq 1 10 '| parallel -j 3 echo' | sort | md5sum
# 2>/dev/null to avoid parallel: Warning: Starting 45 processes took > 2 sec.
seq 1 40 | parallel -j 0 seq 1 10 '| parallel -j 3 echo' 2>/dev/null | sort | md5sum
echo '### Test -m';
(echo foo;echo bar) | parallel -j1 -m echo 1{}2{}3 A{}B{}C
@ -71,7 +73,7 @@ echo '### bug #42892: parallel -a nonexiting --pipepart'
echo '### bug #42913: Dont use $SHELL but the shell currently running'
echo '## Unknown shell => $SHELL (bash)'
parallel -j1 "cp \`which {}\` /tmp/SHELL; /tmp/SHELL -c 'parallel -Dinit echo ::: 1' | grep which;"
parallel -kj1 "cp \`which {}\` /tmp/SHELL; /tmp/SHELL -c 'parallel -Dinit echo ::: 1' | grep which;"
::: ash bash csh dash fish fizsh ksh ksh93 mksh pdksh posh rbash rush rzsh sash sh static-sh tcsh yash zsh;
rm -f /tmp/SHELL /tmp/par*.par

View file

@ -29,7 +29,7 @@ echo '### bug #39554: Feature request: line buffered output --tag';
echo
echo '### test round-robin';
nice seq 1000 | $NICEPAR --block 1k --pipe --round-robin wc | sort
nice seq 1000 | $NICEPAR -j4 --block 1k --pipe --round-robin wc | sort
echo '### bug #43600: --pipe --linebuffer --round does not work'
seq 10000000000 | parallel --pipe --linebuffer --round cat | head

View file

@ -10,18 +10,18 @@ par_tmux() {
(stdout parallel --timeout 3 --tmux --delay .4 echo '{}{=$_="\\"x$_=}'; echo $?) | par_tmux_filter
}
export -f par_tmux
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 --timeout 60 --retries 2 -k --joblog /tmp/jl-`basename $0` -L1
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj3 --timeout 60 --retries 2 -k --joblog /tmp/jl-`basename $0` -L1
echo '### tmux1.9'
seq 000 100 | TMUX=tmux1.9 par_tmux
seq 100 200 | TMUX=tmux1.9 par_tmux
seq 200 300 | TMUX=tmux1.9 par_tmux
seq 300 400 | TMUX=tmux1.9 par_tmux
seq 400 500 | TMUX=tmux1.9 par_tmux
seq 500 600 | TMUX=tmux1.9 par_tmux
seq 600 700 | TMUX=tmux1.9 par_tmux
seq 700 800 | TMUX=tmux1.9 par_tmux
seq 800 900 | TMUX=tmux1.9 par_tmux
seq 900 1000 | TMUX=tmux1.9 par_tmux
seq 000 100 | TMUX=tmux1.9 par_tmux
seq 100 200 | TMUX=tmux1.9 par_tmux
seq 200 300 | TMUX=tmux1.9 par_tmux
seq 300 400 | TMUX=tmux1.9 par_tmux
seq 400 500 | TMUX=tmux1.9 par_tmux
seq 500 600 | TMUX=tmux1.9 par_tmux
seq 600 700 | TMUX=tmux1.9 par_tmux
seq 700 800 | TMUX=tmux1.9 par_tmux
seq 800 900 | TMUX=tmux1.9 par_tmux
seq 900 1000 | TMUX=tmux1.9 par_tmux
seq 1000 1100 | TMUX=tmux1.9 par_tmux
seq 1100 1200 | TMUX=tmux1.9 par_tmux
seq 1200 1300 | TMUX=tmux1.9 par_tmux
@ -40,8 +40,8 @@ echo '### tmux1.9 fails'
echo 2022 | TMUX=tmux1.9 par_tmux
echo '### tmux1.8'
seq 1 50 | TMUX=tmux1.8 par_tmux
seq 51 100 | TMUX=tmux1.8 par_tmux
seq 1 50 | TMUX=tmux1.8 par_tmux
seq 51 100 | TMUX=tmux1.8 par_tmux
seq 101 150 | TMUX=tmux1.8 par_tmux
seq 151 200 | TMUX=tmux1.8 par_tmux
seq 201 231 | TMUX=tmux1.8 par_tmux
@ -61,9 +61,9 @@ perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } 0..$_),
TMUX=tmux1.9 stdout parallel --tmux --timeout 3 echo | par_tmux_filter; echo $?
echo '### Test output ascii'
rm -f /tmp/paralocal7*;
perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } $_-10..$_),"\n" } 1..255' | stdout parallel --tmux echo {}'>>/tmp/paralocal7{%}' | par_tmux_filter;
sort /tmp/paralocal7* | md5sum
rm -f /tmp/paralocal7-ascii*;
perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } $_-10..$_),"\n" } 1..255' | stdout parallel --tmux echo {}'>>/tmp/paralocal7-ascii{%}' | par_tmux_filter;
sort /tmp/paralocal7-ascii* | md5sum
echo '### Test critical lengths. Must not block'
seq 70 130 | TMUX=tmux1.8 stdout parallel --tmux echo '{}{=$_="&"x$_=}' | par_tmux_filter

View file

@ -94,7 +94,7 @@ echo '**'
**
echo '### Disk full'
### Disk full
cat /dev/zero >/mnt/ram/out; parallel --tmpdir /mnt/ram echo ::: OK; rm /mnt/ram/out
cat /dev/zero >$SMALLDISK/out; parallel --tmpdir $SMALLDISK echo ::: OK; rm $SMALLDISK/out
cat: write error: No space left on device
parallel: Error: Output is incomplete. Cannot append to buffer file in /mnt/ram. Is the disk full?
parallel: Error: Change $TMPDIR with --tmpdir or use --compress.
@ -309,11 +309,11 @@ echo '### TMUX not found'
parallel: Error: not-existing not found in $PATH.
echo '**'
**
parallel --halt 2 ::: 'sleep 1' burnP6 false; killall burnP6 && echo ERROR: burnP6 should be killed
parallel -j4 --halt 2 ::: 'sleep 1' burnP6 false; killall burnP6 && echo ERROR: burnP6 should be killed
parallel: This job failed:
false
burnP6: no process found
parallel --halt -2 ::: 'sleep 1' burnP5 true; killall burnP5 && echo ERROR: burnP5 should be killed
parallel -j4 --halt -2 ::: 'sleep 1' burnP5 true; killall burnP5 && echo ERROR: burnP5 should be killed
parallel: This job succeeded:
true
burnP5: no process found

View file

@ -1,7 +1,7 @@
echo '### Test if we can deal with output > 4 GB'
### Test if we can deal with output > 4 GB
## echo | niceload --io 10 parallel -q perl -e '"\$a=\"x\"x1000000;for(0..4300){print \$a}"' | md5sum
echo | parallel --tmpdir /dev/shm -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
echo | parallel --tmpdir $TMP5G -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
46a318993dfc8e2afd71ff2bc6f605f1 -
echo '**'
**

View file

@ -3,17 +3,17 @@ echo '### Test --fifo under csh'
csh -c "seq 3000000 | parallel -k --pipe --fifo 'sleep .{#};cat {}|wc -c ; false; echo \$status; false'"; echo exit $?
1048571
1
1048579
1048572
1
1048572
1
1048579
1
1048579
1048572
1
1048572
1
1048580
1048572
1
1048569
1
1048576
1
@ -43,6 +43,6 @@ echo '### Test --fifo under csh'
1
1048576
1
868800
868832
1
exit 22

View file

@ -678,7 +678,7 @@ echo '**'
**
echo '### Are children killed if GNU Parallel receives TERM twice? There should be no sleep at the end'
### Are children killed if GNU Parallel receives TERM twice? There should be no sleep at the end
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 & T=$!; sleep 2; pstree $$; kill -TERM $T; sleep 1; pstree $$; kill -TERM $T; sleep 1; pstree $$; echo '**'
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 & T=$!; sleep 5; pstree $$; kill -TERM $T; sleep 1; pstree $$; kill -TERM $T; sleep 1; pstree $$; echo '**'
bash-+-perl---bash---sleep
`-pstree
bash-+-perl---bash---sleep
@ -690,7 +690,7 @@ parallel: Waiting for these 1 jobs to finish. Send SIGTERM again to stop now.
parallel: bash -c sleep\ 120\ \&\ pid\=\$\!\;\ wait\ \$pid 1
echo '### Are children killed if GNU Parallel receives INT twice? There should be no sleep at the end'
### Are children killed if GNU Parallel receives INT twice? There should be no sleep at the end
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 & T=$!; sleep 2; pstree $$; kill -INT $T; sleep 1; pstree $$;
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 & T=$!; sleep 5; pstree $$; kill -INT $T; sleep 1; pstree $$;
bash-+-perl---bash---sleep
`-pstree
bash---pstree

View file

@ -44,6 +44,7 @@ echo '### Test bug #34241: --pipe should not spawn unneeded processes'
Block_end
3
4
Block_end
5
Block_end
echo '### --env _'

View file

@ -60,11 +60,15 @@ echo '### bug #44143: csh and nice'
### bug #44143: csh and nice
parallel --nice 1 -S csh@lo setenv B {}\; echo '$B' ::: OK
OK
echo '### bug #45575: -m and multiple hosts repeats first args'
### bug #45575: -m and multiple hosts repeats first args
seq 1 3 | parallel -X -S 2/lo,2/: -k echo
1
2
3
### Fish environment
Welcome to Linux Mint 17 Qiana (GNU/Linux 3.16.0-31-lowlatency x86_64)
Welcome to Linux Mint
* Documentation: http://www.linuxmint.com
0 updates are security updates.
@ -75,9 +79,7 @@ alias_works_over_ssh
function_works_over_ssh
### Zsh environment
Welcome to Linux Mint 17 Qiana (GNU/Linux 3.16.0-31-lowlatency x86_64)
Welcome to Linux Mint
* Documentation: http://www.linuxmint.com
0 updates are security updates.
@ -88,9 +90,7 @@ zsh:10: command not found: alias_echo
function_works_over_ssh
### Ksh environment
Welcome to Linux Mint 17 Qiana (GNU/Linux 3.16.0-31-lowlatency x86_64)
Welcome to Linux Mint
* Documentation: http://www.linuxmint.com
0 updates are security updates.

View file

@ -411,6 +411,10 @@ h2
6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Stop
Start
h1
h2
9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
11xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@ -419,11 +423,11 @@ h2
14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
15xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
16xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
17xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Stop
Start
h1
h2
17xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
18xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
20xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

View file

@ -598,4 +598,3 @@ perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9996
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9997
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9998
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9999
/home/tange/privat/parallel/testsuite

View file

@ -2,11 +2,11 @@ echo '### bug #41565: Print happens in blocks - not after each job complete'
### bug #41565: Print happens in blocks - not after each job complete
echo 'The timing here is important: a full second between each'
The timing here is important: a full second between each
perl -e 'for(1..10){print("$_\n");`sleep 1`}' | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
perl -e 'for(1..30){print("$_\n");`sleep 1`}' | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
1
echo '300 ms jobs:'
300 ms jobs:
perl -e 'for(1..10){print("$_\n");`sleep .3`}' | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
perl -e 'for(1..30){print("$_\n");`sleep .3`}' | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
3
echo '### Test --tagstring'
### Test --tagstring
@ -53,7 +53,6 @@ parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
stdout parallel -g
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
@ -64,7 +63,6 @@ parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
stdout parallel -H 1
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
@ -75,7 +73,6 @@ parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
stdout parallel -T
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
@ -86,7 +83,6 @@ parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
stdout parallel -U foo
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
@ -97,7 +93,6 @@ parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
stdout parallel -W foo
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
@ -108,7 +103,6 @@ parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
stdout parallel -Y
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
@ -119,7 +113,6 @@ parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
echo '### Test --joblog followed by --resume --joblog'
### Test --joblog followed by --resume --joblog
rm -f /tmp/joblog; timeout -k 1 1 parallel -j2 --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog | wc -lw; rm -f /tmp/joblog; echo '### Test --resume --joblog followed by --resume --joblog'; rm -f /tmp/joblog2; timeout -k 1 1 parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog2 | wc -lw; rm -f /tmp/joblog2; echo '### Test --header'

View file

@ -1,42 +1,27 @@
### test global config - must run alone so the global config does not confuse others
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
### test --tollef in global config
parallel: Error: --tollef has been retired.
parallel: Error: Remove --tollef or use --gnu to override --tollef.
1
2
3
--
a
b
c
### test --gnu in global config
1
2
3
--
a
b
c
1
2
3
--
a
b
c
<<< End test global config - must run alone so the global config does not confuse others

View file

@ -115,29 +115,18 @@ one 1
echo '### Test --tollef'
### Test --tollef
stdout parallel -k --tollef echo -- 1 2 3 ::: a b c | sort
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -g has been retired. Use --group.
parallel: Error: --tollef has been retired.
parallel: Error: Remove --tollef or use --gnu to override --tollef.
echo '### Test --tollef --gnu'
### Test --tollef --gnu
stdout parallel -k --tollef --gnu echo ::: 1 2 3 -- a b c
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l.
1
2
3
--
a
b
c
echo '### Test --gnu'
### Test --gnu
parallel -k --gnu echo ::: 1 2 3 -- a b c
@ -326,27 +315,28 @@ correct
correct
echo 'bug #38439: "open files" with --files --pipe blocks after a while'
bug #38439: "open files" with --files --pipe blocks after a while
ulimit -n 20; yes "`seq 3000`" |head -c 20M | parallel --pipe -k echo {#} of 20
1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20
ulimit -n 20; yes "`seq 3000`" |head -c 20M | parallel --pipe -k echo {#} of 21
1 of 21
2 of 21
3 of 21
4 of 21
5 of 21
6 of 21
7 of 21
8 of 21
9 of 21
10 of 21
11 of 21
12 of 21
13 of 21
14 of 21
15 of 21
16 of 21
17 of 21
18 of 21
19 of 21
20 of 21
21 of 21
parallel: Warning: Only enough file handles to run 1 jobs in parallel.
parallel: Warning: Running 'parallel -j0 -N 1 --pipe parallel -j0' or
parallel: Warning: raising ulimit -n or /etc/security/limits.conf may help.

View file

@ -105,11 +105,11 @@ seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gifb1 2 3 4 5 6c1 2 3 4 5 6
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
echo '### Test -m with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc) >(md5sum) >/dev/null; wait
echo '### Test -m with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1
### Test -m with 60000 args
0891d955e7e2659ee6a88a96f3309b5c -
20 179960 1286702
echo '### Test -X with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | tee >(wc) >(md5sum) >/dev/null; wait
echo '### Test -X with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1
### Test -X with 60000 args
af6c8c69409b5cbc55aeb95174e23c37 -
21 60000 1346682

View file

@ -11,11 +11,13 @@ Chars per line: 62906
echo '### Test of xargs -m command lines > 130k'; seq 1 60000 | parallel -k -j1 -m echo | md5sum
### Test of xargs -m command lines > 130k
1e763b036fe666d229520dad45610e6c -
echo '### This causes problems if we kill child processes'; seq 2 40 | parallel -j 0 seq 1 10 | sort | md5sum
echo '### This causes problems if we kill child processes'; # 2>/dev/null to avoid parallel: Warning: Starting 45 processes took > 2 sec.
### This causes problems if we kill child processes
seq 2 40 | parallel -j 0 seq 1 10 2>/dev/null | sort | md5sum
437c0d47a99b9a7c5bcb1d132f94c2e6 -
echo '### This causes problems if we kill child processes (II)'; seq 1 40 | parallel -j 0 seq 1 10 '| parallel -j 3 echo' | sort | md5sum
echo '### This causes problems if we kill child processes (II)'; # 2>/dev/null to avoid parallel: Warning: Starting 45 processes took > 2 sec.
### This causes problems if we kill child processes (II)
seq 1 40 | parallel -j 0 seq 1 10 '| parallel -j 3 echo' 2>/dev/null | sort | md5sum
d7fb96d6a56d4347bc24930a395c431a -
echo '### Test -m'; (echo foo;echo bar) | parallel -j1 -m echo 1{}2{}3 A{}B{}C
### Test -m
@ -86,7 +88,7 @@ echo '### bug #42902: profiles containing arguments with space'
echo /bin/bash\=/bin/bash
/bin/bash=/bin/bash
PARALLEL="--rpl 'FULLPATH chomp(\$_=\"/bin/bash=\".\`readlink -f \$_\`);' perl -e \'print \\\"@ARGV\\\n\\\"\' " parallel With script in \\\$PARALLEL FULLPATH ::: .
With script in $PARALLEL /bin/bash=/home/tange/privat/parallel/testsuite
With script in $PARALLEL /bin/bash=/home/tange/ownCloud/parallel/testsuite
echo '### bug #42892: parallel -a nonexiting --pipepart'
### bug #42892: parallel -a nonexiting --pipepart
parallel --pipepart -a nonexisting wc
@ -95,7 +97,7 @@ echo '### bug #42913: Dont use $SHELL but the shell currently running'
### bug #42913: Dont use $SHELL but the shell currently running
echo '## Unknown shell => $SHELL (bash)'
## Unknown shell => $SHELL (bash)
parallel -j1 "cp \`which {}\` /tmp/SHELL; /tmp/SHELL -c 'parallel -Dinit echo ::: 1' | grep which;" ::: ash bash csh dash fish fizsh ksh ksh93 mksh pdksh posh rbash rush rzsh sash sh static-sh tcsh yash zsh; rm -f /tmp/SHELL /tmp/par*.par
parallel -kj1 "cp \`which {}\` /tmp/SHELL; /tmp/SHELL -c 'parallel -Dinit echo ::: 1' | grep which;" ::: ash bash csh dash fish fizsh ksh ksh93 mksh pdksh posh rbash rush rzsh sash sh static-sh tcsh yash zsh; rm -f /tmp/SHELL /tmp/par*.par
shell? /bin/bash -c cp `which ash` /tmp/SHELL; /tmp/SHELL -c 'parallel -Dinit echo ::: 1' | grep which;
which bash => shell path /bin/bash
shell? /bin/bash -c cp `which bash` /tmp/SHELL; /tmp/SHELL -c 'parallel -Dinit echo ::: 1' | grep which;
@ -300,55 +302,55 @@ Send Receive Exitval
### --pipe
seq 1000 | parallel --joblog /dev/stderr --block 1111 --pipe pv -qL300 2>&1 >/dev/null | cut -f 5-7 | sort
1108 1108 0
1112 1112 0
1112 1112 0
561 561 0
1108 1108 0
1108 1108 0
569 569 0
Send Receive Exitval
echo '### --pipe --line-buffer'
### --pipe --line-buffer
seq 1000 | parallel --joblog /dev/stderr --block 1111 --pipe --line-buffer pv -qL300 2>&1 >/dev/null | cut -f 5-7 | sort
1108 1108 0
1112 1112 0
1112 1112 0
561 561 0
1108 1108 0
1108 1108 0
569 569 0
Send Receive Exitval
echo '### --pipe --tag'
### --pipe --tag
seq 1000 | parallel --joblog /dev/stderr --block 1111 --pipe --tag pv -qL300 2>&1 >/dev/null | cut -f 5-7 | sort
1108 1108 0
1112 1112 0
1112 1112 0
561 561 0
1108 1108 0
1108 1108 0
569 569 0
Send Receive Exitval
echo '### --pipe --tag --line-buffer'
### --pipe --tag --line-buffer
seq 1000 | parallel --joblog /dev/stderr --block 1111 --pipe --tag --line-buffer pv -qL300 2>&1 >/dev/null | cut -f 5-7 | sort
1108 1108 0
1112 1112 0
1112 1112 0
561 561 0
1108 1108 0
1108 1108 0
569 569 0
Send Receive Exitval
echo '### --files --pipe'
### --files --pipe
seq 1000 | parallel --joblog /dev/stderr --block 1111 --files --pipe pv -qL300 2>&1 >/dev/null | cut -f 5-7 | sort
1108 1108 0
1112 1112 0
1112 1112 0
561 561 0
1108 1108 0
1108 1108 0
569 569 0
Send Receive Exitval
echo '### --files --pipe --tag'
### --files --pipe --tag
seq 1000 | parallel --joblog /dev/stderr --block 1111 --files --pipe --tag pv -qL300 2>&1 >/dev/null | cut -f 5-7 | sort
1108 1108 0
1112 1112 0
1112 1112 0
561 561 0
1108 1108 0
1108 1108 0
569 569 0
Send Receive Exitval
echo '### --pipe --round-robin'
### --pipe --round-robin
seq 1000 | parallel --joblog /dev/stderr --block 1111 -j2 --pipe --round-robin pv -qL300 2>&1 >/dev/null | cut -f 5-7 | sort
1673 1673 0
2220 2220 0
1677 1677 0
2216 2216 0
Send Receive Exitval
echo '### --tmux test - check termination'
### --tmux test - check termination

View file

@ -44,7 +44,7 @@ B next to last B
C next to last C
A last AB last BC last Cecho
echo '### test round-robin'; nice seq 1000 | $NICEPAR --block 1k --pipe --round-robin wc | sort
echo '### test round-robin'; nice seq 1000 | $NICEPAR -j4 --block 1k --pipe --round-robin wc | sort
### test round-robin
223 223 893
250 250 1000
@ -66,10 +66,10 @@ echo '### bug #43600: --pipe --linebuffer --round does not work'
echo '### Check that 4 processes are really used'
### Check that 4 processes are really used
seq 1000000 | parallel -j4 --pipe --round --line-buf wc |sort
149797 149797 1048579
235145 235145 1646016
299593 299593 2097151
315465 315465 2097150
149796 149796 1048572
235148 235148 1646037
299592 299592 2097144
315464 315464 2097143
echo '### --version must have higher priority than retired options'
### --version must have higher priority than retired options
$NICEPAR --version -g -Y -U -W -T | tail

View file

@ -2,6 +2,7 @@
echo '### Test 200M records with too small block'; ( echo start; seq 1 44 | parallel -uj1 cat /tmp/blocktest\;true; echo end; echo start; seq 1 44 | parallel -uj1 cat /tmp/blocktest\;true; echo end; echo start; seq 1 44 | parallel -uj1 cat /tmp/blocktest\;true; echo end; ) | stdout parallel -k --block 200m -j2 --pipe --recend 'end\n' wc -c | egrep -v '^0$'
### Test 200M records with too small block
parallel: Warning: A record was longer than 200000000. Increasing to --blocksize 260000001.
parallel: Warning: A record was longer than 260000001. Increasing to --blocksize 338000003.
303111434
303111434
303111434
@ -157,7 +158,8 @@ parallel: Warning: A record was longer than 5. Increasing to --blocksize 8.
echo '### Test 10M records with too big block'; ( echo start; seq 1 1 | parallel -uj1 cat /tmp/blocktest\;true; echo end; echo start; seq 1 1 | parallel -uj1 cat /tmp/blocktest\;true; echo end; echo start; seq 1 1 | parallel -uj1 cat /tmp/blocktest\;true; echo end; ) | stdout parallel -k --block 10M -j2 --pipe --recstart 'start\n' wc -c | egrep -v '^0$'
### Test 10M records with too big block
6888906
13777812
6888906
6888906
echo '### Test --rrs -N1 --recend single'; echo 12a34a45a6 | parallel -k --pipe --recend a -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
### Test --rrs -N1 --recend single
1>12
@ -247,7 +249,7 @@ ole
ole
echo '### Test --recstart + --recend'; cat /tmp/blocktest | parallel --block 1M -k --recstart 44 --recend "44" -j10 --pipe sort -n |md5sum
### Test --recstart + --recend
fc06ad6705d362075fcbc6de43315f8f -
fb1560edff4b891a213ce2205b2c1bcb -
echo '### Race condition bug - 1 - would block'; seq 1 80 | nice parallel -j0 'seq 1 10| parallel --block 1 --recend "" --pipe cat;true' >/dev/null
### Race condition bug - 1 - would block
echo '### Race condition bug - 2 - would block'; seq 1 100 | nice parallel -j100 --block 1 --recend "" --pipe cat >/dev/null

View file

@ -1,36 +1,37 @@
echo '### tmux1.9'
### tmux1.9
seq 000 100 | TMUX=tmux1.9 par_tmux
seq 000 100 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 100 200 | TMUX=tmux1.9 par_tmux
seq 100 200 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 200 300 | TMUX=tmux1.9 par_tmux
seq 200 300 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 300 400 | TMUX=tmux1.9 par_tmux
seq 300 400 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 400 500 | TMUX=tmux1.9 par_tmux
seq 400 500 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 500 600 | TMUX=tmux1.9 par_tmux
seq 500 600 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 600 700 | TMUX=tmux1.9 par_tmux
seq 600 700 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 700 800 | TMUX=tmux1.9 par_tmux
seq 700 800 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 800 900 | TMUX=tmux1.9 par_tmux
seq 800 900 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 900 1000 | TMUX=tmux1.9 par_tmux
seq 900 1000 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 1000 1100 | TMUX=tmux1.9 par_tmux
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
parallel: Error: Command line too long (2023 >= 2023) at input 0: 1007
255
seq 1100 1200 | TMUX=tmux1.9 par_tmux
@ -79,10 +80,10 @@ parallel: Error: Command line too long (4053 >= 2023) at input 0: 2022
255
echo '### tmux1.8'
### tmux1.8
seq 1 50 | TMUX=tmux1.8 par_tmux
seq 1 50 | TMUX=tmux1.8 par_tmux
See output with: tmux1.8 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 51 100 | TMUX=tmux1.8 par_tmux
seq 51 100 | TMUX=tmux1.8 par_tmux
See output with: tmux1.8 -S /tmp/parallel-local7/tmsXXXXX attach
0
seq 101 150 | TMUX=tmux1.8 par_tmux
@ -125,7 +126,7 @@ See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
0
echo '### Test output ascii'
### Test output ascii
rm -f /tmp/paralocal7*; perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } $_-10..$_),"\n" } 1..255' | stdout parallel --tmux echo {}'>>/tmp/paralocal7{%}' | par_tmux_filter; sort /tmp/paralocal7* | md5sum
rm -f /tmp/paralocal7-ascii*; perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } $_-10..$_),"\n" } 1..255' | stdout parallel --tmux echo {}'>>/tmp/paralocal7-ascii{%}' | par_tmux_filter; sort /tmp/paralocal7-ascii* | md5sum
See output with: tmux -S /tmp/parallel-local7/tmsXXXXX attach
053c7e8e945ef7641fc63bc309ac069d -
echo '### Test critical lengths. Must not block'

View file

@ -71,7 +71,7 @@ echo '### Test --number-of-cpus'; stdout $NICEPAR --number-of-cpus
1
echo '### Test --number-of-cores'; stdout $NICEPAR --number-of-cores
### Test --number-of-cores
8
2
echo '### Test --use-cpus-instead-of-cores'; (seq 1 8 | stdout parallel --use-cpus-instead-of-cores -j100% sleep) && echo CPUs done & (seq 1 8 | stdout parallel -j100% sleep) && echo cores done & echo 'Cores should complete first on machines with less than 8 physical CPUs'; wait
### Test --use-cpus-instead-of-cores
Cores should complete first on machines with less than 8 physical CPUs