2014-07-15 00:40:38 +00:00
|
|
|
echo '### bug #42089: --results with arg > 256 chars (should be 1 char shorter)'
|
2014-04-19 08:11:32 +00:00
|
|
|
### bug #42089: --results with arg > 256 chars (should be 1 char shorter)
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --results parallel_test_dir echo ::: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456; ls parallel_test_dir/1/
|
2014-04-19 08:11:32 +00:00
|
|
|
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
|
|
|
|
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
|
2014-07-15 00:40:38 +00:00
|
|
|
rm -rf parallel_test_dir
|
|
|
|
echo '**'
|
2014-04-19 08:11:32 +00:00
|
|
|
**
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834'; seq 1 3 | parallel -j1 "sleep 2; echo {}" | parallel -kj2 echo
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2015-04-09 23:20:51 +00:00
|
|
|
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
|
2015-07-22 06:28:05 +00:00
|
|
|
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 '**'
|
2015-04-09 23:20:51 +00:00
|
|
|
bash-+-perl---bash---sleep
|
|
|
|
`-pstree
|
|
|
|
bash-+-perl---bash---sleep
|
|
|
|
`-pstree
|
|
|
|
bash---pstree
|
|
|
|
**
|
|
|
|
parallel: SIGTERM received. No new jobs will be started.
|
|
|
|
parallel: Waiting for these 1 jobs to finish. Send SIGTERM again to stop now.
|
2015-05-25 00:27:30 +00:00
|
|
|
parallel: bash -c sleep\ 120\ \&\ pid\=\$\!\;\ wait\ \$pid 1
|
2015-04-09 23:20:51 +00:00
|
|
|
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
|
2016-01-23 08:54:05 +00:00
|
|
|
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 & T=$!; sleep 5; pstree $$; kill -INT $T; sleep 1; pstree $$; echo '**'
|
2015-04-09 23:20:51 +00:00
|
|
|
bash-+-perl---bash---sleep
|
|
|
|
`-pstree
|
|
|
|
bash---pstree
|
2016-01-23 08:54:05 +00:00
|
|
|
**
|
|
|
|
echo '### Do children receive --termseq signals'
|
|
|
|
### Do children receive --termseq signals
|
2016-04-11 20:19:28 +00:00
|
|
|
show_signals() { perl -e 'for(keys %SIG) { $SIG{$_} = eval "sub { print STDERR \"Got $_\\n\"; }";} while(1){sleep 1}'; }; export -f show_signals; echo | stdout parallel --termseq TERM,200,TERM,100,TERM,50,KILL,25 -u --timeout 1 show_signals; echo | stdout parallel --termseq INT,200,TERM,100,KILL,25 -u --timeout 1 show_signals; sleep 3; echo '**'
|
2016-01-23 08:54:05 +00:00
|
|
|
Got TERM
|
|
|
|
Got TERM
|
|
|
|
Got TERM
|
|
|
|
Got INT
|
|
|
|
Got TERM
|
2016-04-11 20:19:28 +00:00
|
|
|
**
|
|
|
|
echo '### bug #47644: Wrong slot number replacement when resuming'
|
|
|
|
### bug #47644: Wrong slot number replacement when resuming
|
2016-08-03 21:45:13 +00:00
|
|
|
seq 0 20 | parallel -kj 4 --delay 0.2 --joblog /tmp/parallel-bug-47558 'sleep 1; echo {%} {=$_==10 and exit =}'; seq 0 20 | parallel -kj 4 --resume --delay 0.2 --joblog /tmp/parallel-bug-47558 'sleep 1; echo {%} {=$_==110 and exit =}'
|
2016-04-11 20:19:28 +00:00
|
|
|
1 0
|
|
|
|
2 1
|
|
|
|
3 2
|
|
|
|
4 3
|
|
|
|
1 4
|
|
|
|
2 5
|
|
|
|
3 6
|
|
|
|
4 7
|
|
|
|
1 8
|
|
|
|
2 9
|
|
|
|
3 10
|
|
|
|
4 11
|
|
|
|
1 12
|
|
|
|
2 13
|
|
|
|
3 14
|
|
|
|
4 15
|
|
|
|
1 16
|
|
|
|
2 17
|
|
|
|
3 18
|
|
|
|
4 19
|
|
|
|
1 20
|
2016-12-08 01:28:01 +00:00
|
|
|
echo '**'
|
|
|
|
**
|
|
|
|
echo '### --pipepart --block -# (# < 0)'
|
|
|
|
### --pipepart --block -# (# < 0)
|
2016-12-08 11:04:22 +00:00
|
|
|
seq 1000 > /run/shm/parallel$$; parallel -j2 -k --pipepart echo {#} :::: /run/shm/parallel$$; parallel -j2 -k --block -1 --pipepart echo {#}-2 :::: /run/shm/parallel$$; parallel -j2 -k --block -2 --pipepart echo {#}-4 :::: /run/shm/parallel$$; parallel -j2 -k --block -10 --pipepart echo {#}-20 :::: /run/shm/parallel$$; rm /run/shm/parallel$$
|
2016-12-08 01:28:01 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
|
10
|
|
|
|
11
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
|
16
|
|
|
|
17
|
|
|
|
18
|
|
|
|
19
|
|
|
|
20
|
|
|
|
1-2
|
|
|
|
2-2
|
2016-12-08 11:04:22 +00:00
|
|
|
1-4
|
|
|
|
2-4
|
|
|
|
3-4
|
|
|
|
4-4
|
|
|
|
1-20
|
|
|
|
2-20
|
|
|
|
3-20
|
|
|
|
4-20
|
|
|
|
5-20
|
|
|
|
6-20
|
|
|
|
7-20
|
|
|
|
8-20
|
|
|
|
9-20
|
|
|
|
10-20
|
|
|
|
11-20
|
|
|
|
12-20
|
|
|
|
13-20
|
|
|
|
14-20
|
|
|
|
15-20
|
|
|
|
16-20
|
|
|
|
17-20
|
|
|
|
18-20
|
|
|
|
19-20
|
|
|
|
20-20
|
2016-12-08 01:28:01 +00:00
|
|
|
echo '**'
|
|
|
|
**
|