mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 16:07:54 +00:00
testsuite: niceload redone. Some tests are now run in parallel. Passes testsuite.
This commit is contained in:
parent
524bfaa19a
commit
e93df253fc
|
@ -181,7 +181,7 @@ New in this release:
|
||||||
* niceload: --hard will suspend a program if a limit is reached - as
|
* niceload: --hard will suspend a program if a limit is reached - as
|
||||||
opposed to just slowing the program down.
|
opposed to just slowing the program down.
|
||||||
|
|
||||||
* niceload: --soft will slowing the program down - as opposed to
|
* niceload: --soft will slow the program down - as opposed to
|
||||||
suspending the program completely.
|
suspending the program completely.
|
||||||
|
|
||||||
* niceload: --run-io will slow down a program if disk io goes above a
|
* niceload: --run-io will slow down a program if disk io goes above a
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test niceload'
|
echo '### Test niceload'
|
||||||
niceload -s 1 perl -e '$|=1;do{$l==$r or print "."; $l=$r}until(($r=time-$^T)>10)'
|
niceload -q -s 1 perl -e '$|=1;do{$l==$r or print "."; $l=$r}until(($r=time-$^T)>10)'
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo '### -f and --factor'
|
|
||||||
niceload -f 0.1 echo f 0.1
|
|
||||||
niceload --factor 0.1 echo factor 0.1
|
|
||||||
|
|
||||||
echo '### -f and --factor'
|
|
||||||
niceload -f 0.1 echo f 0.1
|
|
||||||
niceload --factor 0.1 echo factor 0.1
|
|
||||||
|
|
||||||
# Force less than 1 GB buffer+cache
|
# Force less than 1 GB buffer+cache
|
||||||
MEMAVAIL=$(free | perl -ane '/buffers.cache:/ and print $F[3]')
|
MEMAVAIL=$(free | perl -ane '/buffers.cache:/ and print $F[3]')
|
||||||
while [ $MEMAVAIL -gt 1000000 ] ; do
|
while [ $MEMAVAIL -gt 1000000 ] ; do
|
||||||
|
@ -19,7 +11,6 @@ while [ $MEMAVAIL -gt 1000000 ] ; do
|
||||||
(seq 1 5 | parallel -j0 -N0 timeout 10 nice dd if=/dev/zero of=/dev/null bs=${BS}k &)
|
(seq 1 5 | parallel -j0 -N0 timeout 10 nice dd if=/dev/zero of=/dev/null bs=${BS}k &)
|
||||||
sleep 2;
|
sleep 2;
|
||||||
MEMAVAIL=$(free | perl -ane '/buffers.cache:/ and print $F[3]')
|
MEMAVAIL=$(free | perl -ane '/buffers.cache:/ and print $F[3]')
|
||||||
echo $MEMAVAIL
|
|
||||||
done
|
done
|
||||||
# free
|
# free
|
||||||
echo '### --rm and --runmem'
|
echo '### --rm and --runmem'
|
||||||
|
@ -35,22 +26,26 @@ while [ $MEMAVAIL -gt 1000000 ] ; do
|
||||||
(seq 1 10 | parallel -j0 -N0 timeout 10 nice dd if=/dev/zero of=/dev/null bs=${BS}k &)
|
(seq 1 10 | parallel -j0 -N0 timeout 10 nice dd if=/dev/zero of=/dev/null bs=${BS}k &)
|
||||||
sleep 2;
|
sleep 2;
|
||||||
MEMAVAIL=$(free | perl -ane '/buffers.cache:/ and print $F[3]')
|
MEMAVAIL=$(free | perl -ane '/buffers.cache:/ and print $F[3]')
|
||||||
echo $MEMAVAIL
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo '### -N and --noswap '
|
echo '### -N and --noswap '
|
||||||
niceload -D -H -N vmstat 1 2 | tail -n1 | awk '{print $7*$8}' &
|
niceload -H -N vmstat 1 2 | tail -n1 | awk '{print $7*$8}' &
|
||||||
niceload -D -H --noswap vmstat 1 2 | tail -n1 | awk '{print $7*$8}' &
|
niceload -H --noswap vmstat 1 2 | tail -n1 | awk '{print $7*$8}' &
|
||||||
wait
|
wait
|
||||||
|
|
||||||
|
|
||||||
# force load > 10
|
# force load > 10
|
||||||
while uptime | grep -v '[1-9][0-9]\.[0-9][0-9],' >/dev/null ; do (timeout 2 nice burnP6 2>/dev/null &) done
|
while uptime | grep -v age:.[1-9][0-9].[0-9][0-9] >/dev/null ; do (timeout 5 nice burnP6 2>/dev/null &) done
|
||||||
|
|
||||||
echo '### -H and --hard'
|
echo '### -H and --hard'
|
||||||
niceload -H -l 9.9 uptime | grep '[1-9][0-9]\.[0-9][0-9],' || echo OK
|
niceload -H -l 9.9 uptime | grep '[1-9][0-9]\.[0-9][0-9],' || echo OK
|
||||||
niceload --hard -l 9 uptime | grep '[1-9][0-9]\.[0-9][0-9],' || echo OK
|
niceload --hard -l 9 uptime | grep '[1-9][0-9]\.[0-9][0-9],' || echo OK
|
||||||
|
|
||||||
|
echo '### -f and --factor'
|
||||||
|
niceload -H -f 0.1 -l6 echo f 0.1 first &
|
||||||
|
niceload -H --factor 10 -l6 echo factor last &
|
||||||
|
wait
|
||||||
|
|
||||||
|
|
||||||
#echo '### Test niceload -p'
|
#echo '### Test niceload -p'
|
||||||
#sleep 3 &
|
#sleep 3 &
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PAR=parallel
|
# Simple jobs taking 100s that can be run in parallel
|
||||||
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k -L1
|
||||||
echo Force outside the file handle limit
|
echo "### Test Force outside the file handle limit, 2009-02-17 Gave fork error";
|
||||||
# 2009-02-17 Gave fork error
|
(echo echo Start; seq 1 20000 | perl -pe 's/^/true /'; echo echo end) | parallel -uj 0
|
||||||
(echo echo Start;
|
EOF
|
||||||
seq 1 20000 | perl -pe 's/^/true /';
|
|
||||||
echo echo end) | $PAR -uj 0
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Test if we can deal with output > 4 GB
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -vk
|
||||||
echo | niceload -l 1.5 parallel -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | md5sum
|
echo '### Test if we can deal with output > 4 GB'
|
||||||
# dd does not work with niceload (no idea why)
|
echo | niceload --io 9 -H parallel -q perl -e '"\$a=\"x\"x1000000;for(0..4300){print \$a}"' | md5sum
|
||||||
#echo | parallel 'dd if=/dev/zero count=43 bs=100000k; echo 1; echo 2' | md5sum
|
|
||||||
|
echo '### Test {#}'
|
||||||
|
seq 1 10 | parallel -k echo {#}
|
||||||
|
|
||||||
|
echo '### Test --seqreplace and line too long'
|
||||||
|
seq 1 100 | stdout parallel -k --seqreplace I echo $(perl -e 'print "I"x130000') \|wc
|
||||||
|
|
||||||
|
echo '### Test of --retries on unreachable host'
|
||||||
|
seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo
|
||||||
|
EOF
|
||||||
|
|
|
@ -29,6 +29,9 @@ ls | parallel -kv rm -- {.}/abc-{.}-{} 2>&1
|
||||||
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v touch -- {}/abc-{}-{} 2>&1 \
|
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v touch -- {}/abc-{}-{} 2>&1 \
|
||||||
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rm -- {}/abc-{}-{} 2>&1 \
|
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rm -- {}/abc-{}-{} 2>&1 \
|
||||||
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rmdir -- {} 2>&1 \
|
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rmdir -- {} 2>&1 \
|
||||||
|
|
||||||
|
# -L1 will join lines ending in ' '
|
||||||
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | nice parallel -j0 -k -L1
|
||||||
echo '### Test -m'
|
echo '### Test -m'
|
||||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
|
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
|
||||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
|
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
|
||||||
|
@ -59,8 +62,7 @@ seq 1 60000 | parallel -j1 -I '>' -X echo 'a>b>c>' | wc -l
|
||||||
echo '### Test {.}'
|
echo '### Test {.}'
|
||||||
echo a | parallel -qX echo "'"{.}"' "
|
echo a | parallel -qX echo "'"{.}"' "
|
||||||
echo a | parallel -qX echo "'{.}'"
|
echo a | parallel -qX echo "'{.}'"
|
||||||
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {.}"; echo "echo end") \
|
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {.}"; echo "echo end") | parallel -k -j0
|
||||||
| parallel -k -j0
|
|
||||||
echo '### Test -I with -X and -m'
|
echo '### Test -I with -X and -m'
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
|
||||||
|
@ -73,3 +75,4 @@ echo '### Test -t'
|
||||||
(echo b; echo c; echo f) | parallel -k -t echo {.}ar 2>&1 >/dev/null
|
(echo b; echo c; echo f) | parallel -k -t echo {.}ar 2>&1 >/dev/null
|
||||||
echo '### Test --verbose'
|
echo '### Test --verbose'
|
||||||
(echo b; echo c; echo f) | parallel -k --verbose echo {.}ar 2>&1 >/dev/null
|
(echo b; echo c; echo f) | parallel -k --verbose echo {.}ar 2>&1 >/dev/null
|
||||||
|
EOF
|
||||||
|
|
|
@ -120,7 +120,7 @@ stdout ssh $SERVER1 ls 'tmp/parallel.file*' || echo OK
|
||||||
# Should give: No such file or directory
|
# Should give: No such file or directory
|
||||||
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
|
stdout ssh parallel@$SERVER2 ls 'tmp/parallel.file*' || echo OK
|
||||||
echo 'Input for ssh'
|
echo 'Input for ssh'
|
||||||
cat /tmp/myssh1-run /tmp/myssh2-run | perl -pe 's/PID=\d+/PID=00000/g'
|
cat /tmp/myssh1-run /tmp/myssh2-run | perl -pe 's/(PID.)\d+/${1}00000/g'
|
||||||
rm /tmp/myssh1-run /tmp/myssh2-run
|
rm /tmp/myssh1-run /tmp/myssh2-run
|
||||||
|
|
||||||
echo '### Test use special ssh with > 9 simultaneous'
|
echo '### Test use special ssh with > 9 simultaneous'
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test of --retries - it should run 13 jobs in total'
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | nice parallel -j0 -k -L1
|
||||||
seq 0 12 | stdout parallel --progress -kj100% --retries 1 -S 12/localhost,1/:,parallel@server2 -vq \
|
|
||||||
perl -e 'sleep 1;print "job{}\n";exit({})' | \
|
|
||||||
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
|
|
||||||
|
|
||||||
echo '### Test of --retries - it should run 25 jobs in total'
|
echo '### Test of --retries - it should run 13 jobs in total';
|
||||||
seq 0 12 | stdout parallel --progress -kj100% --retries 2 -S 12/localhost,1/:,parallel@server2 -vq \
|
seq 0 12 | stdout parallel --progress -kj100% --retries 1 -S 12/localhost,1/:,parallel@server2 -vq
|
||||||
perl -e 'sleep 1;print "job{}\n";exit({})' | \
|
perl -e 'sleep 1;print "job{}\n";exit({})' |
|
||||||
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
|
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
|
||||||
|
|
||||||
echo '### Test of --retries - it should run 49 jobs in total'
|
echo '### Test of --retries - it should run 25 jobs in total';
|
||||||
seq 0 12 | stdout parallel --progress -kj100% --retries 4 -S 12/localhost,1/:,parallel@server2 -vq \
|
seq 0 12 | stdout parallel --progress -kj100% --retries 2 -S 12/localhost,1/:,parallel@server2 -vq
|
||||||
perl -e 'sleep 1;print "job{}\n";exit({})' | \
|
perl -e 'sleep 1;print "job{}\n";exit({})' |
|
||||||
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
|
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
|
||||||
|
|
||||||
|
echo '### Test of --retries - it should run 49 jobs in total';
|
||||||
|
seq 0 12 | stdout parallel --progress -kj100% --retries 4 -S 12/localhost,1/:,parallel@server2 -vq
|
||||||
|
perl -e 'sleep 1;print "job{}\n";exit({})' |
|
||||||
|
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
|
||||||
|
EOF
|
||||||
echo '### Bug with --retries'
|
echo '### Bug with --retries'
|
||||||
seq 1 8 | parallel --retries 2 --sshlogin 8/localhost,8/: -j+0 "hostname; false" | wc -l
|
seq 1 8 | parallel --retries 2 --sshlogin 8/localhost,8/: -j+0 "hostname; false" | wc -l
|
||||||
seq 1 8 | parallel --retries 2 --sshlogin 8/localhost,8/: -j+1 "hostname; false" | wc -l
|
seq 1 8 | parallel --retries 2 --sshlogin 8/localhost,8/: -j+1 "hostname; false" | wc -l
|
||||||
|
@ -33,5 +35,3 @@ seq 1 4 | parallel --retries 2 --sshlogin 2/localhost,2/: -j1 "hostname; false"
|
||||||
seq 1 4 | parallel --retries 2 --sshlogin 1/localhost,1/: -j1 "hostname; false" | wc -l
|
seq 1 4 | parallel --retries 2 --sshlogin 1/localhost,1/: -j1 "hostname; false" | wc -l
|
||||||
seq 1 2 | parallel --retries 2 --sshlogin 1/localhost,1/: -j1 "hostname; false" | wc -l
|
seq 1 2 | parallel --retries 2 --sshlogin 1/localhost,1/: -j1 "hostname; false" | wc -l
|
||||||
|
|
||||||
echo '### Test of --retries on unreachable host'
|
|
||||||
seq 1 10 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ PARALLEL="-k --jobs 1 echo 1" parallel -v echo 2 ::: a b c
|
||||||
|
|
||||||
echo '### Test ugly quoting from $PARALLEL'
|
echo '### Test ugly quoting from $PARALLEL'
|
||||||
PARALLEL="-k --jobs 1 perl -pe '\$a=1; print\$a'" parallel -v ::: <(echo a) <(echo b)
|
PARALLEL="-k --jobs 1 perl -pe '\$a=1; print\$a'" parallel -v ::: <(echo a) <(echo b)
|
||||||
PARALLEL='-k --jobs 1 -S '$SERVER1' perl -pe "\\$a=1; print\\$a"' parallel -v ::: /bin/gunzip
|
PARALLEL='-k --jobs 1 -S '$SERVER1' perl -pe "\\$a=1; print\\$a"' parallel -v '<(echo {})' ::: foo
|
||||||
|
|
||||||
echo '### Test ugly quoting from profile file'
|
echo '### Test ugly quoting from profile file'
|
||||||
cat <<EOF >~/.parallel/test_profile
|
cat <<EOF >~/.parallel/test_profile
|
||||||
|
@ -36,33 +36,33 @@ cat <<EOF >~/.parallel/test_profile
|
||||||
EOF
|
EOF
|
||||||
parallel -v -J test_profile ::: <(echo a) <(echo b)
|
parallel -v -J test_profile ::: <(echo a) <(echo b)
|
||||||
|
|
||||||
PARALLEL='-k --jobs 1 echo' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -v ::: /bin/gunzip
|
PARALLEL='-k --jobs 1 echo' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -v ::: foo
|
||||||
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a"' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -vv ::: /bin/gunzip
|
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a"' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -vv '<(echo {})' ::: foo
|
||||||
|
|
||||||
echo '### Test quoting of $ in command from profile file'
|
echo '### Test quoting of $ in command from profile file'
|
||||||
cat <<EOF >~/.parallel/test_profile
|
cat <<EOF >~/.parallel/test_profile
|
||||||
-k --jobs 1 perl -pe '\\\$a=1; print \\\$a'
|
-k --jobs 1 perl -pe '\\\$a=1; print \\\$a'
|
||||||
EOF
|
EOF
|
||||||
parallel -v -J test_profile -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 ::: /bin/gunzip
|
parallel -v -J test_profile -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 '<(echo {})' ::: foo
|
||||||
|
|
||||||
echo '### Test quoting of $ in command from $PARALLEL'
|
echo '### Test quoting of $ in command from $PARALLEL'
|
||||||
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a" ' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -v ::: /bin/gunzip
|
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a" ' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -v '<(echo {})' ::: foo
|
||||||
|
|
||||||
echo '### Test quoting of space in arguments (-S) from profile file'
|
echo '### Test quoting of space in arguments (-S) from profile file'
|
||||||
cat <<EOF >~/.parallel/test_profile
|
cat <<EOF >~/.parallel/test_profile
|
||||||
-k --jobs 1 -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
|
-k --jobs 1 -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
|
||||||
EOF
|
EOF
|
||||||
parallel -v -J test_profile ::: /bin/gunzip
|
parallel -v -J test_profile '<(echo {})' ::: foo
|
||||||
|
|
||||||
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
|
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
|
||||||
PARALLEL='-k --jobs 1 -S ssh\ '$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v ::: /bin/gunzip
|
PARALLEL='-k --jobs 1 -S ssh\ '$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v '<(echo {})' ::: foo
|
||||||
|
|
||||||
echo '### Test quoting of space in long arguments (--sshlogin) from profile file'
|
echo '### Test quoting of space in long arguments (--sshlogin) from profile file'
|
||||||
cat <<EOF >~/.parallel/test_profile
|
cat <<EOF >~/.parallel/test_profile
|
||||||
# testprofile
|
# testprofile
|
||||||
-k --jobs 1 --sshlogin ssh\ $SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
|
-k --jobs 1 --sshlogin ssh\ $SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
|
||||||
EOF
|
EOF
|
||||||
parallel -v -J test_profile ::: /bin/gunzip
|
parallel -v -J test_profile '<(echo {})' ::: foo
|
||||||
|
|
||||||
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
|
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
|
||||||
PARALLEL='-k --jobs 1 --sshlogin ssh\ '$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v ::: /bin/gunzip
|
PARALLEL='-k --jobs 1 --sshlogin ssh\ '$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v '<(echo {})' ::: foo
|
||||||
|
|
|
@ -3,24 +3,17 @@
|
||||||
SERVER1=parallel-server3
|
SERVER1=parallel-server3
|
||||||
SERVER2=parallel-server2
|
SERVER2=parallel-server2
|
||||||
|
|
||||||
echo '### Bug in --load'
|
# -L1 will join lines ending in ' '
|
||||||
parallel -k --load 30 sleep 0.1\;echo ::: 1 2 3
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k -L1
|
||||||
|
echo '### Bug in --load';
|
||||||
|
parallel -k --load 30 sleep 0.1\;echo ::: 1 2 3
|
||||||
|
|
||||||
echo '### Test --load locally'
|
echo '### Test --load locally';
|
||||||
# This will force the loadavg > 10
|
echo '# This will force the loadavg > 10';
|
||||||
while cat /proc/loadavg | egrep -q '^.\.' ; do
|
while uptime | grep -v age:.[1-9][0-9].[0-9][0-9] >/dev/null ; do (timeout 5 nice burnP6 2>/dev/null &) done;
|
||||||
(nice -n 19 burnP6 &) 2>/dev/null
|
stdout /usr/bin/time -f %e parallel --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
||||||
sleep .05;
|
|
||||||
done
|
|
||||||
killall -9 burnP6 2>/dev/null ;sleep 1;killall -9 burnP6 2>/dev/null
|
|
||||||
stdout /usr/bin/time -f %e parallel --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
|
||||||
|
|
||||||
echo '### Test --load remote'
|
echo '### Test --load remote';
|
||||||
# This will force the loadavg > 10
|
ssh parallel@$SERVER2 "while uptime | grep -v age:.[1-9][0-9].[0-9][0-9] >/dev/null ; do (timeout 5 nice burnP6 2>/dev/null &) done";
|
||||||
ssh parallel@$SERVER2 "while cat /proc/loadavg | egrep -q '^.\.' ; do
|
stdout /usr/bin/time -f %e parallel -S parallel@$SERVER2 --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
||||||
(nice -n 19 burnP6 &) 2>/dev/null
|
EOF
|
||||||
sleep .05;
|
|
||||||
done
|
|
||||||
killall -9 burnP6 2>/dev/null ;sleep 1;killall -9 burnP6 2>/dev/null
|
|
||||||
"
|
|
||||||
stdout /usr/bin/time -f %e parallel -S parallel@$SERVER2 --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ echo '### Test --pipe'
|
||||||
seq 1 1000000 >/tmp/parallel-seq
|
seq 1 1000000 >/tmp/parallel-seq
|
||||||
shuf --random-source=/tmp/parallel-seq /tmp/parallel-seq >/tmp/blocktest
|
shuf --random-source=/tmp/parallel-seq /tmp/parallel-seq >/tmp/blocktest
|
||||||
|
|
||||||
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k -L1
|
||||||
echo '### Test -N with multiple jobslots and multiple args'
|
echo '### Test -N with multiple jobslots and multiple args'
|
||||||
seq 1 1 | parallel -j2 -k -N 3 --pipe 'cat;echo a' | uniq
|
seq 1 1 | parallel -j2 -k -N 3 --pipe 'cat;echo a' | uniq
|
||||||
seq 1 2 | parallel -j2 -k -N 3 --pipe 'cat;echo bb' | uniq
|
seq 1 2 | parallel -j2 -k -N 3 --pipe 'cat;echo bb' | uniq
|
||||||
|
@ -29,89 +30,85 @@ echo -n 01a02a0a0a12a34a45a6a |
|
||||||
echo -n 01a02a0a0a12a34a45a6a |
|
echo -n 01a02a0a0a12a34a45a6a |
|
||||||
parallel -k -j1 --blocksize 1 --pipe --recend a -N 3 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k -j1 --blocksize 1 --pipe --recend a -N 3 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
|
|
||||||
# What is this?
|
echo '### Test 100M records with too big block';
|
||||||
#cat /tmp/blocktest <(echo 'a') /tmp/blocktest <(echo 'a') /tmp/blocktest <(echo 'a') /tmp/blocktest <(echo 'a') /tmp/blocktest |
|
(
|
||||||
# parallel -k -j1 --pipe --recend a -N 3 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1' | md5sum
|
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$'
|
||||||
|
|
||||||
echo '### Test 100M records with too big block'
|
echo '### Test 300M records with too small block';
|
||||||
(
|
(
|
||||||
echo start
|
echo start;
|
||||||
seq 1 1 | parallel -uj1 cat /tmp/blocktest\;true
|
seq 1 44 | parallel -uj1 cat /tmp/blocktest\;true;
|
||||||
echo end
|
echo end;
|
||||||
echo start
|
echo start;
|
||||||
seq 1 1 | parallel -uj1 cat /tmp/blocktest\;true
|
seq 1 44 | parallel -uj1 cat /tmp/blocktest\;true;
|
||||||
echo end
|
echo end;
|
||||||
echo start
|
echo start;
|
||||||
seq 1 1 | parallel -uj1 cat /tmp/blocktest\;true
|
seq 1 44 | parallel -uj1 cat /tmp/blocktest\;true;
|
||||||
echo end
|
echo end;
|
||||||
) | stdout parallel -k --block 10M -j2 --pipe --recstart 'start\n' wc -c |
|
) | stdout parallel -k --block 200M -j2 --pipe --recend 'end\n' wc -c |
|
||||||
egrep -v '^0$'
|
egrep -v '^0$'
|
||||||
|
|
||||||
echo '### Test 300M records with too small block'
|
echo '### Test --rrs -N1 --recend single';
|
||||||
(
|
echo 12a34a45a6 |
|
||||||
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$'
|
|
||||||
|
|
||||||
echo '### Test --rrs -N1 --recend single'
|
|
||||||
echo 12a34a45a6 |
|
|
||||||
parallel -k --pipe --recend a -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k --pipe --recend a -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
echo '### Test --rrs -N1 --regexp --recend alternate'
|
echo '### Test --rrs -N1 --regexp --recend alternate';
|
||||||
echo 12a34b45a6 |
|
echo 12a34b45a6 |
|
||||||
parallel -k --pipe --regexp --recend 'a|b' -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k --pipe --regexp --recend 'a|b' -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
echo '### Test --rrs -N1 --recend single'
|
echo '### Test --rrs -N1 --recend single';
|
||||||
echo 12a34b45a6 |
|
echo 12a34b45a6 |
|
||||||
parallel -k --pipe --recend 'b' -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k --pipe --recend 'b' -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
|
|
||||||
echo '### Test --rrs --recend single'
|
echo '### Test --rrs --recend single';
|
||||||
echo 12a34a45a6 |
|
echo 12a34a45a6 |
|
||||||
parallel -k --pipe --recend a --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k --pipe --recend a --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
echo '### Test --rrs --regexp --recend alternate'
|
echo '### Test --rrs --regexp --recend alternate';
|
||||||
echo 12a34b45a6 |
|
echo 12a34b45a6 |
|
||||||
parallel -k --pipe --regexp --recend 'a|b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k --pipe --regexp --recend 'a|b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
echo '### Test --rrs --recend single'
|
echo '### Test --rrs --recend single';
|
||||||
echo 12a34b45a6 |
|
echo 12a34b45a6 |
|
||||||
parallel -k --pipe --recend 'b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
parallel -k --pipe --recend 'b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo; sleep 0.1'
|
||||||
|
|
||||||
echo '### Test -N even'
|
echo '### Test -N even';
|
||||||
seq 1 10 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
seq 1 10 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
||||||
|
|
||||||
echo '### Test -N odd'
|
echo '### Test -N odd';
|
||||||
seq 1 11 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
seq 1 11 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
||||||
|
|
||||||
echo '### Test -N even+2'
|
echo '### Test -N even+2';
|
||||||
seq 1 12 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
seq 1 12 | parallel -j2 -k -N 2 --pipe cat";echo ole;sleep 0.\$PARALLEL_SEQ"
|
||||||
|
|
||||||
echo '### Test --recstart + --recend'
|
echo '### Test --recstart + --recend';
|
||||||
cat /tmp/blocktest | parallel -k --recstart 44 --recend "44" -j10 --pipe sort -n |md5sum
|
cat /tmp/blocktest | parallel -k --recstart 44 --recend "44" -j10 --pipe sort -n |md5sum
|
||||||
|
|
||||||
echo '### Race condition bug - 1 - would block'
|
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
|
seq 1 80 | nice parallel -j0 'seq 1 10| parallel --block 1 --recend "" --pipe cat;true' >/dev/null
|
||||||
|
|
||||||
echo '### Race condition bug - 2 - would block'
|
echo '### Race condition bug - 2 - would block';
|
||||||
seq 1 100 | nice parallel -j100 --block 1 --recend "" --pipe cat >/dev/null
|
seq 1 100 | nice parallel -j100 --block 1 --recend "" --pipe cat >/dev/null
|
||||||
|
|
||||||
echo '### Test --block size=1'
|
echo '### Test --block size=1';
|
||||||
seq 1 10| parallel --block 1 --files --recend "" --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {}
|
seq 1 10| parallel --block 1 --files --recend "" --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {}
|
||||||
|
|
||||||
echo '### Test --block size=1M -j10 --files - more jobs than data'
|
echo '### Test --block size=1M -j10 --files - more jobs than data';
|
||||||
sort -n < /tmp/blocktest | md5sum
|
sort -n < /tmp/blocktest | md5sum;
|
||||||
cat /tmp/blocktest | parallel --files --recend "\n" -j10 --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
cat /tmp/blocktest | parallel --files --recend "\n" -j10 --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
||||||
|
|
||||||
echo '### Test --block size=1M -j1 - more data than cpu'
|
echo '### Test --block size=1M -j1 - more data than cpu';
|
||||||
cat /tmp/blocktest | parallel --files --recend "\n" -j1 --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
cat /tmp/blocktest | parallel --files --recend "\n" -j1 --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
||||||
|
|
||||||
echo '### Test --block size=1M -j1 - more data than cpu'
|
echo '### Test --block size=1M -j1 - more data than cpu';
|
||||||
cat /tmp/blocktest | parallel --files --recend "\n" -j2 --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
cat /tmp/blocktest | parallel --files --recend "\n" -j2 --pipe sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
||||||
|
|
||||||
echo '### Test --pipe default settings'
|
|
||||||
cat /tmp/blocktest | parallel --pipe sort | sort -n | md5sum
|
|
||||||
|
|
||||||
|
echo '### Test --pipe default settings';
|
||||||
|
cat /tmp/blocktest | parallel --pipe sort | sort -n | md5sum
|
||||||
|
EOF
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test {#}'
|
# Moved to test12
|
||||||
seq 1 10 | parallel -k echo {#}
|
|
||||||
|
|
||||||
echo '### Test --seqreplace and line too long'
|
|
||||||
seq 1 100 | stdout parallel -k --seqreplace I echo $(perl -e 'print "I"x130000') \|wc
|
|
||||||
|
|
|
@ -3,18 +3,24 @@
|
||||||
SERVER1=parallel-server3
|
SERVER1=parallel-server3
|
||||||
SERVER2=parallel-server2
|
SERVER2=parallel-server2
|
||||||
|
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k
|
# -L1 will join lines ending in ' '
|
||||||
echo '### Test --onall'
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k -L1
|
||||||
parallel --onall -S parallel@$SERVER2,$SERVER1 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
|
echo '### Test --onall';
|
||||||
echo '### Test | --onall'
|
parallel --onall -S parallel@$SERVER2,$SERVER1 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
|
||||||
seq 3 | parallel --onall -S parallel@$SERVER2,$SERVER1 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c :::: -
|
|
||||||
echo '### Test --onall -u'
|
echo '### Test | --onall';
|
||||||
parallel --onall -S parallel@$SERVER2,$SERVER1 -u '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort
|
seq 3 | parallel --onall -S parallel@$SERVER2,$SERVER1 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c :::: -
|
||||||
echo '### Test --nonall'
|
|
||||||
parallel --nonall -k -S parallel@$SERVER2,$SERVER1 'hostname' | sort
|
echo '### Test --onall -u';
|
||||||
echo '### Test --nonall -u'
|
parallel --onall -S parallel@$SERVER2,$SERVER1 -u '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort
|
||||||
parallel --nonall -S parallel@$SERVER2,$SERVER1 -u 'hostname|grep -q nlv.pi.dk && sleep 2; hostname;sleep 4;hostname;'
|
|
||||||
echo '### Test read sshloginfile from STDIN'
|
echo '### Test --nonall';
|
||||||
echo nlv.pi.dk | parallel -S - --nonall hostname
|
parallel --nonall -k -S parallel@$SERVER2,$SERVER1 'hostname' | sort
|
||||||
echo nlv.pi.dk | parallel --sshloginfile - --nonall hostname
|
|
||||||
|
echo '### Test --nonall -u';
|
||||||
|
parallel --nonall -S parallel@$SERVER2,$SERVER1 -u 'hostname|grep -q nlv.pi.dk && sleep 2; hostname;sleep 4;hostname;'
|
||||||
|
|
||||||
|
echo '### Test read sshloginfile from STDIN';
|
||||||
|
echo nlv.pi.dk | parallel -S - --nonall hostname;
|
||||||
|
echo nlv.pi.dk | parallel --sshloginfile - --nonall hostname
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -8,7 +8,7 @@ echo '### Test --return of weirdly named file'
|
||||||
stdout parallel --return {} -vv -S $SERVER1 echo '>'{} ::: 'aa<${#}" b'; rm 'aa<${#}" b'
|
stdout parallel --return {} -vv -S $SERVER1 echo '>'{} ::: 'aa<${#}" b'; rm 'aa<${#}" b'
|
||||||
|
|
||||||
echo '### Test if remote login shell is csh'
|
echo '### Test if remote login shell is csh'
|
||||||
stdout parallel -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c
|
stdout parallel -k -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c
|
||||||
|
|
||||||
echo '### Test {} multiple times in different commands'
|
echo '### Test {} multiple times in different commands'
|
||||||
seq 10 | parallel -v -Xj1 echo {} \; echo {}
|
seq 10 | parallel -v -Xj1 echo {} \; echo {}
|
||||||
|
|
|
@ -1,2 +1,14 @@
|
||||||
### Test niceload
|
### Test niceload
|
||||||
.........
|
..........
|
||||||
|
### --rm and --runmem
|
||||||
|
OK
|
||||||
|
OK
|
||||||
|
### -N and --noswap
|
||||||
|
0
|
||||||
|
0
|
||||||
|
### -H and --hard
|
||||||
|
OK
|
||||||
|
OK
|
||||||
|
### -f and --factor
|
||||||
|
f 0.1 first
|
||||||
|
factor last
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Force outside the file handle limit
|
### Test Force outside the file handle limit, 2009-02-17 Gave fork error
|
||||||
Start
|
Start
|
||||||
end
|
end
|
||||||
|
|
|
@ -1 +1,38 @@
|
||||||
|
echo '### Test if we can deal with output > 4 GB'
|
||||||
|
### Test if we can deal with output > 4 GB
|
||||||
|
echo | niceload --io 9 -H parallel -q perl -e '"\$a=\"x\"x1000000;for(0..4300){print \$a}"' | md5sum
|
||||||
46a318993dfc8e2afd71ff2bc6f605f1 -
|
46a318993dfc8e2afd71ff2bc6f605f1 -
|
||||||
|
echo '### Test {#}'
|
||||||
|
### Test {#}
|
||||||
|
seq 1 10 | parallel -k echo {#}
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
echo '### Test --seqreplace and line too long'
|
||||||
|
### Test --seqreplace and line too long
|
||||||
|
seq 1 100 | stdout parallel -k --seqreplace I echo $(perl -e 'print "I"x130000') \|wc
|
||||||
|
1 1 130001
|
||||||
|
1 1 130001
|
||||||
|
1 1 130001
|
||||||
|
1 1 130001
|
||||||
|
1 1 130001
|
||||||
|
1 1 130001
|
||||||
|
1 1 130001
|
||||||
|
1 1 130001
|
||||||
|
parallel: Command line too long (260009 >= 131071) at number 9: 10...
|
||||||
|
echo '### Test of --retries on unreachable host'
|
||||||
|
### Test of --retries on unreachable host
|
||||||
|
seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo
|
||||||
|
ssh: connect to host 4.3.2.1 port 22: Connection timed out
|
||||||
|
parallel: Warning: Could not figure out number of cpus on 4.3.2.1 (). Using 1
|
||||||
|
echo 1
|
||||||
|
1
|
||||||
|
echo 2
|
||||||
|
2
|
||||||
|
|
|
@ -76,7 +76,7 @@ ls: cannot access tmp/parallel.file*: No such file or directory
|
||||||
OK
|
OK
|
||||||
Input for ssh
|
Input for ssh
|
||||||
parallel-server3 rsync --server -lDrRze.iLsf . .
|
parallel-server3 rsync --server -lDrRze.iLsf . .
|
||||||
parallel-server3 PARALLEL_SEQ=2;export PARALLEL_SEQ;PARALLEL_PID=00000;export PARALLEL_PID; cat tmp/parallel.file.'
|
parallel-server3 eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ 2\; setenv PARALLEL_PID 00000 || echo PARALLEL_SEQ=2\;export PARALLEL_SEQ\;PARALLEL_PID=00000\;export PARALLEL_PID` ; cat tmp/parallel.file.'
|
||||||
'newline2 > tmp/parallel.file.'
|
'newline2 > tmp/parallel.file.'
|
||||||
'newline2.out;cat tmp/parallel.file.'
|
'newline2.out;cat tmp/parallel.file.'
|
||||||
'newline2 > tmp/parallel.file.'
|
'newline2 > tmp/parallel.file.'
|
||||||
|
@ -88,7 +88,7 @@ parallel-server3 rsync --server --sender -lDrRze.iLsf --remove-source-files . ./
|
||||||
parallel-server3 rm -f ./tmp/parallel.file.'
|
parallel-server3 rm -f ./tmp/parallel.file.'
|
||||||
'newline2; rmdir 2>/dev/null ./tmp
|
'newline2; rmdir 2>/dev/null ./tmp
|
||||||
-l parallel parallel-server2 rsync --server -lDrRze.iLsf . .
|
-l parallel parallel-server2 rsync --server -lDrRze.iLsf . .
|
||||||
parallel@parallel-server2 PARALLEL_SEQ=1;export PARALLEL_SEQ;PARALLEL_PID=00000;export PARALLEL_PID; cat tmp/parallel.file.'
|
parallel@parallel-server2 eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ 1\; setenv PARALLEL_PID 00000 || echo PARALLEL_SEQ=1\;export PARALLEL_SEQ\;PARALLEL_PID=00000\;export PARALLEL_PID` ; cat tmp/parallel.file.'
|
||||||
'newline1 > tmp/parallel.file.'
|
'newline1 > tmp/parallel.file.'
|
||||||
'newline1.out;cat tmp/parallel.file.'
|
'newline1.out;cat tmp/parallel.file.'
|
||||||
'newline1 > tmp/parallel.file.'
|
'newline1 > tmp/parallel.file.'
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
### Test $PARALLEL - single line
|
### Test $PARALLEL - single line
|
||||||
1
|
1
|
||||||
ssh -l parallel parallel-server2 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 1;
|
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
|
||||||
1
|
1
|
||||||
ssh parallel-server3 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 2;
|
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
|
||||||
2
|
2
|
||||||
### Test $PARALLEL - multi line
|
### Test $PARALLEL - multi line
|
||||||
ssh -l parallel parallel-server2 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 1;
|
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
|
||||||
1
|
1
|
||||||
ssh parallel-server3 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 2;
|
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
|
||||||
2
|
2
|
||||||
### Test ~/.parallel/config - single line
|
### Test ~/.parallel/config - single line
|
||||||
ssh -l parallel parallel-server2 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 1;
|
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
|
||||||
1
|
1
|
||||||
ssh parallel-server3 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 2;
|
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
|
||||||
2
|
2
|
||||||
### Test ~/.parallel/config - multi line
|
### Test ~/.parallel/config - multi line
|
||||||
ssh -l parallel parallel-server2 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 1;
|
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
|
||||||
1
|
1
|
||||||
ssh parallel-server3 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; echo\ 2;
|
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
|
||||||
2
|
2
|
||||||
|
|
|
@ -20,26 +20,3 @@
|
||||||
4
|
4
|
||||||
4
|
4
|
||||||
2
|
2
|
||||||
### Test of --retries on unreachable host
|
|
||||||
ssh: connect to host 4.3.2.1 port 22: Connection timed out
|
|
||||||
parallel: Warning: Could not figure out number of cpus on 4.3.2.1 (). Using 1
|
|
||||||
echo 1
|
|
||||||
1
|
|
||||||
echo 2
|
|
||||||
2
|
|
||||||
echo 3
|
|
||||||
3
|
|
||||||
echo 4
|
|
||||||
4
|
|
||||||
echo 5
|
|
||||||
5
|
|
||||||
echo 6
|
|
||||||
6
|
|
||||||
echo 7
|
|
||||||
7
|
|
||||||
echo 8
|
|
||||||
8
|
|
||||||
echo 9
|
|
||||||
9
|
|
||||||
echo 10
|
|
||||||
10
|
|
||||||
|
|
|
@ -28,48 +28,32 @@ perl -pe '$a=1; print$a' /dev/fd/63
|
||||||
1a
|
1a
|
||||||
perl -pe '$a=1; print$a' /dev/fd/62
|
perl -pe '$a=1; print$a' /dev/fd/62
|
||||||
1b
|
1b
|
||||||
perl -pe "\$a=1; print\$a" /bin/gunzip
|
perl -pe "\$a=1; print\$a" <(echo foo)
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
### Test ugly quoting from profile file
|
### Test ugly quoting from profile file
|
||||||
perl -pe '$a=1; print $a' /dev/fd/63
|
perl -pe '$a=1; print $a' /dev/fd/63
|
||||||
1a
|
1a
|
||||||
perl -pe '$a=1; print $a' /dev/fd/62
|
perl -pe '$a=1; print $a' /dev/fd/62
|
||||||
1b
|
1b
|
||||||
echo /bin/gunzip
|
echo foo
|
||||||
/bin/gunzip
|
foo
|
||||||
ssh parallel-server3 ssh parallel@parallel-server2 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; perl\ -pe\ \"\\\$a=1\;\ print\ \\\$a\"\ /bin/gunzip;
|
ssh parallel-server3 ssh parallel@parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' perl\ -pe\ \"\\\$a=1\;\ print\ \\\$a\"\ \<\(echo\ foo\);
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
### Test quoting of $ in command from profile file
|
### Test quoting of $ in command from profile file
|
||||||
perl -pe '$a=1; print $a' /bin/gunzip
|
perl -pe '$a=1; print $a' <(echo foo)
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
### Test quoting of $ in command from $PARALLEL
|
### Test quoting of $ in command from $PARALLEL
|
||||||
perl -pe "\$a=1; print \$a" /bin/gunzip
|
perl -pe "\$a=1; print \$a" <(echo foo)
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
### Test quoting of space in arguments (-S) from profile file
|
### Test quoting of space in arguments (-S) from profile file
|
||||||
perl -pe '$a=1; print $a' /bin/gunzip
|
perl -pe '$a=1; print $a' <(echo foo)
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
### Test quoting of space in arguments (-S) from $PARALLEL
|
### Test quoting of space in arguments (-S) from $PARALLEL
|
||||||
perl -pe "\$a=1; print \$a" /bin/gunzip
|
perl -pe "\$a=1; print \$a" <(echo foo)
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
### Test quoting of space in long arguments (--sshlogin) from profile file
|
### Test quoting of space in long arguments (--sshlogin) from profile file
|
||||||
perl -pe '$a=1; print $a' /bin/gunzip
|
perl -pe '$a=1; print $a' <(echo foo)
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
### Test quoting of space in arguments (-S) from $PARALLEL
|
### Test quoting of space in arguments (-S) from $PARALLEL
|
||||||
perl -pe "\$a=1; print \$a" /bin/gunzip
|
perl -pe "\$a=1; print \$a" <(echo foo)
|
||||||
1#!/bin/bash
|
1foo
|
||||||
1PATH=${GZIP_BINDIR-'/bin'}:$PATH
|
|
||||||
1exec gzip -d "$@"
|
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
nice -n1 bash -c PAR=a\ bash\ -c\ \"echo\ \ \\\$PAR\ b\"
|
nice -n1 bash -c PAR=a\ bash\ -c\ \"echo\ \ \\\$PAR\ b\"
|
||||||
a b
|
a b
|
||||||
### Test --nice remote
|
### Test --nice remote
|
||||||
ssh one-server PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; nice\ -n1\ bash\ -c\ PAR=a\\\ bash\\\ -c\\\ \\\"echo\\\ \\\ \\\\\\\$PAR\\\ b\\\";
|
ssh one-server 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' nice\ -n1\ bash\ -c\ PAR=a\\\ bash\\\ -c\\\ \\\"echo\\\ \\\ \\\\\\\$PAR\\\ b\\\";
|
||||||
a b
|
a b
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
### Test --load locally
|
### Test --load locally
|
||||||
|
# This will force the loadavg > 10
|
||||||
OK
|
OK
|
||||||
### Test --load remote
|
### Test --load remote
|
||||||
OK
|
OK
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
### Test {#}
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
### Test --seqreplace and line too long
|
|
||||||
1 1 130001
|
|
||||||
1 1 130001
|
|
||||||
1 1 130001
|
|
||||||
1 1 130001
|
|
||||||
1 1 130001
|
|
||||||
1 1 130001
|
|
||||||
1 1 130001
|
|
||||||
1 1 130001
|
|
||||||
parallel: Command line too long (260009 >= 131071) at number 9: 10...
|
|
Loading…
Reference in a new issue