Fixed bug #66379: sql: Relative path DBURLs for SQLite3 do not work

This commit is contained in:
Ole Tange 2024-10-22 00:29:28 +02:00
parent e47cf98377
commit 6e69bc6b38
12 changed files with 446 additions and 105 deletions

13
NEWS
View file

@ -1,3 +1,16 @@
20241122
New in this release:
* <<No new features. This is a candidate for a stable release.>>
* Bug fixes and man page updates.
News about GNU Parallel:
<<>>
20241022
New in this release:

View file

@ -4,6 +4,21 @@
Quote of the month:
ainda não inventaram palavras capazes de expressar minha gratidão aos desenvolvedores do GNU Parallel
-- nueidris @nueidris.kawaii.social
Und die Tage jetzt hab ich GNU parallel für mich entdeckt, auch ne nette Geschichte, gerade wenn's irgendwelche remote APIs sind.
-- Vince @dd1des.bsky.social
GNU parallel is so satisfying
-- James Coman @jcoman.bsky.social
gnu parallelすごい
-- たらたら@nosennyuu@twitter
GNU parallel is awesome. Use it more often in your scripts!
-- Wade @WadeGrimshire@twitter
by extreme do you mean extremely slow? you could do it at least 100x faster using awk + grep + gnu parallel
-- @ObssessedDev@twitter

View file

@ -112,8 +112,7 @@ lbry://@GnuParallel#4/parallel-20210322.tar.bz2
. .last-doitag.txt
file_path="`pwd`/parallel-$YYYYMMDD.tar.bz2"
title="GNU Parallel $YYYYMMDD ('$SPCTAG') [stable]"
#title="GNU Parallel $YYYYMMDD ('$SPCTAG') [stable]"
title="GNU Parallel $YYYYMMDD ('$SPCTAG')"
name="GNU-Parallel-$YYYYMMDD-$TAG"
author="Ole Tange"
@ -121,6 +120,7 @@ license="GNU GPLv3 or later"
thumbnail_url=https://www.gnu.org/software/parallel/logo-gray+black10000.png
channel_name="@GnuParallel"
tags_opt='--tag gnu --tag parallel --tag free --tag software'
release_time=$(date -d "$YYYYMMDD" +%s)
description="An easy way to support GNU Parallel is to tip on LBRY.
@ -141,8 +141,7 @@ lbrynet publish \
--license="$license" \
--thumbnail_url="$thumbnail_url" \
--channel_name="$channel_name" \
# --release_time="$release_time" \
--release_time="$release_time" \
== Update website ==
@ -267,14 +266,13 @@ from:tange@gnu.org
to:parallel@gnu.org, bug-parallel@gnu.org
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
Subject: GNU Parallel 20241022 ('Sinwar Nasrallah') released
Subject: GNU Parallel 20241122 ('#AhooDaryaei /Regn i valencia/us pres/Unite the kingdom/Tommy Robinson/Alex/Southport2/Georgien') released
GNU Parallel 20241022 ('Sinwar Nasrallah') has been released. It is available for download at: lbry://@GnuParallel:4
GNU Parallel 20241122 ('<<>>') has been released. It is available for download at: lbry://@GnuParallel:4
Quote of the month:
GNU Parallel is one of the most helpful tools I've been using recently, and it's just something like: parallel -j4 'gzip {}' ::: folder/*.csv
-- Milton Pividori @miltondp@twitter
<<>>
New in this release:
@ -284,13 +282,8 @@ New in this release:
News about GNU Parallel:
* Separate arguments with a custom separator in GNU Parallel https://boxofcuriosities.co.uk/post/separate-arguments-with-a-custom-separator-in-gnu-parallel
* GNU parallel is underrated https://amontalenti.com/2021/11/10/parallel
* Unlocking the Power of Supercomputers: My HPC Adventure with 2800 Cores and GNU Parallel https://augalip.com/2024/03/10/unlocking-the-power-of-supercomputers-my-hpc-adventure-with-2800-cores-and-gnu-parallel/
* Converting WebP Images to PNG Using parallel and dwebp https://bytefreaks.net/gnulinux/bash/converting-webp-images-to-png-using-parallel-and-dwebp
https://www.redhat.com/en/blog/gnu-parallel
https://erolrecep.github.io/posts/gnuparallel_for_your_terminal_tasks/
GNU Parallel - For people who live life in the parallel lane.

View file

@ -2888,7 +2888,7 @@ sub check_invalid_option_combinations() {
sub init_globals() {
# Defaults:
$Global::version = 20241022;
$Global::version = 20241120;
$Global::progname = 'parallel';
$::name = "GNU Parallel";
$Global::infinity = 2**31;
@ -15159,12 +15159,18 @@ sub check_permissions($) {
}
sub parse_dburl($) {
sub undef_if_empty {
if(defined($_[0]) and $_[0] eq "") {
return undef;
}
return $_[0];
}
my $url = shift;
my %options = ();
# sql:mysql://[[user][:password]@][host][:port]/[database[/table][?query]]
if($url=~m!^(?:sql:)? # You can prefix with 'sql:'
((?:oracle|ora|mysql|pg|postgres|postgresql)(?:s|ssl|)|
((?:oracle|ora|mysql|pg|postgres|postgresql|influx|influxdb)(?:s|ssl|)|
(?:sqlite|sqlite2|sqlite3|csv)):// # Databasedriver ($1)
(?:
([^:@/][^:@]*|) # Username ($2)
@ -15179,25 +15185,27 @@ sub parse_dburl($) {
)?
(?:
/
([^/?]*)? # Database ($6)
([^?]*)? # Database ($6)
)?
(?:
/
([^?]*)? # Table ($7)
)?
([^?/]*)? # Table ($7)
)
(?:
\?
(.*)? # Query ($8)
)?
$!ix) {
$options{databasedriver} = ::undef_if_empty(lc(uri_unescape($1)));
$options{user} = ::undef_if_empty(uri_unescape($2));
$options{password} = ::undef_if_empty(uri_unescape($3));
$options{host} = ::undef_if_empty(uri_unescape($4));
$options{port} = ::undef_if_empty(uri_unescape($5));
$options{database} = ::undef_if_empty(uri_unescape($6));
$options{table} = ::undef_if_empty(uri_unescape($7));
$options{query} = ::undef_if_empty(uri_unescape($8));
$options{databasedriver} = undef_if_empty(lc(uri_unescape($1)));
$options{user} = undef_if_empty(uri_unescape($2));
$options{password} = undef_if_empty(uri_unescape($3));
$options{host} = undef_if_empty(uri_unescape($4));
$options{port} = undef_if_empty(uri_unescape($5));
$options{database} = undef_if_empty(uri_unescape($6))
|| $options{user} || $ENV{'USER'};
$options{table} = undef_if_empty(uri_unescape($7))
|| $options{user} || $ENV{'USER'};
$options{query} = undef_if_empty(uri_unescape($8));
::debug("sql", "dburl $url\n");
::debug("sql", "databasedriver ", $options{databasedriver},
" user ", $options{user},

View file

@ -3124,7 +3124,7 @@ complete.
The format of a DBURL is:
[sql:]vendor://[[user][:pwd]@][host][:port]/[db]/table
[sql:]vendor://[[user][:pwd]@][host][:port]/[db]/[table]
E.g.
@ -3134,11 +3134,16 @@ E.g.
postgresql://scott:tiger@pg.example.com/pgdb/parjob
pg:///parjob
sqlite3:///%2Ftmp%2Fpardb.sqlite/parjob
sqlite:///file_in_current_dir.sqlite/my_table
csv:///%2Ftmp%2Fpardb/parjob
csv:///./file_in_current_dir
pg:////
Notice how / in the path of sqlite and CVS must be encoded as
Notice how / in the path of sqlite and CSV must be encoded as
%2F. Except the last / in CSV which must be a /.
I<db> and I<table> defaults to $USER: pg://// = pg:///$USER/$USER
It can also be an alias from ~/.sql/aliases:
:myalias mysql:///mydb/paralleljobs

47
src/sql
View file

@ -234,6 +234,18 @@ To quote special characters use %-encoding specified in
http://tools.ietf.org/html/rfc3986#section-2.1 (E.g. a password
containing '/' would contain '%2F').
csv:///%2Ftmp%2Fparallel-bug-56096/mytable
csv:////tmp/parallel-bug-56096/mytable
mysql://me@/me/
mysql:////
sqlite3:///%2Frun%2Fshm%2Fparallel.db
sqlite3:///%2Frun%2Fshm%2Fparallel.db/table
sqlite:///%2Ftmp%2Ffile.sqlite?SELECT
csv:///%2Ftmp%2Fparallel-CSV/OK
csv:///%2Fmust%2Ffail/fail
sqlite3:///%2Frun%2Fshm%2Fparallel.db
Examples:
mysql://scott:tiger@my.example.com/mydb
@ -245,12 +257,23 @@ Examples:
sql:sqlite2:////tmp/db.sqlite?SELECT * FROM foo;
sqlite3:///../db.sqlite3?SELECT%20*%20FROM%20foo;
Currently supported vendors: MySQL (mysql), MySQL with SSL (mysqls,
mysqlssl), Oracle (oracle, ora), PostgreSQL (postgresql, pg, pgsql,
postgres), PostgreSQL with SSL (postgresqlssl, pgs, pgsqlssl,
postgresssl, pgssl, postgresqls, pgsqls, postgress), SQLite2 (sqlite,
sqlite2), SQLite3 (sqlite3), InfluxDB 1.x (influx, influxdb), InfluxDB
with SSL (influxdbssl, influxdbs, influxs, influxssl)
Currently supported vendors:
=over 2
=item * MySQL (mysql) with SSL (mysqls, mysqlssl)
=item * Oracle (oracle, ora)
=item * PostgreSQL (postgresql, pg, pgsql, postgres) with SSL (postgresqlssl, pgs, pgsqlssl, postgresssl, pgssl, postgresqls, pgsqls, postgress)
=item * SQLite2 (sqlite, sqlite2)
=item * SQLite3 (sqlite3)
=item * InfluxDB 1.x (influx, influxdb) with SSL (influxdbssl, influxdbs, influxs, influxssl)
=back
Aliases must start with ':' and are read from
/etc/sql/aliases and ~/.sql/aliases. The user's own
@ -1152,9 +1175,9 @@ sub parse_dburl {
my %options = ();
# sql:mysql://[[user][:password]@][host][:port]/[database[?sql query]]
if($url=~m!(?:sql:)? # You can prefix with 'sql:'
if($url=~m!^(?:sql:)? # You can prefix with 'sql:'
((?:oracle|ora|mysql|pg|postgres|postgresql|influx|influxdb)(?:s|ssl|)|
(?:sqlite|sqlite2|sqlite3)):// # Databasedriver ($1)
(?:sqlite|sqlite2|sqlite3|csv)):// # Databasedriver ($1)
(?:
([^:@/][^:@]*|) # Username ($2)
(?:
@ -1168,21 +1191,21 @@ sub parse_dburl {
)?
(?:
/
([^?/]*)? # Database ($6)
([^?]*)? # Database ($6)
)?
(?:
/?
\?
(.*)? # Query ($7)
)?
!x) {
$options{databasedriver} = undef_if_empty(uri_unescape($1));
$!ix) {
$options{databasedriver} = undef_if_empty(lc(uri_unescape($1)));
$options{user} = undef_if_empty(uri_unescape($2));
$options{password} = undef_if_empty(uri_unescape($3));
$options{host} = undef_if_empty(uri_unescape($4));
$options{port} = undef_if_empty(uri_unescape($5));
$options{database} = undef_if_empty(uri_unescape($6))
|| $options{user};
|| $options{user} || $ENV{'USER'};
$options{query} = undef_if_empty(uri_unescape($7));
debug("dburl $url\n");
debug("databasedriver ",$options{databasedriver}, " user ", $options{user},

View file

@ -8,6 +8,11 @@
# Each should be taking 1-3s and be possible to run in parallel
# I.e.: No race conditions, no logins
par_--pipe--block-2() {
echo '### --block -2'
yes `seq 100` | head -c 100M | parallel -j 5 --block -2 -k --pipe wc
}
par_keep_order_make_job_1_output_fast() {
echo '# EXAMPLE: Keep order, but make job 1 output fast'
doit() {

View file

@ -8,6 +8,88 @@
# Each should be taking 30-100s and be possible to run in parallel
# I.e.: No race conditions, no logins
par__dburl_parsing() {
mkdir -p test
(
cd test
export me=$(whoami)
pwd=$(pwd)
pwdurl=$(pwd | perl -pe 's:/:%2F:g')
dburls=(
# relative path - no dir
# relative path - with dir
# full path
# default
csv:///mydir/$me
csv:///./mydir/$me
csv:///.%2Fmydir/$me
csv:///$pwd/$me
csv:///$pwdurl/$me
csv:///./$me
csv:///./
# this defaults to $me/$me = non-existent dir
csv:///$me/$me
csv:////$me
csv:///$me/
csv:////
csv:///
sqlite3:///$me/$me
sqlite3://mydir/$me/$me
sqlite3:///mydir/$me/$me
sqlite3:///mydir%2F$me/$me
sqlite3:///$pwd/$me/$me
sqlite3:///$pwdurl/$me/$me
sqlite3:///$me/
sqlite3:///$me/$me
sqlite3:////$me
sqlite3:///$me/
sqlite3:////
sqlite3:///
sqlite:///$me/$me
sqlite://mydir/$me/$me
sqlite:///mydir/$me/$me
sqlite:///mydir%2F$me/$me
sqlite:///$pwd/$me/$me
sqlite:///$pwdurl/$me/$me
sqlite:///$me/
sqlite:///$me/$me
sqlite:////$me
sqlite:///$me/
sqlite:////
sqlite:///
mysql://$me@/$me/$me
mysql://$me@/$me/
mysql://$me@//
mysql:///$me/$me
mysql:////$me
mysql:///$me/
mysql:////
mysql:///
pg://$me@/$me/$me
pg://$me@/$me/
pg://$me@//
pg:///$me/$me
pg:////$me
pg:///$me/
pg:////
pg:///
)
test_dburl() {
mkdir mydir
parallel -k --sqlandworker $1 echo ::: {1..3}
rm -rf "$me" mydir
}
export -f test_dburl
parallel -j1 --tag test_dburl ::: ${dburls[@]}
)
rmdir test
}
par_sshlogin_parsing() {
echo '### Generate sshlogins to test parsing'
sudo sshd -p 22222
@ -564,7 +646,7 @@ par_memfree() {
grep -v TERM | grep -v ps/display.c
}
par_test_detected_shell() {
par__test_detected_shell() {
echo '### bug #42913: Dont use $SHELL but the shell currently running'
shells="bash csh dash fish fizsh ksh ksh93 mksh posh rbash rush rzsh sash sh static-sh tcsh yash zsh"

View file

@ -73,7 +73,7 @@ par_exit() {
export -f test_signal
ulimit -c 0
stdout parallel -j15 -k --timeout 20 --tag test_signal ::: {0..64} |
perl -pe 's/line 1: (\d+)/line 1: PID/'
perl -pe 's/line 1: *(\d+)/line 1: PID/'
}

View file

@ -1,3 +1,15 @@
par_--pipe--block-2 ### --block -2
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35911 3591100 10486012
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 35910 3591000 10485720
par_--pipe--block-2 0 39 108
par__arg_sep ### Test basic --arg-sep
par__arg_sep a
par__arg_sep b

View file

@ -1,3 +1,182 @@
par__dburl_parsing csv:///mydir/tange parallel: Error:
par__dburl_parsing csv:///mydir/tange Execution ERROR: Cannot open /tmp/parallel-local-30s-tmp/
par__dburl_parsing csv:///mydir/tange `/tmp/trip`>/tmp/tripwire;
par__dburl_parsing csv:///mydir/tange 
par__dburl_parsing csv:///mydir/tange "'@<?[]|~\/tmp/test/mydir/tange: No such file or directory (2) at /usr/lib/x86_64-linux-gnu/perl5/5.38/DBI/DBD/SqlEngine.pm line 1624.
par__dburl_parsing csv:///mydir/tange called from /usr/local/bin/parallel at 15320.
par__dburl_parsing csv:///mydir/tange
par__dburl_parsing csv:///mydir/tange
par__dburl_parsing csv:///./mydir/tange parallel: Error:
par__dburl_parsing csv:///./mydir/tange Execution ERROR: Cannot open /tmp/parallel-local-30s-tmp/
par__dburl_parsing csv:///./mydir/tange `/tmp/trip`>/tmp/tripwire;
par__dburl_parsing csv:///./mydir/tange 
par__dburl_parsing csv:///./mydir/tange "'@<?[]|~\/tmp/test/mydir/tange: No such file or directory (2) at /usr/lib/x86_64-linux-gnu/perl5/5.38/DBI/DBD/SqlEngine.pm line 1624.
par__dburl_parsing csv:///./mydir/tange called from /usr/local/bin/parallel at 15320.
par__dburl_parsing csv:///./mydir/tange
par__dburl_parsing csv:///./mydir/tange
par__dburl_parsing csv:///.%2Fmydir/tange parallel: Error:
par__dburl_parsing csv:///.%2Fmydir/tange Execution ERROR: Cannot open /tmp/parallel-local-30s-tmp/
par__dburl_parsing csv:///.%2Fmydir/tange `/tmp/trip`>/tmp/tripwire;
par__dburl_parsing csv:///.%2Fmydir/tange 
par__dburl_parsing csv:///.%2Fmydir/tange "'@<?[]|~\/tmp/test/mydir/tange: No such file or directory (2) at /usr/lib/x86_64-linux-gnu/perl5/5.38/DBI/DBD/SqlEngine.pm line 1624.
par__dburl_parsing csv:///.%2Fmydir/tange called from /usr/local/bin/parallel at 15320.
par__dburl_parsing csv:///.%2Fmydir/tange
par__dburl_parsing csv:///.%2Fmydir/tange
par__dburl_parsing csv:////tmp/parallel-local-30s-tmp/ 1
par__dburl_parsing csv:////tmp/parallel-local-30s-tmp/ 2
par__dburl_parsing csv:////tmp/parallel-local-30s-tmp/ 3
par__dburl_parsing `/tmp/trip`>/tmp/tripwire; parallel: Error: `/tmp/trip`>/tmp/tripwire; is not a valid DBURL
par__dburl_parsing  parallel: Error:  is not a valid DBURL
par__dburl_parsing "'@<?[]|~\/tmp/test/tange parallel: Error: "'@<?[]|~\/tmp/test/tange is not a valid DBURL
par__dburl_parsing csv:///%2Ftmp%2Fparallel-local-30s-tmp%2F parallel: Error: tange is not a directory.
par__dburl_parsing `%2Ftmp%2Ftrip`>%2Ftmp%2Ftripwire; parallel: Error: `%2Ftmp%2Ftrip`>%2Ftmp%2Ftripwire; is not a valid DBURL
par__dburl_parsing  parallel: Error:  is not a valid DBURL
par__dburl_parsing "'@<?[]|~\%2Ftmp%2Ftest/tange parallel: Error: "'@<?[]|~\%2Ftmp%2Ftest/tange is not a valid DBURL
par__dburl_parsing csv:///./tange parallel: Error:
par__dburl_parsing csv:///./tange Execution ERROR: Cannot open /tmp/parallel-local-30s-tmp/
par__dburl_parsing csv:///./tange `/tmp/trip`>/tmp/tripwire;
par__dburl_parsing csv:///./tange 
par__dburl_parsing csv:///./tange "'@<?[]|~\/tmp/test/tange: No such file or directory (2) at /usr/lib/x86_64-linux-gnu/perl5/5.38/DBI/DBD/SqlEngine.pm line 1624.
par__dburl_parsing csv:///./tange called from /usr/local/bin/parallel at 15320.
par__dburl_parsing csv:///./tange
par__dburl_parsing csv:///./tange
par__dburl_parsing csv:///./ parallel: Error:
par__dburl_parsing csv:///./ Execution ERROR: Cannot open /tmp/parallel-local-30s-tmp/
par__dburl_parsing csv:///./ `/tmp/trip`>/tmp/tripwire;
par__dburl_parsing csv:///./ 
par__dburl_parsing csv:///./ "'@<?[]|~\/tmp/test/tange: No such file or directory (2) at /usr/lib/x86_64-linux-gnu/perl5/5.38/DBI/DBD/SqlEngine.pm line 1624.
par__dburl_parsing csv:///./ called from /usr/local/bin/parallel at 15320.
par__dburl_parsing csv:///./
par__dburl_parsing csv:///./
par__dburl_parsing csv:///tange/tange parallel: Error: tange is not a directory.
par__dburl_parsing csv:////tange parallel: Error: tange is not a directory.
par__dburl_parsing csv:///tange/ parallel: Error: tange is not a directory.
par__dburl_parsing csv://// parallel: Error: tange is not a directory.
par__dburl_parsing csv:/// parallel: Error: tange is not a directory.
par__dburl_parsing sqlite3:///tange/tange 1
par__dburl_parsing sqlite3:///tange/tange 2
par__dburl_parsing sqlite3:///tange/tange 3
par__dburl_parsing sqlite3://mydir/tange/tange 1
par__dburl_parsing sqlite3://mydir/tange/tange 2
par__dburl_parsing sqlite3://mydir/tange/tange 3
par__dburl_parsing sqlite3:///mydir/tange/tange 1
par__dburl_parsing sqlite3:///mydir/tange/tange 2
par__dburl_parsing sqlite3:///mydir/tange/tange 3
par__dburl_parsing sqlite3:///mydir%2Ftange/tange 1
par__dburl_parsing sqlite3:///mydir%2Ftange/tange 2
par__dburl_parsing sqlite3:///mydir%2Ftange/tange 3
par__dburl_parsing sqlite3:////tmp/parallel-local-30s-tmp/ DBI connect('dbname=/tmp/parallel-local-30s-tmp','',...) failed: unable to open database file at /usr/local/bin/parallel line 15114.
par__dburl_parsing `/tmp/trip`>/tmp/tripwire; parallel: Error: `/tmp/trip`>/tmp/tripwire; is not a valid DBURL
par__dburl_parsing  parallel: Error:  is not a valid DBURL
par__dburl_parsing "'@<?[]|~\/tmp/test/tange/tange parallel: Error: "'@<?[]|~\/tmp/test/tange/tange is not a valid DBURL
par__dburl_parsing sqlite3:///%2Ftmp%2Fparallel-local-30s-tmp%2F DBD::SQLite::db prepare failed: near "/": syntax error [for Statement "DROP TABLE IF EXISTS /tmp/parallel-local-30s-tmp/;"] at /usr/local/bin/parallel line 15317, <$fh> line 1.
par__dburl_parsing `%2Ftmp%2Ftrip`>%2Ftmp%2Ftripwire; parallel: Error: `%2Ftmp%2Ftrip`>%2Ftmp%2Ftripwire; is not a valid DBURL
par__dburl_parsing  parallel: Error:  is not a valid DBURL
par__dburl_parsing "'@<?[]|~\%2Ftmp%2Ftest/tange/tange parallel: Error: "'@<?[]|~\%2Ftmp%2Ftest/tange/tange is not a valid DBURL
par__dburl_parsing sqlite3:///tange/ 1
par__dburl_parsing sqlite3:///tange/ 2
par__dburl_parsing sqlite3:///tange/ 3
par__dburl_parsing sqlite3:///tange/tange 1
par__dburl_parsing sqlite3:///tange/tange 2
par__dburl_parsing sqlite3:///tange/tange 3
par__dburl_parsing sqlite3:////tange 1
par__dburl_parsing sqlite3:////tange 2
par__dburl_parsing sqlite3:////tange 3
par__dburl_parsing sqlite3:///tange/ 1
par__dburl_parsing sqlite3:///tange/ 2
par__dburl_parsing sqlite3:///tange/ 3
par__dburl_parsing sqlite3://// 1
par__dburl_parsing sqlite3://// 2
par__dburl_parsing sqlite3://// 3
par__dburl_parsing sqlite3:/// 1
par__dburl_parsing sqlite3:/// 2
par__dburl_parsing sqlite3:/// 3
par__dburl_parsing sqlite:///tange/tange 1
par__dburl_parsing sqlite:///tange/tange 2
par__dburl_parsing sqlite:///tange/tange 3
par__dburl_parsing sqlite://mydir/tange/tange 1
par__dburl_parsing sqlite://mydir/tange/tange 2
par__dburl_parsing sqlite://mydir/tange/tange 3
par__dburl_parsing sqlite:///mydir/tange/tange 1
par__dburl_parsing sqlite:///mydir/tange/tange 2
par__dburl_parsing sqlite:///mydir/tange/tange 3
par__dburl_parsing sqlite:///mydir%2Ftange/tange 1
par__dburl_parsing sqlite:///mydir%2Ftange/tange 2
par__dburl_parsing sqlite:///mydir%2Ftange/tange 3
par__dburl_parsing sqlite:////tmp/parallel-local-30s-tmp/ DBI connect('dbname=/tmp/parallel-local-30s-tmp','',...) failed: unable to open database file at /usr/local/bin/parallel line 15114.
par__dburl_parsing `/tmp/trip`>/tmp/tripwire; parallel: Error: `/tmp/trip`>/tmp/tripwire; is not a valid DBURL
par__dburl_parsing  parallel: Error:  is not a valid DBURL
par__dburl_parsing "'@<?[]|~\/tmp/test/tange/tange parallel: Error: "'@<?[]|~\/tmp/test/tange/tange is not a valid DBURL
par__dburl_parsing sqlite:///%2Ftmp%2Fparallel-local-30s-tmp%2F DBD::SQLite::db prepare failed: near "/": syntax error [for Statement "DROP TABLE IF EXISTS /tmp/parallel-local-30s-tmp/;"] at /usr/local/bin/parallel line 15317, <$fh> line 1.
par__dburl_parsing `%2Ftmp%2Ftrip`>%2Ftmp%2Ftripwire; parallel: Error: `%2Ftmp%2Ftrip`>%2Ftmp%2Ftripwire; is not a valid DBURL
par__dburl_parsing  parallel: Error:  is not a valid DBURL
par__dburl_parsing "'@<?[]|~\%2Ftmp%2Ftest/tange/tange parallel: Error: "'@<?[]|~\%2Ftmp%2Ftest/tange/tange is not a valid DBURL
par__dburl_parsing sqlite:///tange/ 1
par__dburl_parsing sqlite:///tange/ 2
par__dburl_parsing sqlite:///tange/ 3
par__dburl_parsing sqlite:///tange/tange 1
par__dburl_parsing sqlite:///tange/tange 2
par__dburl_parsing sqlite:///tange/tange 3
par__dburl_parsing sqlite:////tange 1
par__dburl_parsing sqlite:////tange 2
par__dburl_parsing sqlite:////tange 3
par__dburl_parsing sqlite:///tange/ 1
par__dburl_parsing sqlite:///tange/ 2
par__dburl_parsing sqlite:///tange/ 3
par__dburl_parsing sqlite://// 1
par__dburl_parsing sqlite://// 2
par__dburl_parsing sqlite://// 3
par__dburl_parsing sqlite:/// 1
par__dburl_parsing sqlite:/// 2
par__dburl_parsing sqlite:/// 3
par__dburl_parsing mysql://tange@/tange/tange 1
par__dburl_parsing mysql://tange@/tange/tange 2
par__dburl_parsing mysql://tange@/tange/tange 3
par__dburl_parsing mysql://tange@/tange/ 1
par__dburl_parsing mysql://tange@/tange/ 2
par__dburl_parsing mysql://tange@/tange/ 3
par__dburl_parsing mysql://tange@// 1
par__dburl_parsing mysql://tange@// 2
par__dburl_parsing mysql://tange@// 3
par__dburl_parsing mysql:///tange/tange 1
par__dburl_parsing mysql:///tange/tange 2
par__dburl_parsing mysql:///tange/tange 3
par__dburl_parsing mysql:////tange 1
par__dburl_parsing mysql:////tange 2
par__dburl_parsing mysql:////tange 3
par__dburl_parsing mysql:///tange/ 1
par__dburl_parsing mysql:///tange/ 2
par__dburl_parsing mysql:///tange/ 3
par__dburl_parsing mysql://// 1
par__dburl_parsing mysql://// 2
par__dburl_parsing mysql://// 3
par__dburl_parsing mysql:/// 1
par__dburl_parsing mysql:/// 2
par__dburl_parsing mysql:/// 3
par__dburl_parsing pg://tange@/tange/tange 1
par__dburl_parsing pg://tange@/tange/tange 2
par__dburl_parsing pg://tange@/tange/tange 3
par__dburl_parsing pg://tange@/tange/ 1
par__dburl_parsing pg://tange@/tange/ 2
par__dburl_parsing pg://tange@/tange/ 3
par__dburl_parsing pg://tange@// 1
par__dburl_parsing pg://tange@// 2
par__dburl_parsing pg://tange@// 3
par__dburl_parsing pg:///tange/tange 1
par__dburl_parsing pg:///tange/tange 2
par__dburl_parsing pg:///tange/tange 3
par__dburl_parsing pg:////tange 1
par__dburl_parsing pg:////tange 2
par__dburl_parsing pg:////tange 3
par__dburl_parsing pg:///tange/ 1
par__dburl_parsing pg:///tange/ 2
par__dburl_parsing pg:///tange/ 3
par__dburl_parsing pg://// 1
par__dburl_parsing pg://// 2
par__dburl_parsing pg://// 3
par__dburl_parsing pg:/// 1
par__dburl_parsing pg:/// 2
par__dburl_parsing pg:/// 3
par__groupby_big ### test --group-by on file bigger than block
par__groupby_big --group-by on col 1..3, -n1..5
par__groupby_big _pipe and _ppart (pipepart) must return the same
@ -1608,7 +1787,58 @@ par__print_in_blocks ### bug #41565: Print happens in blocks - not after each jo
par__print_in_blocks The timing here is important: a full second between each
par__print_in_blocks 1
par__print_in_blocks 300 ms jobs:
par__print_in_blocks 3
par__print_in_blocks 4
par__test_detected_shell ### bug #42913: Dont use $SHELL but the shell currently running
par__test_detected_shell test_unknown_shell bash Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell csh Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell dash Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell fish Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell fizsh Global::shell /usr/bin/zsh
par__test_detected_shell test_unknown_shell ksh Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell ksh93 Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell mksh Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell posh Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell rbash Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell rzsh Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell sash Global::shell /usr/bin/sh
par__test_detected_shell test_unknown_shell sh Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell tcsh Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell yash Global::shell /usr/bin/bash
par__test_detected_shell test_unknown_shell zsh Global::shell /usr/bin/bash
par__test_detected_shell test_known_shell_c bash Global::shell /usr/bin/bash
par__test_detected_shell test_known_shell_c csh Global::shell /usr/bin/csh
par__test_detected_shell test_known_shell_c dash Global::shell /usr/bin/dash
par__test_detected_shell test_known_shell_c fish Global::shell /usr/bin/fish
par__test_detected_shell test_known_shell_c fizsh Global::shell /usr/bin/zsh
par__test_detected_shell test_known_shell_c ksh Global::shell /usr/bin/ksh
par__test_detected_shell test_known_shell_c ksh93 Global::shell /usr/bin/ksh93
par__test_detected_shell test_known_shell_c mksh Global::shell /usr/bin/mksh
par__test_detected_shell test_known_shell_c posh Global::shell /usr/bin/posh
par__test_detected_shell test_known_shell_c rbash Global::shell /usr/bin/rbash
par__test_detected_shell test_known_shell_c rzsh Global::shell /usr/bin/rzsh
par__test_detected_shell test_known_shell_c sash Global::shell /usr/bin/sh
par__test_detected_shell test_known_shell_c sh Global::shell /usr/bin/sh
par__test_detected_shell test_known_shell_c static-sh Global::shell /usr/bin/static-sh
par__test_detected_shell test_known_shell_c tcsh Global::shell /usr/bin/tcsh
par__test_detected_shell test_known_shell_c yash Global::shell /usr/bin/yash
par__test_detected_shell test_known_shell_c zsh Global::shell /usr/bin/zsh
par__test_detected_shell test_known_shell_pipe bash Global::shell /usr/bin/bash
par__test_detected_shell test_known_shell_pipe csh Global::shell /usr/bin/csh
par__test_detected_shell test_known_shell_pipe dash Global::shell /usr/bin/dash
par__test_detected_shell test_known_shell_pipe fish Global::shell /usr/bin/fish
par__test_detected_shell test_known_shell_pipe fizsh Global::shell /usr/bin/fizsh
par__test_detected_shell test_known_shell_pipe ksh Global::shell /usr/bin/ksh
par__test_detected_shell test_known_shell_pipe ksh93 Global::shell /usr/bin/ksh93
par__test_detected_shell test_known_shell_pipe mksh Global::shell /usr/bin/mksh
par__test_detected_shell test_known_shell_pipe posh Global::shell /usr/bin/posh
par__test_detected_shell test_known_shell_pipe rbash Global::shell /usr/bin/rbash
par__test_detected_shell test_known_shell_pipe rzsh Global::shell /usr/bin/rzsh
par__test_detected_shell test_known_shell_pipe sash Global::shell /usr/bin/sh
par__test_detected_shell test_known_shell_pipe sh Global::shell /usr/bin/sh
par__test_detected_shell test_known_shell_pipe static-sh Global::shell /usr/bin/static-sh
par__test_detected_shell test_known_shell_pipe tcsh Global::shell /usr/bin/tcsh
par__test_detected_shell test_known_shell_pipe yash Global::shell /usr/bin/yash
par__test_detected_shell test_known_shell_pipe zsh Global::shell /usr/bin/zsh
par_bin ### Test --bin
par_bin 2 2 4
par_bin 2 2 4
@ -3187,57 +3417,6 @@ par_sshlogin_parsing @grp1+grp2/4//usr/bin/ssh withpassword::;`echo>/tmp/trap`;)
par_sshlogin_parsing @grp1+grp2/4//usr/bin/ssh withpassword::;`echo>/tmp/trap`;)(|<*&"'@lo withpassword
par_sshlogin_parsing @grp1+grp2/4//usr/bin/ssh withpassword::;`echo>/tmp/trap`;)(|<*&"'@lo:22222 22222
par_sshlogin_parsing @grp1+grp2/4//usr/bin/ssh withpassword::;`echo>/tmp/trap`;)(|<*&"'@lo:22222 withpassword
par_test_detected_shell ### bug #42913: Dont use $SHELL but the shell currently running
par_test_detected_shell test_unknown_shell bash Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell csh Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell dash Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell fish Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell fizsh Global::shell /usr/bin/zsh
par_test_detected_shell test_unknown_shell ksh Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell ksh93 Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell mksh Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell posh Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell rbash Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell rzsh Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell sash Global::shell /usr/bin/sh
par_test_detected_shell test_unknown_shell sh Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell tcsh Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell yash Global::shell /usr/bin/bash
par_test_detected_shell test_unknown_shell zsh Global::shell /usr/bin/bash
par_test_detected_shell test_known_shell_c bash Global::shell /usr/bin/bash
par_test_detected_shell test_known_shell_c csh Global::shell /usr/bin/csh
par_test_detected_shell test_known_shell_c dash Global::shell /usr/bin/dash
par_test_detected_shell test_known_shell_c fish Global::shell /usr/bin/fish
par_test_detected_shell test_known_shell_c fizsh Global::shell /usr/bin/zsh
par_test_detected_shell test_known_shell_c ksh Global::shell /usr/bin/ksh
par_test_detected_shell test_known_shell_c ksh93 Global::shell /usr/bin/ksh93
par_test_detected_shell test_known_shell_c mksh Global::shell /usr/bin/mksh
par_test_detected_shell test_known_shell_c posh Global::shell /usr/bin/posh
par_test_detected_shell test_known_shell_c rbash Global::shell /usr/bin/rbash
par_test_detected_shell test_known_shell_c rzsh Global::shell /usr/bin/rzsh
par_test_detected_shell test_known_shell_c sash Global::shell /usr/bin/sh
par_test_detected_shell test_known_shell_c sh Global::shell /usr/bin/sh
par_test_detected_shell test_known_shell_c static-sh Global::shell /usr/bin/static-sh
par_test_detected_shell test_known_shell_c tcsh Global::shell /usr/bin/tcsh
par_test_detected_shell test_known_shell_c yash Global::shell /usr/bin/yash
par_test_detected_shell test_known_shell_c zsh Global::shell /usr/bin/zsh
par_test_detected_shell test_known_shell_pipe bash Global::shell /usr/bin/bash
par_test_detected_shell test_known_shell_pipe csh Global::shell /usr/bin/csh
par_test_detected_shell test_known_shell_pipe dash Global::shell /usr/bin/dash
par_test_detected_shell test_known_shell_pipe fish Global::shell /usr/bin/fish
par_test_detected_shell test_known_shell_pipe fizsh Global::shell /usr/bin/fizsh
par_test_detected_shell test_known_shell_pipe ksh Global::shell /usr/bin/ksh
par_test_detected_shell test_known_shell_pipe ksh93 Global::shell /usr/bin/ksh93
par_test_detected_shell test_known_shell_pipe mksh Global::shell /usr/bin/mksh
par_test_detected_shell test_known_shell_pipe posh Global::shell /usr/bin/posh
par_test_detected_shell test_known_shell_pipe rbash Global::shell /usr/bin/rbash
par_test_detected_shell test_known_shell_pipe rzsh Global::shell /usr/bin/rzsh
par_test_detected_shell test_known_shell_pipe sash Global::shell /usr/bin/sh
par_test_detected_shell test_known_shell_pipe sh Global::shell /usr/bin/sh
par_test_detected_shell test_known_shell_pipe static-sh Global::shell /usr/bin/static-sh
par_test_detected_shell test_known_shell_pipe tcsh Global::shell /usr/bin/tcsh
par_test_detected_shell test_known_shell_pipe yash Global::shell /usr/bin/yash
par_test_detected_shell test_known_shell_pipe zsh Global::shell /usr/bin/zsh
par_test_diff_roundrobin_k ### test there is difference on -k
par_test_diff_roundrobin_k OK
par_test_ipv6_format ### Host as IPv6 address

View file

@ -51,10 +51,7 @@ par_continuous_output 1
par_continuous_output 1
par_continuous_output 1
par_continuous_output 1
par_hostgroup ### --hostgroup force ncpu
par_hostgroup parallel
par_hostgroup tange
par_hostgroup ### --hostgroup two group arg
par_hostgroup ### --hostgroup force ncpu - 2x parallel, 6x me
par_hostgroup parallel
par_hostgroup parallel
par_hostgroup tange
@ -63,7 +60,16 @@ par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup ### --hostgroup one group arg
par_hostgroup ### --hostgroup two group arg - 2x parallel, 6x me
par_hostgroup parallel
par_hostgroup parallel
par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup ### --hostgroup one group arg - 8x me
par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
@ -72,7 +78,7 @@ par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup tange
par_hostgroup ### --hostgroup multiple group arg + unused group
par_hostgroup ### --hostgroup multiple group arg + unused group - 2x parallel, 6x me, 0x tcsh
par_hostgroup parallel
par_hostgroup tange
par_hostgroup ### --hostgroup two groups @
@ -87,17 +93,17 @@ par_hostgroup implicit_group
par_hostgroup ### --hostgroup --sshlogin with @
par_hostgroup no_group
par_hostgroup implicit_group
par_hostgroup ### --hostgroup -S @group
par_hostgroup ### --hostgroup -S @group - bad if you get parallel@lo
par_hostgroup tange
par_hostgroup tcsh
par_hostgroup ### --hostgroup -S @group1 -Sgrp2
par_hostgroup ### --hostgroup -S @group1 -Sgrp2 - get all twice
par_hostgroup parallel
par_hostgroup parallel
par_hostgroup tange
par_hostgroup tange
par_hostgroup tcsh
par_hostgroup tcsh
par_hostgroup ### --hostgroup -S @group1+grp2
par_hostgroup ### --hostgroup -S @group1+grp2 - get all twice
par_hostgroup parallel
par_hostgroup parallel
par_hostgroup tange