diff --git a/src/parallel b/src/parallel index 26e60d2f..5c87c3e9 100755 --- a/src/parallel +++ b/src/parallel @@ -4956,7 +4956,24 @@ sub parse_host_filtering() { if(/parallel: Warning: Cannot figure out number of/) { next; } - if(not defined $nsockets{$col[0]}) { + if(/\t(perl: warning:|LANGUAGE =|LC_ALL =|LANG =|are supported and installed|Disconnected from|Received disconnect from)/ + or + /\tWarning: / + ) { + # Skip these (from perl): + # perl: warning: Setting locale failed. + # perl: warning: Please check that your locale settings: + # LANGUAGE = (unset), + # LC_ALL = (unset), + # LANG = "en_US.UTF-8" + # are supported and installed on your system. + # perl: warning: Falling back to the standard locale ("C"). + # Disconnected from 127.0.0.1 port 22 + # + # Skip these (from ssh): + # Warning: Permanently added * to the list of known hosts. + # Warning: Identity file * not accessible: * + } elsif(not defined $nsockets{$col[0]}) { $nsockets{$col[0]} = $col[1]; } elsif(not defined $ncores{$col[0]}) { $ncores{$col[0]} = $col[1]; @@ -4966,16 +4983,6 @@ sub parse_host_filtering() { $maxlen{$col[0]} = $col[1]; } elsif(not defined $echo{$col[0]}) { $echo{$col[0]} = $col[1]; - } elsif(m/perl: warning:|LANGUAGE =|LC_ALL =|LANG =|are supported and installed|Disconnected from|Received disconnect from/) { - # Skip these: - # perl: warning: Setting locale failed. - # perl: warning: Please check that your locale settings: - # LANGUAGE = (unset), - # LC_ALL = (unset), - # LANG = "en_US.UTF-8" - # are supported and installed on your system. - # perl: warning: Falling back to the standard locale ("C"). - # Disconnected from 127.0.0.1 port 22 } else { ::die_bug("host check too many col0: $_"); } diff --git a/testsuite/tests-to-run/parallel-local-10s.sh b/testsuite/tests-to-run/parallel-local-10s.sh index 181a6489..a2d6eb60 100644 --- a/testsuite/tests-to-run/parallel-local-10s.sh +++ b/testsuite/tests-to-run/parallel-local-10s.sh @@ -11,13 +11,15 @@ par_ll_long_line() { echo '### --latest-line with lines longer than terminal width' COLUMNS=30 parallel --delay 0.3 --tagstring '{=$_.="x"x$_=}' \ - --ll 'echo {}00000 | sed -e "s/$/' {1..100} /'"' ::: {1..30} + --ll 'echo {}00000 | sed -e "s/$/' {1..100} /'"' ::: {1..30} | + perl -pe 's/.\[A//' } par_ll_color_long_line() { echo '### --latest-line --color with lines longer than terminal width' COLUMNS=30 parallel --delay 0.3 --color --tagstring '{=$_.="x"x$_=}' \ - --ll 'echo {}00000 | sed -e "s/$/' {1..100} /'"' ::: {1..30} + --ll 'echo {}00000 | sed -e "s/$/' {1..100} /'"' ::: {1..30} | + perl -pe 's/.\[A//' } par_reload_slf_every_second() { diff --git a/testsuite/tests-to-run/parallel-local-ssh8.sh b/testsuite/tests-to-run/parallel-local-ssh8.sh index 5eedc70c..542309cf 100644 --- a/testsuite/tests-to-run/parallel-local-ssh8.sh +++ b/testsuite/tests-to-run/parallel-local-ssh8.sh @@ -130,6 +130,11 @@ par_csh_environment_variables_set() { parallel -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a } +par_filter_host_noise() { + echo '### bug #63296: --filter-hosts option gets confused by output from SSH command' + parallel --ssh "ssh -i id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null " -S localhost --nonall --tag --filter-hosts echo OK + parallel --ssh "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null " -S localhost --nonall --tag --filter-hosts echo OK +} export -f $(compgen -A function | grep par_) #compgen -A function | grep par_ | sort | parallel --delay $D -j$P --tag -k '{} 2>&1' diff --git a/testsuite/tests-to-run/parallel-local10.sh b/testsuite/tests-to-run/parallel-local10.sh index 40a31c62..d0a9b73b 100755 --- a/testsuite/tests-to-run/parallel-local10.sh +++ b/testsuite/tests-to-run/parallel-local10.sh @@ -16,5 +16,6 @@ echo perl | stdout strace -ff perl32 `which parallel` echo | grep open | grep perl | + grep -v '\$' | grep -v '] read(6' | grep -v input-files/perllib diff --git a/testsuite/wanted-results/parallel-local-10s b/testsuite/wanted-results/parallel-local-10s index 774ae2c8..019b3c2a 100644 --- a/testsuite/wanted-results/parallel-local-10s +++ b/testsuite/wanted-results/parallel-local-10s @@ -531,6 +531,7 @@ par_line_buffer 55 55 120 par_line_buffer These must diff: 1 par_ll_color_long_line ### --latest-line --color with lines longer than terminal width par_ll_color_long_line par_ll_color_long_line 1x 100000 1 2 3 4 5 6 7 8(B +par_ll_color_long_line par_ll_color_long_line par_ll_color_long_line 2xx 200000 1 2 3 4 5 6 7 8(B par_ll_color_long_line par_ll_color_long_line 3xxx 300000 1 2 3 4 5 6 7 8(B par_ll_color_long_line par_ll_color_long_line 4xxxx 400000 1 2 3 4 5 6 7 8(B @@ -562,6 +563,7 @@ par_ll_color_long_line par_ll_color_long_line 29xxxxxxxxxxxxxxxxxxxxxxxxxxxx[4 par_ll_color_long_line par_ll_color_long_line 30xxxxxxxxxxxxxxxxxxxxxxxxxxxx(B par_ll_long_line ### --latest-line with lines longer than terminal width par_ll_long_line par_ll_long_line 1x 100000 1 2 3 4 5 6 7 8 +par_ll_long_line par_ll_long_line par_ll_long_line 2xx 200000 1 2 3 4 5 6 7 8 par_ll_long_line par_ll_long_line 3xxx 300000 1 2 3 4 5 6 7 8 par_ll_long_line par_ll_long_line 4xxxx 400000 1 2 3 4 5 6 7 8 diff --git a/testsuite/wanted-results/parallel-local-ssh8 b/testsuite/wanted-results/parallel-local-ssh8 index aa5833d8..6d06a300 100644 --- a/testsuite/wanted-results/parallel-local-ssh8 +++ b/testsuite/wanted-results/parallel-local-ssh8 @@ -4,6 +4,12 @@ par_bar_m 50 par_bar_m 100 par_csh_environment_variables_set ### Check $PARALLEL_PID $PARALLEL_SEQ are set in csh par_csh_environment_variables_set 3 +par_filter_host_noise ### bug #63296: --filter-hosts option gets confused by output from SSH command +par_filter_host_noise localhost OK +par_filter_host_noise localhost Warning: Identity file id_rsa not accessible: No such file or directory. +par_filter_host_noise localhost Warning: Permanently added 'localhost' (ED25519) to the list of known hosts. par_filter_host_noise localhost +par_filter_host_noise localhost OK +par_filter_host_noise localhost Warning: Permanently added 'localhost' (ED25519) to the list of known hosts. par_filter_host_noise localhost par_keep_order ### Test --keep-order par_keep_order job0 par_keep_order job1