From: Viktor Szakats Date: Wed, 20 Aug 2025 18:00:49 +0000 (+0200) Subject: test: add `cygwin` feature and use it (test 1056, 1517) X-Git-Tag: curl-8_16_0~142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fac255fc155678da721ac09c799c2ea2ab83e34;p=thirdparty%2Fcurl.git test: add `cygwin` feature and use it (test 1056, 1517) To replace custom checks with the same effect. Closes #18327 --- diff --git a/docs/tests/FILEFORMAT.md b/docs/tests/FILEFORMAT.md index a58eb13205..3bb1acb256 100644 --- a/docs/tests/FILEFORMAT.md +++ b/docs/tests/FILEFORMAT.md @@ -455,6 +455,7 @@ Features testable here are: - `codeset-utf8`. If the running codeset is UTF-8 capable. - `cookies` - `crypto` +- `cygwin` - `Debug` - `digest` - `DoH` diff --git a/tests/data/test1056 b/tests/data/test1056 index afcdf137ee..302b9c5412 100644 --- a/tests/data/test1056 +++ b/tests/data/test1056 @@ -45,10 +45,10 @@ body # This test relies on the IPv6 scope field being ignored when connecting to # ipv6-localhost (i.e. [::1%259999] is treated as [::1]). Maybe this is a bit # dodgy, but it happens on all our test platforms but Windows so skip this -# test there. This feature doesn't work on msys or Cygwin, so use a precheck -# to skip those. +# test there. Not supported on the Windows kernel, this includes MSYS2/Cygwin. IPv6 +!cygwin !win32 @@ -61,9 +61,6 @@ HTTP follow redirect from IPv4 to IPv6 with scope http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L - -%PERL -e "print 'Test is not supported on the Windows kernel' if($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin');" - # diff --git a/tests/data/test1517 b/tests/data/test1517 index 5f05379595..18d1fcaf2f 100644 --- a/tests/data/test1517 +++ b/tests/data/test1517 @@ -36,6 +36,11 @@ This is a virtual description of server virtual error. # Client-side +# Windows TCP does not deliver response data but reports CONNABORTED + +!cygwin +!win32 + http @@ -43,12 +48,6 @@ http lib%TESTNUMBER -# precheck is a command line to run before the test, to see if we can execute -# the test or not - -%LIBTESTS lib%TESTNUMBER check - - HTTP POST, server responds before completed send diff --git a/tests/libtest/lib1517.c b/tests/libtest/lib1517.c index c542aad032..d8ad3b753b 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/runtests.pl b/tests/runtests.pl index a470597bf6..9064d799c3 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -568,6 +568,9 @@ sub checksystemfeatures { $pwd = sys_native_current_path(); $feature{"win32"} = 1; } + if($curl =~ /cygwin|msys/i) { + $feature{"cygwin"} = 1; + } if($libcurl =~ /\sschannel\b/i) { $feature{"Schannel"} = 1; $feature{"SSLpinning"} = 1;