diff options
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/Makefile.am | 2 | ||||
-rw-r--r-- | tests/libtest/lib1517.c | 11 | ||||
-rw-r--r-- | tests/libtest/lib1557.c | 2 | ||||
-rw-r--r-- | tests/libtest/lib758.c | 4 | ||||
-rwxr-xr-x | tests/libtest/test613.pl | 6 | ||||
-rwxr-xr-x | tests/libtest/test795.pl | 46 |
6 files changed, 52 insertions, 19 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index b62a359ea..4ccfbd2b7 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -42,7 +42,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \ include Makefile.inc EXTRA_DIST = CMakeLists.txt $(FIRST_C) $(FIRST_H) $(UTILS_C) $(UTILS_H) $(TESTS_C) \ - test307.pl test610.pl test613.pl test1013.pl test1022.pl mk-lib1521.pl + test307.pl test610.pl test613.pl test795.pl test1013.pl test1022.pl mk-lib1521.pl CFLAGS += @CURL_CFLAG_EXTRAS@ diff --git a/tests/libtest/lib1517.c b/tests/libtest/lib1517.c index c542aad03..d8ad3b753 100644 --- a/tests/libtest/lib1517.c +++ b/tests/libtest/lib1517.c @@ -61,17 +61,6 @@ static CURLcode test_lib1517(const char *URL) struct t1517_WriteThis pooh; - if(!strcmp(URL, "check")) { -#if (defined(_WIN32) || defined(__CYGWIN__)) - curl_mprintf("Windows TCP does not deliver response data but reports " - "CONNABORTED\n"); - return TEST_ERR_FAILURE; /* skip since it fails on Windows without - workaround */ -#else - return CURLE_OK; /* sure, run this! */ -#endif - } - pooh.readptr = testdata; pooh.sizeleft = strlen(testdata); diff --git a/tests/libtest/lib1557.c b/tests/libtest/lib1557.c index 2381c07b6..0e33f48fb 100644 --- a/tests/libtest/lib1557.c +++ b/tests/libtest/lib1557.c @@ -36,7 +36,7 @@ static CURLcode test_lib1557(const char *URL) global_init(CURL_GLOBAL_ALL); multi_init(curlm); - multi_setopt(curlm, CURLMOPT_MAX_HOST_CONNECTIONS, 1); + multi_setopt(curlm, CURLMOPT_MAX_HOST_CONNECTIONS, 1L); easy_init(curl1); easy_setopt(curl1, CURLOPT_URL, URL); diff --git a/tests/libtest/lib758.c b/tests/libtest/lib758.c index dfcbaebb3..f98309f24 100644 --- a/tests/libtest/lib758.c +++ b/tests/libtest/lib758.c @@ -38,9 +38,7 @@ #include <openssl/x509.h> #include <openssl/ssl.h> -#if ((OPENSSL_VERSION_NUMBER >= 0x30000000L) && \ - !defined(LIBRESSL_VERSION_NUMBER) && \ - !defined(OPENSSL_IS_BORINGSSL)) +#if OPENSSL_VERSION_NUMBER >= 0x30000000L #define T578_ENABLED #endif #endif diff --git a/tests/libtest/test613.pl b/tests/libtest/test613.pl index 429168abf..48179833f 100755 --- a/tests/libtest/test613.pl +++ b/tests/libtest/test613.pl @@ -55,7 +55,7 @@ if($ARGV[0] eq "prepare") { print FILE "Test file to support curl test suite\n"; close(FILE); # The mtime is specifically chosen to be an even number so that it can be - # represented exactly on a FAT filesystem. + # represented exactly on a FAT file system. utime time, timegm(0,0,12,1,0,100), "plainfile.txt"; chmod 0666, "plainfile.txt"; @@ -64,7 +64,7 @@ if($ARGV[0] eq "prepare") { print FILE "Read-only test file to support curl test suite\n"; close(FILE); # The mtime is specifically chosen to be an even number so that it can be - # represented exactly on a FAT filesystem. + # represented exactly on a FAT file system. utime time, timegm(0,0,12,31,11,100), "rofile.txt"; chmod 0444, "rofile.txt"; if($^O eq 'cygwin') { @@ -114,7 +114,7 @@ elsif($ARGV[0] eq "postprocess") { next; } # Erase all directory metadata except for the name, as it is not - # consistent for across all test systems and filesystems + # consistent for across all test systems and file systems push @canondir, "d????????? N U U N ??? N NN:NN $8\n"; } elsif($1 eq "-") { # Ignore group and other permissions, because these may vary on diff --git a/tests/libtest/test795.pl b/tests/libtest/test795.pl new file mode 100755 index 000000000..6aa793f7f --- /dev/null +++ b/tests/libtest/test795.pl @@ -0,0 +1,46 @@ +#!/usr/bin/env perl +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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 +# +########################################################################### +use strict; +use warnings; + +my $ok = 1; +my $exp_duration = $ARGV[1] + 0.0; + +# Read the output of curl --version +open(F, $ARGV[0]) || die "Can't open test result from $ARGV[0]\n"; +$_ = <F>; +chomp; +/\s*([\.\d]+)\s*/; +my $duration = $1 + 0.0; +close F; + +if ($duration <= $exp_duration) { + print "OK: duration of $duration in expected range\n"; + $ok = 0; +} +else { + print "FAILED: duration of $duration is larger than $exp_duration\n"; +} +exit $ok; |