From 56183c1d6f7f4d0c18d9065cf870c4cd3fc329eb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 25 Sep 2024 23:36:05 +0200 Subject: [PATCH] tests: postcheck is now in verify Also introduce 'notexists' for verifying that directory entries do not exist after a test. Now an explicit supported feature instead of using "funny" perl in postcheck. Closes #15046 --- tests/FILEFORMAT.md | 12 ++++++++---- tests/data/test1013 | 6 +++--- tests/data/test1014 | 6 +++--- tests/data/test1022 | 6 +++--- tests/data/test1023 | 6 +++--- tests/data/test1026 | 10 +++++----- tests/data/test1027 | 10 +++++----- tests/data/test1182 | 7 +++---- tests/data/test1336 | 7 +++---- tests/data/test1337 | 7 +++---- tests/data/test1344 | 7 +++---- tests/data/test1345 | 7 +++---- tests/data/test1347 | 6 +++--- tests/data/test1356 | 7 +++---- tests/data/test1357 | 7 +++---- tests/data/test1358 | 6 +++--- tests/data/test1359 | 6 +++--- tests/data/test1360 | 6 +++--- tests/data/test1361 | 6 +++--- tests/data/test1362 | 6 +++--- tests/data/test1363 | 6 +++--- tests/data/test1364 | 6 +++--- tests/data/test1365 | 6 +++--- tests/data/test1366 | 7 ++++--- tests/data/test1367 | 7 ++++--- tests/data/test1368 | 6 +++--- tests/data/test1369 | 6 +++--- tests/data/test1370 | 7 ++++--- tests/data/test1371 | 7 ++++--- tests/data/test1372 | 6 +++--- tests/data/test1373 | 6 +++--- tests/data/test1374 | 7 ++++--- tests/data/test1375 | 7 ++++--- tests/data/test1376 | 6 +++--- tests/data/test1377 | 7 ++++--- tests/data/test1378 | 6 +++--- tests/data/test1379 | 6 +++--- tests/data/test1380 | 6 +++--- tests/data/test1381 | 6 +++--- tests/data/test1382 | 6 +++--- tests/data/test1383 | 6 +++--- tests/data/test1384 | 6 +++--- tests/data/test1385 | 6 +++--- tests/data/test1386 | 7 ++++--- tests/data/test1387 | 7 ++++--- tests/data/test1388 | 7 ++++--- tests/data/test1389 | 7 ++++--- tests/data/test1390 | 7 ++++--- tests/data/test1391 | 7 ++++--- tests/data/test1392 | 7 ++++--- tests/data/test1393 | 7 ++++--- tests/data/test1423 | 6 +++--- tests/data/test1443 | 6 +++--- tests/data/test1444 | 10 +++++----- tests/data/test1445 | 8 ++++---- tests/data/test1446 | 8 ++++---- tests/data/test1683 | 6 +++--- tests/data/test608 | 6 +++--- tests/data/test610 | 6 +++--- tests/data/test611 | 6 +++--- tests/data/test612 | 6 +++--- tests/data/test613 | 6 +++--- tests/data/test614 | 6 +++--- tests/data/test615 | 6 +++--- tests/data/test624 | 6 +++--- tests/data/test625 | 6 +++--- tests/data/test627 | 6 +++--- tests/data/test638 | 6 +++--- tests/data/test639 | 6 +++--- tests/libtest/Makefile.am | 2 +- tests/libtest/notexists.pl | 38 -------------------------------------- tests/runner.pm | 5 +++++ tests/runtests.pl | 19 +++++++++++++++++++ 73 files changed, 260 insertions(+), 262 deletions(-) delete mode 100755 tests/libtest/notexists.pl diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md index b0c4de5ef1..7ab1583057 100644 --- a/tests/FILEFORMAT.md +++ b/tests/FILEFORMAT.md @@ -510,10 +510,6 @@ output is displayed by the command or if the return code is non-zero, the test is skipped and the (single-line) output is displayed as reason for not running the test. -### `` -A command line that if set gets run by the test script after the test. If the -command exists with a non-zero status code, the test is considered failed. - ### `` Name of tool to invoke instead of "curl". This tool must be built and exist either in the `libtest/` directory (if the tool name starts with `lib`) or in @@ -622,6 +618,14 @@ changing protocol data such as port numbers or user-agent strings. One perl op per line that operates on the protocol dump. This is pretty advanced. Example: `s/^EPRT .*/EPRT stripped/`. +### `` +A command line that if set gets run by the test script after the test. If the +command exists with a non-zero status code, the test is considered failed. + +### `` +A list of directory entries that are checked for after the test has completed +and that must not exist. A listed entry existing causes the test to fail. + ### `` the protocol dump curl should transmit, if `nonewline` is set, we cut off the diff --git a/tests/data/test1013 b/tests/data/test1013 index d748657b5d..87e99cd56b 100644 --- a/tests/data/test1013 +++ b/tests/data/test1013 @@ -22,14 +22,14 @@ Compare curl --version with curl-config --protocols --version - -%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER protocols - # # Verify data after the test has been "shot" + +%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER protocols + 0 diff --git a/tests/data/test1014 b/tests/data/test1014 index f03ac859db..a8f0a3b1d2 100644 --- a/tests/data/test1014 +++ b/tests/data/test1014 @@ -22,14 +22,14 @@ Compare curl --version with curl-config --features --version - -%SRCDIR/libtest/test1013.pl ../curl-config %LOGDIR/stdout%TESTNUMBER features - # # Verify data after the test has been "shot" + +%SRCDIR/libtest/test1013.pl ../curl-config %LOGDIR/stdout%TESTNUMBER features + 0 diff --git a/tests/data/test1022 b/tests/data/test1022 index 6a5dd2180a..597dfd05d0 100644 --- a/tests/data/test1022 +++ b/tests/data/test1022 @@ -22,14 +22,14 @@ Compare curl --version with curl-config --version --version - -%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER version - # # Verify data after the test has been "shot" + +%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER version + 0 diff --git a/tests/data/test1023 b/tests/data/test1023 index 1d8cbfb4c0..70e027aa8c 100644 --- a/tests/data/test1023 +++ b/tests/data/test1023 @@ -22,14 +22,14 @@ Compare curl --version with curl-config --vernum --version - -%SRCDIR/libtest/test1022.pl ../curl-config %LOGDIR/stdout%TESTNUMBER vernum - # # Verify data after the test has been "shot" + +%SRCDIR/libtest/test1022.pl ../curl-config %LOGDIR/stdout%TESTNUMBER vernum + 0 diff --git a/tests/data/test1026 b/tests/data/test1026 index e310e6962d..9090bdb066 100644 --- a/tests/data/test1026 +++ b/tests/data/test1026 @@ -25,16 +25,16 @@ curl --manual --manual -# Search for these two sentinel lines in the manual output; if they are found, -# then chances are good the entire manual is there. - -perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(curl\s*-\s*transfer\sa\s*URL)|(AUTHORS)/, ); exit ($lines != 2); # Let this file pass an XML syntax check: ' %LOGDIR/stdout%TESTNUMBER - # # Verify data after the test has been "shot" +# Search for these two sentinel lines in the manual output; if they are found, +# then chances are good the entire manual is there. + +perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(curl\s*-\s*transfer\sa\s*URL)|(AUTHORS)/, ); exit ($lines != 2); # Let this file pass an XML syntax check: ' %LOGDIR/stdout%TESTNUMBER + 0 diff --git a/tests/data/test1027 b/tests/data/test1027 index 1d076000b0..64d1932275 100644 --- a/tests/data/test1027 +++ b/tests/data/test1027 @@ -22,11 +22,6 @@ curl --help --help -# Search for these two sentinel lines in the help output; if they are found, -# then chances are good the entire help is there. - -perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(Usage: curl )|(--version\s*Show version)/, ); exit ($lines != 2); # Let this file pass an XML syntax check: ' %LOGDIR/stdout%TESTNUMBER - # @@ -35,5 +30,10 @@ perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(Usage: curl )|(--version\s*Show ver 0 +# Search for these two sentinel lines in the help output; if they are found, +# then chances are good the entire help is there. + +perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(Usage: curl )|(--version\s*Show version)/, ); exit ($lines != 2); # Let this file pass an XML syntax check: ' %LOGDIR/stdout%TESTNUMBER + diff --git a/tests/data/test1182 b/tests/data/test1182 index d1b8fb07b4..118b967b3e 100644 --- a/tests/data/test1182 +++ b/tests/data/test1182 @@ -21,16 +21,15 @@ Verify that runtests.pl accepts an exclude file with the -E option mkdir %LOGDIR/data ; mkdir %LOGDIR/log; cp %SRCDIR/data/test1 %LOGDIR/data; echo 'test:1:Test should not run for unit test %TESTNUMBER' > %LOGDIR/test%TESTNUMBER-exclude-file - -grep -q "Test should not run for unit test %TESTNUMBER" %LOGDIR/stdout%TESTNUMBER - - 1 + +grep -q "Test should not run for unit test %TESTNUMBER" %LOGDIR/stdout%TESTNUMBER + diff --git a/tests/data/test1336 b/tests/data/test1336 index 98579bf301..9527f16897 100644 --- a/tests/data/test1336 +++ b/tests/data/test1336 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # @@ -74,6 +71,8 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange - + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1337 b/tests/data/test1337 index 149fb24711..b54abb6ce2 100644 --- a/tests/data/test1337 +++ b/tests/data/test1337 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # @@ -71,6 +68,8 @@ Content-Type: text/html Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange - +> +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1344 b/tests/data/test1344 index b0e9f960a6..bd6cee0d23 100644 --- a/tests/data/test1344 +++ b/tests/data/test1344 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # @@ -82,6 +79,8 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange - + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1345 b/tests/data/test1345 index 456ec49701..2b2fcf9b0f 100644 --- a/tests/data/test1345 +++ b/tests/data/test1345 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # @@ -79,6 +76,8 @@ Content-Type: text/html Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange - + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1347 b/tests/data/test1347 index 0b7ec82660..1f683740d5 100644 --- a/tests/data/test1347 +++ b/tests/data/test1347 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # @@ -71,6 +68,9 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1356 b/tests/data/test1356 index b5f28bee5b..b22fe47afb 100644 --- a/tests/data/test1356 +++ b/tests/data/test1356 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -77,6 +74,8 @@ MOOOO - + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1357 b/tests/data/test1357 index c273085704..f03aeadf99 100644 --- a/tests/data/test1357 +++ b/tests/data/test1357 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -97,6 +94,8 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ - + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1358 b/tests/data/test1358 index 495d93961b..ae5022e651 100644 --- a/tests/data/test1358 +++ b/tests/data/test1358 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -95,5 +92,8 @@ MOOOO s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1359 b/tests/data/test1359 index 38ebef0134..8f5d08a708 100644 --- a/tests/data/test1359 +++ b/tests/data/test1359 @@ -42,9 +42,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -99,5 +96,8 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1360 b/tests/data/test1360 index a1e6b3ec1d..b4312dd0fb 100644 --- a/tests/data/test1360 +++ b/tests/data/test1360 @@ -42,9 +42,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -96,5 +93,8 @@ MOOOO s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1361 b/tests/data/test1361 index 20a014143c..29a3a663d8 100644 --- a/tests/data/test1361 +++ b/tests/data/test1361 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -98,5 +95,8 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1362 b/tests/data/test1362 index 0e4689da49..294cc4825c 100644 --- a/tests/data/test1362 +++ b/tests/data/test1362 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -95,5 +92,8 @@ MOOOO s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1363 b/tests/data/test1363 index dc1046d007..9effa9dd18 100644 --- a/tests/data/test1363 +++ b/tests/data/test1363 @@ -41,9 +41,6 @@ CURL_TESTDIR=%LOGDIR ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -78,5 +75,8 @@ MOOOO + +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1364 b/tests/data/test1364 index 0ea1e2b12e..2b3b566f6a 100644 --- a/tests/data/test1364 +++ b/tests/data/test1364 @@ -32,9 +32,6 @@ HTTP GET -o fname without Content-Disposition, -D file http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -65,5 +62,8 @@ Content-Type: text/html + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1365 b/tests/data/test1365 index abd371c010..1a28a77ede 100644 --- a/tests/data/test1365 +++ b/tests/data/test1365 @@ -32,9 +32,6 @@ HTTP GET -o fname without Content-Disposition, -D stdout http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -62,5 +59,8 @@ Content-Type: text/html + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1366 b/tests/data/test1366 index 78f5573ea4..1107c22811 100644 --- a/tests/data/test1366 +++ b/tests/data/test1366 @@ -33,9 +33,6 @@ HTTP GET -o fname and Content-Disposition, -D file http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER - # @@ -67,5 +64,9 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1367 b/tests/data/test1367 index 24929365a0..5d1efa3a95 100644 --- a/tests/data/test1367 +++ b/tests/data/test1367 @@ -33,9 +33,6 @@ HTTP GET -o fname and Content-Disposition, -D stdout http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER - # @@ -64,5 +61,9 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1368 b/tests/data/test1368 index 1d6d181b08..c9ee021691 100644 --- a/tests/data/test1368 +++ b/tests/data/test1368 @@ -33,9 +33,6 @@ HTTP GET -o fname -J without Content-Disposition, -D file http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -66,5 +63,8 @@ Content-Type: text/html + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1369 b/tests/data/test1369 index 48fd31806f..93627e6a48 100644 --- a/tests/data/test1369 +++ b/tests/data/test1369 @@ -33,9 +33,6 @@ HTTP GET -o fname -J without Content-Disposition, -D stdout http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -63,5 +60,8 @@ Content-Type: text/html + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1370 b/tests/data/test1370 index d769401435..637444c540 100644 --- a/tests/data/test1370 +++ b/tests/data/test1370 @@ -34,9 +34,6 @@ HTTP GET -o fname -J and Content-Disposition, -D file http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER - # @@ -68,5 +65,9 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1371 b/tests/data/test1371 index 8565363b93..d05c1a15bf 100644 --- a/tests/data/test1371 +++ b/tests/data/test1371 @@ -34,9 +34,6 @@ HTTP GET -o fname -J and Content-Disposition, -D stdout http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER - # @@ -65,5 +62,9 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1372 b/tests/data/test1372 index 76b367132e..a39a243c99 100644 --- a/tests/data/test1372 +++ b/tests/data/test1372 @@ -32,9 +32,6 @@ HTTP GET -o fname -i without Content-Disposition, -D file http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -72,5 +69,8 @@ Content-Type: text/html + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1373 b/tests/data/test1373 index c475deb9f0..7d94775d6f 100644 --- a/tests/data/test1373 +++ b/tests/data/test1373 @@ -32,9 +32,6 @@ HTTP GET -o fname -i without Content-Disposition, -D stdout http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -69,5 +66,8 @@ Content-Type: text/html + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1374 b/tests/data/test1374 index aa2b3e346e..95af862faa 100644 --- a/tests/data/test1374 +++ b/tests/data/test1374 @@ -33,9 +33,6 @@ HTTP GET -o fname -i and Content-Disposition, -D file http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER - # @@ -75,5 +72,9 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1375 b/tests/data/test1375 index 6df5526360..f56a7d90b3 100644 --- a/tests/data/test1375 +++ b/tests/data/test1375 @@ -33,9 +33,6 @@ HTTP GET -o fname -i and Content-Disposition, -D stdout http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER - # @@ -72,5 +69,9 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1376 b/tests/data/test1376 index f3d36e0af3..5b3280b033 100644 --- a/tests/data/test1376 +++ b/tests/data/test1376 @@ -32,9 +32,6 @@ HTTP GET -o fname -i without Content-Disposition, without -D http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -62,5 +59,8 @@ Content-Type: text/html + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1377 b/tests/data/test1377 index d1a6b72134..4bdc864bc1 100644 --- a/tests/data/test1377 +++ b/tests/data/test1377 @@ -33,9 +33,6 @@ HTTP GET -o fname -i and Content-Disposition, without -D http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER - # @@ -63,6 +60,10 @@ Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange + +%LOGDIR/%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1378 b/tests/data/test1378 index 81c18731d8..f8551251ad 100644 --- a/tests/data/test1378 +++ b/tests/data/test1378 @@ -25,9 +25,6 @@ FTP DL, file without Content-Disposition inside, using -o fname ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -54,6 +51,9 @@ mooo + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1379 b/tests/data/test1379 index c11dfe84c8..9cecb0eae0 100644 --- a/tests/data/test1379 +++ b/tests/data/test1379 @@ -25,9 +25,6 @@ FTP DL, file without C-D inside, using -o fname -D file ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -75,5 +72,8 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1380 b/tests/data/test1380 index 2016b4558a..d534223959 100644 --- a/tests/data/test1380 +++ b/tests/data/test1380 @@ -25,9 +25,6 @@ FTP DL, file without C-D inside, using -o fname -D stdout ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -72,5 +69,8 @@ mooo s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1381 b/tests/data/test1381 index 404a03d0d8..28c2af5fe2 100644 --- a/tests/data/test1381 +++ b/tests/data/test1381 @@ -26,9 +26,6 @@ FTP DL, file without C-D inside, using -o fname -J -D file ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -76,5 +73,8 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1382 b/tests/data/test1382 index d0b04904d2..d96ad468a7 100644 --- a/tests/data/test1382 +++ b/tests/data/test1382 @@ -26,9 +26,6 @@ FTP DL, file without C-D inside, using -o fname -J -D stdout ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -73,5 +70,8 @@ mooo s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1383 b/tests/data/test1383 index f0c9cd68e2..2c9f332917 100644 --- a/tests/data/test1383 +++ b/tests/data/test1383 @@ -25,9 +25,6 @@ FTP DL, file without C-D inside, using -o fname -i -D file ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -75,5 +72,8 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1384 b/tests/data/test1384 index 4d2fed963d..1dd2aa280e 100644 --- a/tests/data/test1384 +++ b/tests/data/test1384 @@ -25,9 +25,6 @@ FTP DL, file without C-D inside, using -o fname -i -D stdout ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -72,5 +69,8 @@ mooo s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1385 b/tests/data/test1385 index f0904607a9..8654da6540 100644 --- a/tests/data/test1385 +++ b/tests/data/test1385 @@ -25,9 +25,6 @@ FTP DL, file without C-D inside, using -o fname -i, without -D ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER - # Verify data after the test has been "shot" @@ -55,5 +52,8 @@ mooo + +%LOGDIR/file%TESTNUMBER + diff --git a/tests/data/test1386 b/tests/data/test1386 index 2e3d73a92b..44b8dcd422 100644 --- a/tests/data/test1386 +++ b/tests/data/test1386 @@ -33,9 +33,6 @@ FTP DL, file with Content-Disposition inside, using -o fname ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -70,5 +67,9 @@ MOOOO + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1387 b/tests/data/test1387 index 2965acea4d..6a24b76783 100644 --- a/tests/data/test1387 +++ b/tests/data/test1387 @@ -33,9 +33,6 @@ FTP DL, file with C-D inside, using -o fname -D file ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -90,5 +87,9 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1388 b/tests/data/test1388 index 0078916be5..a26a829c07 100644 --- a/tests/data/test1388 +++ b/tests/data/test1388 @@ -33,9 +33,6 @@ FTP DL, file with C-D inside, using -o fname -D stdout ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -86,6 +83,10 @@ MOOOO s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1389 b/tests/data/test1389 index 3ce9acf11c..77f7b5f273 100644 --- a/tests/data/test1389 +++ b/tests/data/test1389 @@ -34,9 +34,6 @@ FTP DL, file with C-D inside, using -o fname -J -D file ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -90,6 +87,10 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1390 b/tests/data/test1390 index 09dafdd7b4..be7cf2ed9b 100644 --- a/tests/data/test1390 +++ b/tests/data/test1390 @@ -34,9 +34,6 @@ FTP DL, file with C-D inside, using -o fname -J -D stdout ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -88,5 +85,9 @@ MOOOO s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1391 b/tests/data/test1391 index 4f612f99ee..c0c5bc58af 100644 --- a/tests/data/test1391 +++ b/tests/data/test1391 @@ -33,9 +33,6 @@ FTP DL, file with C-D inside, using -o fname -i -D file ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D %LOGDIR/heads%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -90,5 +87,9 @@ s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1392 b/tests/data/test1392 index 656f03c552..49472104ed 100644 --- a/tests/data/test1392 +++ b/tests/data/test1392 @@ -33,9 +33,6 @@ FTP DL, file with C-D inside, using -o fname -i -D stdout ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D - - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -87,5 +84,9 @@ MOOOO s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1393 b/tests/data/test1393 index 4d6d348fe5..81734206e7 100644 --- a/tests/data/test1393 +++ b/tests/data/test1393 @@ -33,9 +33,6 @@ FTP DL, file with C-D inside, using -o fname -i, without -D ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER - # Verify data after the test has been "shot" @@ -70,5 +67,9 @@ MOOOO + +%LOGDIR/file%TESTNUMBER +%LOGDIR/name%TESTNUMBER + diff --git a/tests/data/test1423 b/tests/data/test1423 index f269cc0b04..04986396ff 100644 --- a/tests/data/test1423 +++ b/tests/data/test1423 @@ -32,9 +32,6 @@ HTTP GET -o fname without Content-Disposition (empty file) http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER file://%PWD/%LOGDIR/outfile%TESTNUMBER - -perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER - # @@ -51,5 +48,8 @@ Accept: */* + +%LOGDIR/%TESTNUMBER + diff --git a/tests/data/test1443 b/tests/data/test1443 index aaeb448e1c..f3919d1d88 100644 --- a/tests/data/test1443 +++ b/tests/data/test1443 @@ -44,9 +44,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O --remote-time # Verify the mtime of the file. The mtime is specifically chosen to be an even # number so that it can be represented exactly on a FAT filesystem. - -perl -e 'exit((stat("%LOGDIR/%TESTNUMBER"))[9] != 960898200)' - # @@ -62,5 +59,8 @@ Accept: */* 12345 + +perl -e 'exit((stat("%LOGDIR/%TESTNUMBER"))[9] != 960898200)' + diff --git a/tests/data/test1444 b/tests/data/test1444 index f50c734f0c..7d80fa9263 100644 --- a/tests/data/test1444 +++ b/tests/data/test1444 @@ -28,11 +28,6 @@ FTP with --remote-time ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --remote-time -# Verify the mtime of the file. The mtime is specifically chosen to be an even -# number so that it can be represented exactly on a FAT filesystem. - -perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 1234567890)' - # Verify data after the test has been "shot" @@ -51,5 +46,10 @@ SIZE %TESTNUMBER RETR %TESTNUMBER QUIT +# Verify the mtime of the file. The mtime is specifically chosen to be an even +# number so that it can be represented exactly on a FAT filesystem. + +perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 1234567890)' + diff --git a/tests/data/test1445 b/tests/data/test1445 index fee8932f14..abdf588522 100644 --- a/tests/data/test1445 +++ b/tests/data/test1445 @@ -23,13 +23,13 @@ file:// with --remote-time file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.dir/plainfile.txt --remote-time - -perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \ -perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 946728000)' - # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \ +perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 946728000)' + diff --git a/tests/data/test1446 b/tests/data/test1446 index c606ef427d..8cab8d5483 100644 --- a/tests/data/test1446 +++ b/tests/data/test1446 @@ -26,14 +26,14 @@ SFTP with --remote-time --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/rofile.txt --insecure --remote-time - -perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \ -perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 978264000)' - # # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \ +perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 978264000)' + diff --git a/tests/data/test1683 b/tests/data/test1683 index 581470dfc6..cf55568d37 100644 --- a/tests/data/test1683 +++ b/tests/data/test1683 @@ -41,9 +41,6 @@ to stay the same perl -e 'for my $i ((1..100)) { my $filename = "%LOGDIR/exist%TESTNUMBER.$i"; open(FH, ">", $filename) or die $!; print FH "to stay the same" ; close(FH) }' - -perl -e 'for my $i ((1..100)) { my $filename = "%LOGDIR/exist%TESTNUMBER.$i"; open(FH, "<", $filename) or die $!; ( eq "to stay the same" and eq "") or die "incorrect $filename" ; close(FH) }' - # @@ -55,5 +52,8 @@ perl -e 'for my $i ((1..100)) { my $filename = "%LOGDIR/exist%TESTNUMBER.$i"; op to stay the same + +perl -e 'for my $i ((1..100)) { my $filename = "%LOGDIR/exist%TESTNUMBER.$i"; open(FH, "<", $filename) or die $!; ( eq "to stay the same" and eq "") or die "incorrect $filename" ; close(FH) }' + diff --git a/tests/data/test608 b/tests/data/test608 index e359dd46c7..233b3d0c2c 100644 --- a/tests/data/test608 +++ b/tests/data/test608 @@ -28,9 +28,6 @@ SFTP post-quote rename # Verify that the file was renamed properly, then rename the file back to what # it was so the verify section works and the file can be cleaned up. - -perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/file%TESTNUMBER.txt move %PWD/%LOGDIR/file%TESTNUMBER-renamed.txt %PWD/%LOGDIR/file%TESTNUMBER.txt - Test file for rename test @@ -42,5 +39,8 @@ Test file for rename test Test file for rename test + +perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/file%TESTNUMBER.txt move %PWD/%LOGDIR/file%TESTNUMBER-renamed.txt %PWD/%LOGDIR/file%TESTNUMBER.txt + diff --git a/tests/data/test610 b/tests/data/test610 index 3133ad3fac..a41201a8b7 100644 --- a/tests/data/test610 +++ b/tests/data/test610 @@ -29,9 +29,6 @@ SFTP post-quote rmdir --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure - -perl %SRCDIR/libtest/test%TESTNUMBER.pl gone %PWD/%LOGDIR/test%TESTNUMBER.dir - Dummy test file for rmdir test @@ -40,5 +37,8 @@ Dummy test file for rmdir test # # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test%TESTNUMBER.pl gone %PWD/%LOGDIR/test%TESTNUMBER.dir + diff --git a/tests/data/test611 b/tests/data/test611 index 34670c1ca6..8c11bce76a 100644 --- a/tests/data/test611 +++ b/tests/data/test611 @@ -29,9 +29,6 @@ SFTP post-quote rename --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-rename %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure - -perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new - Dummy test file for rename test @@ -40,5 +37,8 @@ Dummy test file for rename test # # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new + diff --git a/tests/data/test612 b/tests/data/test612 index 267026cb14..977f470301 100644 --- a/tests/data/test612 +++ b/tests/data/test612 @@ -26,9 +26,6 @@ SFTP post-quote remove file --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt -Q "-rm %PWD/%LOGDIR/file%TESTNUMBER.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/upload.%TESTNUMBER --insecure - -perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt - Dummy test file for remove test @@ -40,5 +37,8 @@ Dummy test file for remove test Dummy test file for remove test + +perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt + diff --git a/tests/data/test613 b/tests/data/test613 index c90adb09f1..6772459046 100644 --- a/tests/data/test613 +++ b/tests/data/test613 @@ -31,13 +31,13 @@ SFTP directory retrieval --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/ --insecure - -perl %SRCDIR/libtest/test%TESTNUMBER.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out - # # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test%TESTNUMBER.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out + diff --git a/tests/data/test614 b/tests/data/test614 index 1f5214b6e0..a5df69f051 100644 --- a/tests/data/test614 +++ b/tests/data/test614 @@ -32,13 +32,13 @@ SFTP pre-quote chmod --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "chmod 444 %PWD/%LOGDIR/test%TESTNUMBER.dir/plainfile.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/ --insecure - -perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out - # # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out + diff --git a/tests/data/test615 b/tests/data/test615 index 37a2fccdff..766ac330cd 100644 --- a/tests/data/test615 +++ b/tests/data/test615 @@ -22,9 +22,6 @@ SFTP put remote failure --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/rofile.txt --insecure - -perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir - Test data for ssh upload test @@ -37,5 +34,8 @@ for ssh upload test 9 + +perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir + diff --git a/tests/data/test624 b/tests/data/test624 index e126fd192f..b20b214080 100644 --- a/tests/data/test624 +++ b/tests/data/test624 @@ -24,9 +24,6 @@ SFTP put with --ftp-create-dirs --ftp-create-dirs --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/upload.%TESTNUMBER --insecure - -perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.dir/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir - Test data for ssh upload test @@ -40,5 +37,8 @@ for ssh upload test Test data for ssh upload test + +perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.dir/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir + diff --git a/tests/data/test625 b/tests/data/test625 index d9b9ac824e..bf949329fd 100644 --- a/tests/data/test625 +++ b/tests/data/test625 @@ -24,9 +24,6 @@ SFTP put with --ftp-create-dirs twice --ftp-create-dirs --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER --insecure - -perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.a rm %PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.b - Test data for ssh upload test @@ -40,5 +37,8 @@ for ssh upload test Test data for ssh upload test + +perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.a rm %PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.b + diff --git a/tests/data/test627 b/tests/data/test627 index 6ce173d63f..764ac8515f 100644 --- a/tests/data/test627 +++ b/tests/data/test627 @@ -26,9 +26,6 @@ SFTP quote remove file with NOBODY --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -I -Q "rm %PWD/%LOGDIR/file%TESTNUMBER.txt" sftp://%HOSTIP:%SSHPORT --insecure - -perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt - Dummy test file for remove test @@ -39,5 +36,8 @@ Dummy test file for remove test + +perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt + diff --git a/tests/data/test638 b/tests/data/test638 index a57d32168a..a1c77927af 100644 --- a/tests/data/test638 +++ b/tests/data/test638 @@ -31,9 +31,6 @@ SFTP post-quote rename * asterisk accept-fail --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-*rename %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure - -perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new - Dummy test file for rename test @@ -42,5 +39,8 @@ Dummy test file for rename test # # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new + diff --git a/tests/data/test639 b/tests/data/test639 index a93cc3f95e..46aed8df4b 100644 --- a/tests/data/test639 +++ b/tests/data/test639 @@ -31,9 +31,6 @@ SFTP post-quote rename * asterisk accept-fail --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-*rename %PWD/%LOGDIR/test%TESTNUMBER-not-exists-dir %PWD/%LOGDIR/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure - -perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir - Dummy test file for rename test @@ -42,5 +39,8 @@ Dummy test file for rename test # # Verify data after the test has been "shot" + +perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir + diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index 6358ec1bea..f9c44f0dd9 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -38,7 +38,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_srcdir)/tests/libtest EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl \ - notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc + CMakeLists.txt mk-lib1521.pl .checksrc CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ diff --git a/tests/libtest/notexists.pl b/tests/libtest/notexists.pl deleted file mode 100755 index 2bc9bb5a39..0000000000 --- a/tests/libtest/notexists.pl +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env perl -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -# SPDX-License-Identifier: curl -# -########################################################################### -# Check that given arguments do not exist on filesystem. -my $code = 0; -if ($#ARGV < 0) { - print "Usage: $0 file1 [fileN]\n"; - exit 2; -} -while (@ARGV) { - my $fname = shift @ARGV; - if (-e $fname) { - print "Found '$fname' when not supposed to exist.\n"; - $code = 1; - } -} -exit $code; diff --git a/tests/runner.pm b/tests/runner.pm index 5b83a1a660..566fd5f516 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -1130,6 +1130,11 @@ sub singletest_postcheck { # run the postcheck command my @postcheck= getpart("client", "postcheck"); + if(@postcheck) { + die "test$testnum uses client/postcheck"; + } + + @postcheck= getpart("verify", "postcheck"); if(@postcheck) { my $cmd = join("", @postcheck); chomp $cmd; diff --git a/tests/runtests.pl b/tests/runtests.pl index 31485585e6..d906a2757e 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -1714,6 +1714,25 @@ sub singletest_check { $ok .= "-"; # memory not checked } + my @notexists = getpart("verify", "notexists"); + if(@notexists) { + # a list of directory entries that must not exist + my $err; + while (@notexists) { + my $fname = shift @notexists; + chomp $fname; + if (-e $fname) { + logmsg "Found '$fname' when not supposed to exist.\n"; + $err++; + } + elsif($verbose) { + logmsg "Found '$fname' confirmed to not exist.\n"; + } + } + if($err) { + return -1; + } + } if($valgrind) { if($usedvalgrind) { if(!opendir(DIR, "$logdir")) { -- 2.47.3