← Commit list

6897aeb105

Viktor Szakats
Viktor Szakats
2025-06-11
SUCCESS Duration: 87s

Subject

tests: drop mk-bundle exceptions

Binary

Download Binary (911 KB)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

$ git checkout -f 6897aeb10561b55c6659866fc0518dd67422f267
Previous HEAD position was 05db18e054 GHA/non-native: skip OpenBSD WebSocket tests to mitigate job timeouts
HEAD is now at 6897aeb105 tests: drop mk-bundle exceptions

$ git clean -fdx
Removing Makefile
Removing Makefile.in
Removing aclocal.m4
Removing autom4te.cache/
Removing buildinfo.txt
Removing compile
Removing config.guess
Removing config.log
Removing config.status
Removing config.sub
Removing configure
Removing curl-config
Removing depcomp
Removing docs/Makefile
Removing docs/Makefile.in
Removing docs/cmdline-opts/Makefile
Removing docs/cmdline-opts/Makefile.in
Removing docs/examples/.deps/
Removing docs/examples/Makefile
Removing docs/examples/Makefile.in
Removing docs/libcurl/Makefile
Removing docs/libcurl/Makefile.in
Removing docs/libcurl/opts/Makefile
Removing docs/libcurl/opts/Makefile.in
Removing include/Makefile
Removing include/Makefile.in
Removing include/curl/Makefile
Removing include/curl/Makefile.in
Removing install-sh
Removing lib/.deps/
Removing lib/.libs/
Removing lib/Makefile
Removing lib/Makefile.in
Removing lib/curl_config.h
Removing lib/curl_config.h.in
Removing lib/curlx/.deps/
Removing lib/curlx/.dirstamp
Removing lib/curlx/curl-base64.o
Removing lib/curlx/curl-dynbuf.o
Removing lib/curlx/curl-multibyte.o
Removing lib/curlx/curl-nonblock.o
Removing lib/curlx/curl-strparse.o
Removing lib/curlx/curl-timediff.o
Removing lib/curlx/curl-timeval.o
Removing lib/curlx/curl-version_win32.o
Removing lib/curlx/curl-warnless.o
Removing lib/curlx/libcurl_la-base64.lo
Removing lib/curlx/libcurl_la-base64.o
Removing lib/curlx/libcurl_la-dynbuf.lo
Removing lib/curlx/libcurl_la-dynbuf.o
Removing lib/curlx/libcurl_la-inet_ntop.lo
Removing lib/curlx/libcurl_la-inet_ntop.o
Removing lib/curlx/libcurl_la-inet_pton.lo
Removing lib/curlx/libcurl_la-inet_pton.o
Removing lib/curlx/libcurl_la-multibyte.lo
Removing lib/curlx/libcurl_la-multibyte.o
Removing lib/curlx/libcurl_la-nonblock.lo
Removing lib/curlx/libcurl_la-nonblock.o
Removing lib/curlx/libcurl_la-strparse.lo
Removing lib/curlx/libcurl_la-strparse.o
Removing lib/curlx/libcurl_la-timediff.lo
Removing lib/curlx/libcurl_la-timediff.o
Removing lib/curlx/libcurl_la-timeval.lo
Removing lib/curlx/libcurl_la-timeval.o
Removing lib/curlx/libcurl_la-version_win32.lo
Removing lib/curlx/libcurl_la-version_win32.o
Removing lib/curlx/libcurl_la-warnless.lo
Removing lib/curlx/libcurl_la-warnless.o
Removing lib/curlx/libcurl_la-winapi.lo
Removing lib/curlx/libcurl_la-winapi.o
Removing lib/curlx/libcurltool_la-base64.lo
Removing lib/curlx/libcurltool_la-base64.o
Removing lib/curlx/libcurltool_la-dynbuf.lo
Removing lib/curlx/libcurltool_la-dynbuf.o
Removing lib/curlx/libcurltool_la-multibyte.lo
Removing lib/curlx/libcurltool_la-multibyte.o
Removing lib/curlx/libcurltool_la-nonblock.lo
Removing lib/curlx/libcurltool_la-nonblock.o
Removing lib/curlx/libcurltool_la-strparse.lo
Removing lib/curlx/libcurltool_la-strparse.o
Removing lib/curlx/libcurltool_la-timediff.lo
Removing lib/curlx/libcurltool_la-timediff.o
Removing lib/curlx/libcurltool_la-timeval.lo
Removing lib/curlx/libcurltool_la-timeval.o
Removing lib/curlx/libcurltool_la-version_win32.lo
Removing lib/curlx/libcurltool_la-version_win32.o
Removing lib/curlx/libcurltool_la-warnless.lo
Removing lib/curlx/libcurltool_la-warnless.o
Removing lib/curlx/libcurlu_la-base64.lo
Removing lib/curlx/libcurlu_la-base64.o
Removing lib/curlx/libcurlu_la-dynbuf.lo
Removing lib/curlx/libcurlu_la-dynbuf.o
Removing lib/curlx/libcurlu_la-inet_ntop.lo
Removing lib/curlx/libcurlu_la-inet_ntop.o
Removing lib/curlx/libcurlu_la-inet_pton.lo
Removing lib/curlx/libcurlu_la-inet_pton.o
Removing lib/curlx/libcurlu_la-multibyte.lo
Removing lib/curlx/libcurlu_la-multibyte.o
Removing lib/curlx/libcurlu_la-nonblock.lo
Removing lib/curlx/libcurlu_la-nonblock.o
Removing lib/curlx/libcurlu_la-strparse.lo
Removing lib/curlx/libcurlu_la-strparse.o
Removing lib/curlx/libcurlu_la-timediff.lo
Removing lib/curlx/libcurlu_la-timediff.o
Removing lib/curlx/libcurlu_la-timeval.lo
Removing lib/curlx/libcurlu_la-timeval.o
Removing lib/curlx/libcurlu_la-version_win32.lo
Removing lib/curlx/libcurlu_la-version_win32.o
Removing lib/curlx/libcurlu_la-warnless.lo
Removing lib/curlx/libcurlu_la-warnless.o
Removing lib/curlx/libcurlu_la-winapi.lo
Removing lib/curlx/libcurlu_la-winapi.o
Removing lib/libcurl.la
Removing lib/libcurl.vers
Removing lib/libcurl_la-altsvc.lo
Removing lib/libcurl_la-altsvc.o
Removing lib/libcurl_la-amigaos.lo
Removing lib/libcurl_la-amigaos.o
Removing lib/libcurl_la-asyn-ares.lo
Removing lib/libcurl_la-asyn-ares.o
Removing lib/libcurl_la-asyn-base.lo
Removing lib/libcurl_la-asyn-base.o
Removing lib/libcurl_la-asyn-thrdd.lo
Removing lib/libcurl_la-asyn-thrdd.o
Removing lib/libcurl_la-bufq.lo
Removing lib/libcurl_la-bufq.o
Removing lib/libcurl_la-bufref.lo
Removing lib/libcurl_la-bufref.o
Removing lib/libcurl_la-cf-h1-proxy.lo
Removing lib/libcurl_la-cf-h1-proxy.o
Removing lib/libcurl_la-cf-h2-proxy.lo
Removing lib/libcurl_la-cf-h2-proxy.o
Removing lib/libcurl_la-cf-haproxy.lo
Removing lib/libcurl_la-cf-haproxy.o
Removing lib/libcurl_la-cf-https-connect.lo
Removing lib/libcurl_la-cf-https-connect.o
Removing lib/libcurl_la-cf-socket.lo
Removing lib/libcurl_la-cf-socket.o
Removing lib/libcurl_la-cfilters.lo
Removing lib/libcurl_la-cfilters.o
Removing lib/libcurl_la-conncache.lo
Removing lib/libcurl_la-conncache.o
Removing lib/libcurl_la-connect.lo
Removing lib/libcurl_la-connect.o
Removing lib/libcurl_la-content_encoding.lo
Removing lib/libcurl_la-content_encoding.o
Removing lib/libcurl_la-cookie.lo
Removing lib/libcurl_la-cookie.o
Removing lib/libcurl_la-cshutdn.lo
Removing lib/libcurl_la-cshutdn.o
Removing lib/libcurl_la-curl_addrinfo.lo
Removing lib/libcurl_la-curl_addrinfo.o
Removing lib/libcurl_la-curl_des.lo
Removing lib/libcurl_la-curl_des.o
Removing lib/libcurl_la-curl_endian.lo
Removing lib/libcurl_la-curl_endian.o
Removing lib/libcurl_la-curl_fnmatch.lo
Removing lib/libcurl_la-curl_fnmatch.o
Removing lib/libcurl_la-curl_get_line.lo
Removing lib/libcurl_la-curl_get_line.o
Removing lib/libcurl_la-curl_gethostname.lo
Removing lib/libcurl_la-curl_gethostname.o
Removing lib/libcurl_la-curl_gssapi.lo
Removing lib/libcurl_la-curl_gssapi.o
Removing lib/libcurl_la-curl_memrchr.lo
Removing lib/libcurl_la-curl_memrchr.o
Removing lib/libcurl_la-curl_ntlm_core.lo
Removing lib/libcurl_la-curl_ntlm_core.o
Removing lib/libcurl_la-curl_range.lo
Removing lib/libcurl_la-curl_range.o
Removing lib/libcurl_la-curl_rtmp.lo
Removing lib/libcurl_la-curl_rtmp.o
Removing lib/libcurl_la-curl_sasl.lo
Removing lib/libcurl_la-curl_sasl.o
Removing lib/libcurl_la-curl_sha512_256.lo
Removing lib/libcurl_la-curl_sha512_256.o
Removing lib/libcurl_la-curl_sspi.lo
Removing lib/libcurl_la-curl_sspi.o
Removing lib/libcurl_la-curl_threads.lo
Removing lib/libcurl_la-curl_threads.o
Removing lib/libcurl_la-curl_trc.lo
Removing lib/libcurl_la-curl_trc.o
Removing lib/libcurl_la-cw-out.lo
Removing lib/libcurl_la-cw-out.o
Removing lib/libcurl_la-cw-pause.lo
Removing lib/libcurl_la-cw-pause.o
Removing lib/libcurl_la-dict.lo
Removing lib/libcurl_la-dict.o
Removing lib/libcurl_la-doh.lo
Removing lib/libcurl_la-doh.o
Removing lib/libcurl_la-dynhds.lo
Removing lib/libcurl_la-dynhds.o
Removing lib/libcurl_la-easy.lo
Removing lib/libcurl_la-easy.o
Removing lib/libcurl_la-easygetopt.lo
Removing lib/libcurl_la-easygetopt.o
Removing lib/libcurl_la-easyoptions.lo
Removing lib/libcurl_la-easyoptions.o
Removing lib/libcurl_la-escape.lo
Removing lib/libcurl_la-escape.o
Removing lib/libcurl_la-fake_addrinfo.lo
Removing lib/libcurl_la-fake_addrinfo.o
Removing lib/libcurl_la-file.lo
Removing lib/libcurl_la-file.o
Removing lib/libcurl_la-fileinfo.lo
Removing lib/libcurl_la-fileinfo.o
Removing lib/libcurl_la-fopen.lo
Removing lib/libcurl_la-fopen.o
Removing lib/libcurl_la-formdata.lo
Removing lib/libcurl_la-formdata.o
Removing lib/libcurl_la-ftp.lo
Removing lib/libcurl_la-ftp.o
Removing lib/libcurl_la-ftplistparser.lo
Removing lib/libcurl_la-ftplistparser.o
Removing lib/libcurl_la-getenv.lo
Removing lib/libcurl_la-getenv.o
Removing lib/libcurl_la-getinfo.lo
Removing lib/libcurl_la-getinfo.o
Removing lib/libcurl_la-gopher.lo
Removing lib/libcurl_la-gopher.o
Removing lib/libcurl_la-hash.lo
Removing lib/libcurl_la-hash.o
Removing lib/libcurl_la-headers.lo
Removing lib/libcurl_la-headers.o
Removing lib/libcurl_la-hmac.lo
Removing lib/libcurl_la-hmac.o
Removing lib/libcurl_la-hostip.lo
Removing lib/libcurl_la-hostip.o
Removing lib/libcurl_la-hostip4.lo
Removing lib/libcurl_la-hostip4.o
Removing lib/libcurl_la-hostip6.lo
Removing lib/libcurl_la-hostip6.o
Removing lib/libcurl_la-hsts.lo
Removing lib/libcurl_la-hsts.o
Removing lib/libcurl_la-http.lo
Removing lib/libcurl_la-http.o
Removing lib/libcurl_la-http1.lo
Removing lib/libcurl_la-http1.o
Removing lib/libcurl_la-http2.lo
Removing lib/libcurl_la-http2.o
Removing lib/libcurl_la-http_aws_sigv4.lo
Removing lib/libcurl_la-http_aws_sigv4.o
Removing lib/libcurl_la-http_chunks.lo
Removing lib/libcurl_la-http_chunks.o
Removing lib/libcurl_la-http_digest.lo
Removing lib/libcurl_la-http_digest.o
Removing lib/libcurl_la-http_negotiate.lo
Removing lib/libcurl_la-http_negotiate.o
Removing lib/libcurl_la-http_ntlm.lo
Removing lib/libcurl_la-http_ntlm.o
Removing lib/libcurl_la-http_proxy.lo
Removing lib/libcurl_la-http_proxy.o
Removing lib/libcurl_la-httpsrr.lo
Removing lib/libcurl_la-httpsrr.o
Removing lib/libcurl_la-idn.lo
Removing lib/libcurl_la-idn.o
Removing lib/libcurl_la-if2ip.lo
Removing lib/libcurl_la-if2ip.o
Removing lib/libcurl_la-imap.lo
Removing lib/libcurl_la-imap.o
Removing lib/libcurl_la-krb5.lo
Removing lib/libcurl_la-krb5.o
Removing lib/libcurl_la-ldap.lo
Removing lib/libcurl_la-ldap.o
Removing lib/libcurl_la-llist.lo
Removing lib/libcurl_la-llist.o
Removing lib/libcurl_la-macos.lo
Removing lib/libcurl_la-macos.o
Removing lib/libcurl_la-md4.lo
Removing lib/libcurl_la-md4.o
Removing lib/libcurl_la-md5.lo
Removing lib/libcurl_la-md5.o
Removing lib/libcurl_la-memdebug.lo
Removing lib/libcurl_la-memdebug.o
Removing lib/libcurl_la-mime.lo
Removing lib/libcurl_la-mime.o
Removing lib/libcurl_la-mprintf.lo
Removing lib/libcurl_la-mprintf.o
Removing lib/libcurl_la-mqtt.lo
Removing lib/libcurl_la-mqtt.o
Removing lib/libcurl_la-multi.lo
Removing lib/libcurl_la-multi.o
Removing lib/libcurl_la-multi_ev.lo
Removing lib/libcurl_la-multi_ev.o
Removing lib/libcurl_la-netrc.lo
Removing lib/libcurl_la-netrc.o
Removing lib/libcurl_la-noproxy.lo
Removing lib/libcurl_la-noproxy.o
Removing lib/libcurl_la-openldap.lo
Removing lib/libcurl_la-openldap.o
Removing lib/libcurl_la-parsedate.lo
Removing lib/libcurl_la-parsedate.o
Removing lib/libcurl_la-pingpong.lo
Removing lib/libcurl_la-pingpong.o
Removing lib/libcurl_la-pop3.lo
Removing lib/libcurl_la-pop3.o
Removing lib/libcurl_la-progress.lo
Removing lib/libcurl_la-progress.o
Removing lib/libcurl_la-psl.lo
Removing lib/libcurl_la-psl.o
Removing lib/libcurl_la-rand.lo
Removing lib/libcurl_la-rand.o
Removing lib/libcurl_la-rename.lo
Removing lib/libcurl_la-rename.o
Removing lib/libcurl_la-request.lo
Removing lib/libcurl_la-request.o
Removing lib/libcurl_la-rtsp.lo
Removing lib/libcurl_la-rtsp.o
Removing lib/libcurl_la-select.lo
Removing lib/libcurl_la-select.o
Removing lib/libcurl_la-sendf.lo
Removing lib/libcurl_la-sendf.o
Removing lib/libcurl_la-setopt.lo
Removing lib/libcurl_la-setopt.o
Removing lib/libcurl_la-sha256.lo
Removing lib/libcurl_la-sha256.o
Removing lib/libcurl_la-share.lo
Removing lib/libcurl_la-share.o
Removing lib/libcurl_la-slist.lo
Removing lib/libcurl_la-slist.o
Removing lib/libcurl_la-smb.lo
Removing lib/libcurl_la-smb.o
Removing lib/libcurl_la-smtp.lo
Removing lib/libcurl_la-smtp.o
Removing lib/libcurl_la-socketpair.lo
Removing lib/libcurl_la-socketpair.o
Removing lib/libcurl_la-socks.lo
Removing lib/libcurl_la-socks.o
Removing lib/libcurl_la-socks_gssapi.lo
Removing lib/libcurl_la-socks_gssapi.o
Removing lib/libcurl_la-socks_sspi.lo
Removing lib/libcurl_la-socks_sspi.o
Removing lib/libcurl_la-speedcheck.lo
Removing lib/libcurl_la-speedcheck.o
Removing lib/libcurl_la-splay.lo
Removing lib/libcurl_la-splay.o
Removing lib/libcurl_la-strcase.lo
Removing lib/libcurl_la-strcase.o
Removing lib/libcurl_la-strdup.lo
Removing lib/libcurl_la-strdup.o
Removing lib/libcurl_la-strequal.lo
Removing lib/libcurl_la-strequal.o
Removing lib/libcurl_la-strerror.lo
Removing lib/libcurl_la-strerror.o
Removing lib/libcurl_la-system_win32.lo
Removing lib/libcurl_la-system_win32.o
Removing lib/libcurl_la-telnet.lo
Removing lib/libcurl_la-telnet.o
Removing lib/libcurl_la-tftp.lo
Removing lib/libcurl_la-tftp.o
Removing lib/libcurl_la-transfer.lo
Removing lib/libcurl_la-transfer.o
Removing lib/libcurl_la-uint-bset.lo
Removing lib/libcurl_la-uint-bset.o
Removing lib/libcurl_la-uint-hash.lo
Removing lib/libcurl_la-uint-hash.o
Removing lib/libcurl_la-uint-spbset.lo
Removing lib/libcurl_la-uint-spbset.o
Removing lib/libcurl_la-uint-table.lo
Removing lib/libcurl_la-uint-table.o
Removing lib/libcurl_la-url.lo
Removing lib/libcurl_la-url.o
Removing lib/libcurl_la-urlapi.lo
Removing lib/libcurl_la-urlapi.o
Removing lib/libcurl_la-version.lo
Removing lib/libcurl_la-version.o
Removing lib/libcurl_la-ws.lo
Removing lib/libcurl_la-ws.o
Removing lib/libcurlu.la
Removing lib/libcurlu_la-altsvc.lo
Removing lib/libcurlu_la-altsvc.o
Removing lib/libcurlu_la-amigaos.lo
Removing lib/libcurlu_la-amigaos.o
Removing lib/libcurlu_la-asyn-ares.lo
Removing lib/libcurlu_la-asyn-ares.o
Removing lib/libcurlu_la-asyn-base.lo
Removing lib/libcurlu_la-asyn-base.o
Removing lib/libcurlu_la-asyn-thrdd.lo
Removing lib/libcurlu_la-asyn-thrdd.o
Removing lib/libcurlu_la-bufq.lo
Removing lib/libcurlu_la-bufq.o
Removing lib/libcurlu_la-bufref.lo
Removing lib/libcurlu_la-bufref.o
Removing lib/libcurlu_la-cf-h1-proxy.lo
Removing lib/libcurlu_la-cf-h1-proxy.o
Removing lib/libcurlu_la-cf-h2-proxy.lo
Removing lib/libcurlu_la-cf-h2-proxy.o
Removing lib/libcurlu_la-cf-haproxy.lo
Removing lib/libcurlu_la-cf-haproxy.o
Removing lib/libcurlu_la-cf-https-connect.lo
Removing lib/libcurlu_la-cf-https-connect.o
Removing lib/libcurlu_la-cf-socket.lo
Removing lib/libcurlu_la-cf-socket.o
Removing lib/libcurlu_la-cfilters.lo
Removing lib/libcurlu_la-cfilters.o
Removing lib/libcurlu_la-conncache.lo
Removing lib/libcurlu_la-conncache.o
Removing lib/libcurlu_la-connect.lo
Removing lib/libcurlu_la-connect.o
Removing lib/libcurlu_la-content_encoding.lo
Removing lib/libcurlu_la-content_encoding.o
Removing lib/libcurlu_la-cookie.lo
Removing lib/libcurlu_la-cookie.o
Removing lib/libcurlu_la-cshutdn.lo
Removing lib/libcurlu_la-cshutdn.o
Removing lib/libcurlu_la-curl_addrinfo.lo
Removing lib/libcurlu_la-curl_addrinfo.o
Removing lib/libcurlu_la-curl_des.lo
Removing lib/libcurlu_la-curl_des.o
Removing lib/libcurlu_la-curl_endian.lo
Removing lib/libcurlu_la-curl_endian.o
Removing lib/libcurlu_la-curl_fnmatch.lo
Removing lib/libcurlu_la-curl_fnmatch.o
Removing lib/libcurlu_la-curl_get_line.lo
Removing lib/libcurlu_la-curl_get_line.o
Removing lib/libcurlu_la-curl_gethostname.lo
Removing lib/libcurlu_la-curl_gethostname.o
Removing lib/libcurlu_la-curl_gssapi.lo
Removing lib/libcurlu_la-curl_gssapi.o
Removing lib/libcurlu_la-curl_memrchr.lo
Removing lib/libcurlu_la-curl_memrchr.o
Removing lib/libcurlu_la-curl_ntlm_core.lo
Removing lib/libcurlu_la-curl_ntlm_core.o
Removing lib/libcurlu_la-curl_range.lo
Removing lib/libcurlu_la-curl_range.o
Removing lib/libcurlu_la-curl_rtmp.lo
Removing lib/libcurlu_la-curl_rtmp.o
Removing lib/libcurlu_la-curl_sasl.lo
Removing lib/libcurlu_la-curl_sasl.o
Removing lib/libcurlu_la-curl_sha512_256.lo
Removing lib/libcurlu_la-curl_sha512_256.o
Removing lib/libcurlu_la-curl_sspi.lo
Removing lib/libcurlu_la-curl_sspi.o
Removing lib/libcurlu_la-curl_threads.lo
Removing lib/libcurlu_la-curl_threads.o
Removing lib/libcurlu_la-curl_trc.lo
Removing lib/libcurlu_la-curl_trc.o
Removing lib/libcurlu_la-cw-out.lo
Removing lib/libcurlu_la-cw-out.o
Removing lib/libcurlu_la-cw-pause.lo
Removing lib/libcurlu_la-cw-pause.o
Removing lib/libcurlu_la-dict.lo
Removing lib/libcurlu_la-dict.o
Removing lib/libcurlu_la-doh.lo
Removing lib/libcurlu_la-doh.o
Removing lib/libcurlu_la-dynhds.lo
Removing lib/libcurlu_la-dynhds.o
Removing lib/libcurlu_la-easy.lo
Removing lib/libcurlu_la-easy.o
Removing lib/libcurlu_la-easygetopt.lo
Removing lib/libcurlu_la-easygetopt.o
Removing lib/libcurlu_la-easyoptions.lo
Removing lib/libcurlu_la-easyoptions.o
Removing lib/libcurlu_la-escape.lo
Removing lib/libcurlu_la-escape.o
Removing lib/libcurlu_la-fake_addrinfo.lo
Removing lib/libcurlu_la-fake_addrinfo.o
Removing lib/libcurlu_la-file.lo
Removing lib/libcurlu_la-file.o
Removing lib/libcurlu_la-fileinfo.lo
Removing lib/libcurlu_la-fileinfo.o
Removing lib/libcurlu_la-fopen.lo
Removing lib/libcurlu_la-fopen.o
Removing lib/libcurlu_la-formdata.lo
Removing lib/libcurlu_la-formdata.o
Removing lib/libcurlu_la-ftp.lo
Removing lib/libcurlu_la-ftp.o
Removing lib/libcurlu_la-ftplistparser.lo
Removing lib/libcurlu_la-ftplistparser.o
Removing lib/libcurlu_la-getenv.lo
Removing lib/libcurlu_la-getenv.o
Removing lib/libcurlu_la-getinfo.lo
Removing lib/libcurlu_la-getinfo.o
Removing lib/libcurlu_la-gopher.lo
Removing lib/libcurlu_la-gopher.o
Removing lib/libcurlu_la-hash.lo
Removing lib/libcurlu_la-hash.o
Removing lib/libcurlu_la-headers.lo
Removing lib/libcurlu_la-headers.o
Removing lib/libcurlu_la-hmac.lo
Removing lib/libcurlu_la-hmac.o
Removing lib/libcurlu_la-hostip.lo
Removing lib/libcurlu_la-hostip.o
Removing lib/libcurlu_la-hostip4.lo
Removing lib/libcurlu_la-hostip4.o
Removing lib/libcurlu_la-hostip6.lo
Removing lib/libcurlu_la-hostip6.o
Removing lib/libcurlu_la-hsts.lo
Removing lib/libcurlu_la-hsts.o
Removing lib/libcurlu_la-http.lo
Removing lib/libcurlu_la-http.o
Removing lib/libcurlu_la-http1.lo
Removing lib/libcurlu_la-http1.o
Removing lib/libcurlu_la-http2.lo
Removing lib/libcurlu_la-http2.o
Removing lib/libcurlu_la-http_aws_sigv4.lo
Removing lib/libcurlu_la-http_aws_sigv4.o
Removing lib/libcurlu_la-http_chunks.lo
Removing lib/libcurlu_la-http_chunks.o
Removing lib/libcurlu_la-http_digest.lo
Removing lib/libcurlu_la-http_digest.o
Removing lib/libcurlu_la-http_negotiate.lo
Removing lib/libcurlu_la-http_negotiate.o
Removing lib/libcurlu_la-http_ntlm.lo
Removing lib/libcurlu_la-http_ntlm.o
Removing lib/libcurlu_la-http_proxy.lo
Removing lib/libcurlu_la-http_proxy.o
Removing lib/libcurlu_la-httpsrr.lo
Removing lib/libcurlu_la-httpsrr.o
Removing lib/libcurlu_la-idn.lo
Removing lib/libcurlu_la-idn.o
Removing lib/libcurlu_la-if2ip.lo
Removing lib/libcurlu_la-if2ip.o
Removing lib/libcurlu_la-imap.lo
Removing lib/libcurlu_la-imap.o
Removing lib/libcurlu_la-krb5.lo
Removing lib/libcurlu_la-krb5.o
Removing lib/libcurlu_la-ldap.lo
Removing lib/libcurlu_la-ldap.o
Removing lib/libcurlu_la-llist.lo
Removing lib/libcurlu_la-llist.o
Removing lib/libcurlu_la-macos.lo
Removing lib/libcurlu_la-macos.o
Removing lib/libcurlu_la-md4.lo
Removing lib/libcurlu_la-md4.o
Removing lib/libcurlu_la-md5.lo
Removing lib/libcurlu_la-md5.o
Removing lib/libcurlu_la-memdebug.lo
Removing lib/libcurlu_la-memdebug.o
Removing lib/libcurlu_la-mime.lo
Removing lib/libcurlu_la-mime.o
Removing lib/libcurlu_la-mprintf.lo
Removing lib/libcurlu_la-mprintf.o
Removing lib/libcurlu_la-mqtt.lo
Removing lib/libcurlu_la-mqtt.o
Removing lib/libcurlu_la-multi.lo
Removing lib/libcurlu_la-multi.o
Removing lib/libcurlu_la-multi_ev.lo
Removing lib/libcurlu_la-multi_ev.o
Removing lib/libcurlu_la-netrc.lo
Removing lib/libcurlu_la-netrc.o
Removing lib/libcurlu_la-noproxy.lo
Removing lib/libcurlu_la-noproxy.o
Removing lib/libcurlu_la-openldap.lo
Removing lib/libcurlu_la-openldap.o
Removing lib/libcurlu_la-parsedate.lo
Removing lib/libcurlu_la-parsedate.o
Removing lib/libcurlu_la-pingpong.lo
Removing lib/libcurlu_la-pingpong.o
Removing lib/libcurlu_la-pop3.lo
Removing lib/libcurlu_la-pop3.o
Removing lib/libcurlu_la-progress.lo
Removing lib/libcurlu_la-progress.o
Removing lib/libcurlu_la-psl.lo
Removing lib/libcurlu_la-psl.o
Removing lib/libcurlu_la-rand.lo
Removing lib/libcurlu_la-rand.o
Removing lib/libcurlu_la-rename.lo
Removing lib/libcurlu_la-rename.o
Removing lib/libcurlu_la-request.lo
Removing lib/libcurlu_la-request.o
Removing lib/libcurlu_la-rtsp.lo
Removing lib/libcurlu_la-rtsp.o
Removing lib/libcurlu_la-select.lo
Removing lib/libcurlu_la-select.o
Removing lib/libcurlu_la-sendf.lo
Removing lib/libcurlu_la-sendf.o
Removing lib/libcurlu_la-setopt.lo
Removing lib/libcurlu_la-setopt.o
Removing lib/libcurlu_la-sha256.lo
Removing lib/libcurlu_la-sha256.o
Removing lib/libcurlu_la-share.lo
Removing lib/libcurlu_la-share.o
Removing lib/libcurlu_la-slist.lo
Removing lib/libcurlu_la-slist.o
Removing lib/libcurlu_la-smb.lo
Removing lib/libcurlu_la-smb.o
Removing lib/libcurlu_la-smtp.lo
Removing lib/libcurlu_la-smtp.o
Removing lib/libcurlu_la-socketpair.lo
Removing lib/libcurlu_la-socketpair.o
Removing lib/libcurlu_la-socks.lo
Removing lib/libcurlu_la-socks.o
Removing lib/libcurlu_la-socks_gssapi.lo
Removing lib/libcurlu_la-socks_gssapi.o
Removing lib/libcurlu_la-socks_sspi.lo
Removing lib/libcurlu_la-socks_sspi.o
Removing lib/libcurlu_la-speedcheck.lo
Removing lib/libcurlu_la-speedcheck.o
Removing lib/libcurlu_la-splay.lo
Removing lib/libcurlu_la-splay.o
Removing lib/libcurlu_la-strcase.lo
Removing lib/libcurlu_la-strcase.o
Removing lib/libcurlu_la-strdup.lo
Removing lib/libcurlu_la-strdup.o
Removing lib/libcurlu_la-strequal.lo
Removing lib/libcurlu_la-strequal.o
Removing lib/libcurlu_la-strerror.lo
Removing lib/libcurlu_la-strerror.o
Removing lib/libcurlu_la-system_win32.lo
Removing lib/libcurlu_la-system_win32.o
Removing lib/libcurlu_la-telnet.lo
Removing lib/libcurlu_la-telnet.o
Removing lib/libcurlu_la-tftp.lo
Removing lib/libcurlu_la-tftp.o
Removing lib/libcurlu_la-transfer.lo
Removing lib/libcurlu_la-transfer.o
Removing lib/libcurlu_la-uint-bset.lo
Removing lib/libcurlu_la-uint-bset.o
Removing lib/libcurlu_la-uint-hash.lo
Removing lib/libcurlu_la-uint-hash.o
Removing lib/libcurlu_la-uint-spbset.lo
Removing lib/libcurlu_la-uint-spbset.o
Removing lib/libcurlu_la-uint-table.lo
Removing lib/libcurlu_la-uint-table.o
Removing lib/libcurlu_la-url.lo
Removing lib/libcurlu_la-url.o
Removing lib/libcurlu_la-urlapi.lo
Removing lib/libcurlu_la-urlapi.o
Removing lib/libcurlu_la-version.lo
Removing lib/libcurlu_la-version.o
Removing lib/libcurlu_la-ws.lo
Removing lib/libcurlu_la-ws.o
Removing lib/stamp-h1
Removing lib/vauth/.deps/
Removing lib/vauth/.dirstamp
Removing lib/vauth/libcurl_la-cleartext.lo
Removing lib/vauth/libcurl_la-cleartext.o
Removing lib/vauth/libcurl_la-cram.lo
Removing lib/vauth/libcurl_la-cram.o
Removing lib/vauth/libcurl_la-digest.lo
Removing lib/vauth/libcurl_la-digest.o
Removing lib/vauth/libcurl_la-digest_sspi.lo
Removing lib/vauth/libcurl_la-digest_sspi.o
Removing lib/vauth/libcurl_la-gsasl.lo
Removing lib/vauth/libcurl_la-gsasl.o
Removing lib/vauth/libcurl_la-krb5_gssapi.lo
Removing lib/vauth/libcurl_la-krb5_gssapi.o
Removing lib/vauth/libcurl_la-krb5_sspi.lo
Removing lib/vauth/libcurl_la-krb5_sspi.o
Removing lib/vauth/libcurl_la-ntlm.lo
Removing lib/vauth/libcurl_la-ntlm.o
Removing lib/vauth/libcurl_la-ntlm_sspi.lo
Removing lib/vauth/libcurl_la-ntlm_sspi.o
Removing lib/vauth/libcurl_la-oauth2.lo
Removing lib/vauth/libcurl_la-oauth2.o
Removing lib/vauth/libcurl_la-spnego_gssapi.lo
Removing lib/vauth/libcurl_la-spnego_gssapi.o
Removing lib/vauth/libcurl_la-spnego_sspi.lo
Removing lib/vauth/libcurl_la-spnego_sspi.o
Removing lib/vauth/libcurl_la-vauth.lo
Removing lib/vauth/libcurl_la-vauth.o
Removing lib/vauth/libcurlu_la-cleartext.lo
Removing lib/vauth/libcurlu_la-cleartext.o
Removing lib/vauth/libcurlu_la-cram.lo
Removing lib/vauth/libcurlu_la-cram.o
Removing lib/vauth/libcurlu_la-digest.lo
Removing lib/vauth/libcurlu_la-digest.o
Removing lib/vauth/libcurlu_la-digest_sspi.lo
Removing lib/vauth/libcurlu_la-digest_sspi.o
Removing lib/vauth/libcurlu_la-gsasl.lo
Removing lib/vauth/libcurlu_la-gsasl.o
Removing lib/vauth/libcurlu_la-krb5_gssapi.lo
Removing lib/vauth/libcurlu_la-krb5_gssapi.o
Removing lib/vauth/libcurlu_la-krb5_sspi.lo
Removing lib/vauth/libcurlu_la-krb5_sspi.o
Removing lib/vauth/libcurlu_la-ntlm.lo
Removing lib/vauth/libcurlu_la-ntlm.o
Removing lib/vauth/libcurlu_la-ntlm_sspi.lo
Removing lib/vauth/libcurlu_la-ntlm_sspi.o
Removing lib/vauth/libcurlu_la-oauth2.lo
Removing lib/vauth/libcurlu_la-oauth2.o
Removing lib/vauth/libcurlu_la-spnego_gssapi.lo
Removing lib/vauth/libcurlu_la-spnego_gssapi.o
Removing lib/vauth/libcurlu_la-spnego_sspi.lo
Removing lib/vauth/libcurlu_la-spnego_sspi.o
Removing lib/vauth/libcurlu_la-vauth.lo
Removing lib/vauth/libcurlu_la-vauth.o
Removing lib/vquic/.deps/
Removing lib/vquic/.dirstamp
Removing lib/vquic/libcurl_la-curl_msh3.lo
Removing lib/vquic/libcurl_la-curl_msh3.o
Removing lib/vquic/libcurl_la-curl_ngtcp2.lo
Removing lib/vquic/libcurl_la-curl_ngtcp2.o
Removing lib/vquic/libcurl_la-curl_osslq.lo
Removing lib/vquic/libcurl_la-curl_osslq.o
Removing lib/vquic/libcurl_la-curl_quiche.lo
Removing lib/vquic/libcurl_la-curl_quiche.o
Removing lib/vquic/libcurl_la-vquic-tls.lo
Removing lib/vquic/libcurl_la-vquic-tls.o
Removing lib/vquic/libcurl_la-vquic.lo
Removing lib/vquic/libcurl_la-vquic.o
Removing lib/vquic/libcurlu_la-curl_msh3.lo
Removing lib/vquic/libcurlu_la-curl_msh3.o
Removing lib/vquic/libcurlu_la-curl_ngtcp2.lo
Removing lib/vquic/libcurlu_la-curl_ngtcp2.o
Removing lib/vquic/libcurlu_la-curl_osslq.lo
Removing lib/vquic/libcurlu_la-curl_osslq.o
Removing lib/vquic/libcurlu_la-curl_quiche.lo
Removing lib/vquic/libcurlu_la-curl_quiche.o
Removing lib/vquic/libcurlu_la-vquic-tls.lo
Removing lib/vquic/libcurlu_la-vquic-tls.o
Removing lib/vquic/libcurlu_la-vquic.lo
Removing lib/vquic/libcurlu_la-vquic.o
Removing lib/vssh/.deps/
Removing lib/vssh/.dirstamp
Removing lib/vssh/libcurl_la-curl_path.lo
Removing lib/vssh/libcurl_la-curl_path.o
Removing lib/vssh/libcurl_la-libssh.lo
Removing lib/vssh/libcurl_la-libssh.o
Removing lib/vssh/libcurl_la-libssh2.lo
Removing lib/vssh/libcurl_la-libssh2.o
Removing lib/vssh/libcurl_la-wolfssh.lo
Removing lib/vssh/libcurl_la-wolfssh.o
Removing lib/vssh/libcurlu_la-curl_path.lo
Removing lib/vssh/libcurlu_la-curl_path.o
Removing lib/vssh/libcurlu_la-libssh.lo
Removing lib/vssh/libcurlu_la-libssh.o
Removing lib/vssh/libcurlu_la-libssh2.lo
Removing lib/vssh/libcurlu_la-libssh2.o
Removing lib/vssh/libcurlu_la-wolfssh.lo
Removing lib/vssh/libcurlu_la-wolfssh.o
Removing lib/vtls/.deps/
Removing lib/vtls/.dirstamp
Removing lib/vtls/libcurl_la-bearssl.lo
Removing lib/vtls/libcurl_la-bearssl.o
Removing lib/vtls/libcurl_la-cipher_suite.lo
Removing lib/vtls/libcurl_la-cipher_suite.o
Removing lib/vtls/libcurl_la-gtls.lo
Removing lib/vtls/libcurl_la-gtls.o
Removing lib/vtls/libcurl_la-hostcheck.lo
Removing lib/vtls/libcurl_la-hostcheck.o
Removing lib/vtls/libcurl_la-keylog.lo
Removing lib/vtls/libcurl_la-keylog.o
Removing lib/vtls/libcurl_la-mbedtls.lo
Removing lib/vtls/libcurl_la-mbedtls.o
Removing lib/vtls/libcurl_la-mbedtls_threadlock.lo
Removing lib/vtls/libcurl_la-mbedtls_threadlock.o
Removing lib/vtls/libcurl_la-openssl.lo
Removing lib/vtls/libcurl_la-openssl.o
Removing lib/vtls/libcurl_la-rustls.lo
Removing lib/vtls/libcurl_la-rustls.o
Removing lib/vtls/libcurl_la-schannel.lo
Removing lib/vtls/libcurl_la-schannel.o
Removing lib/vtls/libcurl_la-schannel_verify.lo
Removing lib/vtls/libcurl_la-schannel_verify.o
Removing lib/vtls/libcurl_la-sectransp.lo
Removing lib/vtls/libcurl_la-sectransp.o
Removing lib/vtls/libcurl_la-vtls.lo
Removing lib/vtls/libcurl_la-vtls.o
Removing lib/vtls/libcurl_la-vtls_scache.lo
Removing lib/vtls/libcurl_la-vtls_scache.o
Removing lib/vtls/libcurl_la-vtls_spack.lo
Removing lib/vtls/libcurl_la-vtls_spack.o
Removing lib/vtls/libcurl_la-wolfssl.lo
Removing lib/vtls/libcurl_la-wolfssl.o
Removing lib/vtls/libcurl_la-x509asn1.lo
Removing lib/vtls/libcurl_la-x509asn1.o
Removing lib/vtls/libcurlu_la-bearssl.lo
Removing lib/vtls/libcurlu_la-bearssl.o
Removing lib/vtls/libcurlu_la-cipher_suite.lo
Removing lib/vtls/libcurlu_la-cipher_suite.o
Removing lib/vtls/libcurlu_la-gtls.lo
Removing lib/vtls/libcurlu_la-gtls.o
Removing lib/vtls/libcurlu_la-hostcheck.lo
Removing lib/vtls/libcurlu_la-hostcheck.o
Removing lib/vtls/libcurlu_la-keylog.lo
Removing lib/vtls/libcurlu_la-keylog.o
Removing lib/vtls/libcurlu_la-mbedtls.lo
Removing lib/vtls/libcurlu_la-mbedtls.o
Removing lib/vtls/libcurlu_la-mbedtls_threadlock.lo
Removing lib/vtls/libcurlu_la-mbedtls_threadlock.o
Removing lib/vtls/libcurlu_la-openssl.lo
Removing lib/vtls/libcurlu_la-openssl.o
Removing lib/vtls/libcurlu_la-rustls.lo
Removing lib/vtls/libcurlu_la-rustls.o
Removing lib/vtls/libcurlu_la-schannel.lo
Removing lib/vtls/libcurlu_la-schannel.o
Removing lib/vtls/libcurlu_la-schannel_verify.lo
Removing lib/vtls/libcurlu_la-schannel_verify.o
Removing lib/vtls/libcurlu_la-sectransp.lo
Removing lib/vtls/libcurlu_la-sectransp.o
Removing lib/vtls/libcurlu_la-vtls.lo
Removing lib/vtls/libcurlu_la-vtls.o
Removing lib/vtls/libcurlu_la-vtls_scache.lo
Removing lib/vtls/libcurlu_la-vtls_scache.o
Removing lib/vtls/libcurlu_la-vtls_spack.lo
Removing lib/vtls/libcurlu_la-vtls_spack.o
Removing lib/vtls/libcurlu_la-wolfssl.lo
Removing lib/vtls/libcurlu_la-wolfssl.o
Removing lib/vtls/libcurlu_la-x509asn1.lo
Removing lib/vtls/libcurlu_la-x509asn1.o
Removing libcurl.pc
Removing libtool
Removing ltmain.sh
Removing m4/libtool.m4
Removing m4/ltoptions.m4
Removing m4/ltsugar.m4
Removing m4/ltversion.m4
Removing m4/lt~obsolete.m4
Removing missing
Removing packages/Makefile
Removing packages/Makefile.in
Removing packages/vms/Makefile
Removing packages/vms/Makefile.in
Removing scripts/Makefile
Removing scripts/Makefile.in
Removing src/.deps/
Removing src/.libs/
Removing src/Makefile
Removing src/Makefile.in
Removing src/curl
Removing src/curl-config2setopts.o
Removing src/curl-slist_wc.o
Removing src/curl-terminal.o
Removing src/curl-tool_bname.o
Removing src/curl-tool_ca_embed.o
Removing src/curl-tool_cb_dbg.o
Removing src/curl-tool_cb_hdr.o
Removing src/curl-tool_cb_prg.o
Removing src/curl-tool_cb_rea.o
Removing src/curl-tool_cb_see.o
Removing src/curl-tool_cb_soc.o
Removing src/curl-tool_cb_wrt.o
Removing src/curl-tool_cfgable.o
Removing src/curl-tool_dirhie.o
Removing src/curl-tool_doswin.o
Removing src/curl-tool_easysrc.o
Removing src/curl-tool_filetime.o
Removing src/curl-tool_findfile.o
Removing src/curl-tool_formparse.o
Removing src/curl-tool_getparam.o
Removing src/curl-tool_getpass.o
Removing src/curl-tool_help.o
Removing src/curl-tool_helpers.o
Removing src/curl-tool_hugehelp.o
Removing src/curl-tool_ipfs.o
Removing src/curl-tool_libinfo.o
Removing src/curl-tool_listhelp.o
Removing src/curl-tool_main.o
Removing src/curl-tool_msgs.o
Removing src/curl-tool_operate.o
Removing src/curl-tool_operhlp.o
Removing src/curl-tool_paramhlp.o
Removing src/curl-tool_parsecfg.o
Removing src/curl-tool_progress.o
Removing src/curl-tool_setopt.o
Removing src/curl-tool_sleep.o
Removing src/curl-tool_ssls.o
Removing src/curl-tool_stderr.o
Removing src/curl-tool_strdup.o
Removing src/curl-tool_urlglob.o
Removing src/curl-tool_util.o
Removing src/curl-tool_vms.o
Removing src/curl-tool_writeout.o
Removing src/curl-tool_writeout_json.o
Removing src/curl-tool_xattr.o
Removing src/curl-var.o
Removing src/curlinfo
Removing src/curlinfo.o
Removing src/libcurltool.la
Removing src/libcurltool_la-config2setopts.lo
Removing src/libcurltool_la-config2setopts.o
Removing src/libcurltool_la-slist_wc.lo
Removing src/libcurltool_la-slist_wc.o
Removing src/libcurltool_la-terminal.lo
Removing src/libcurltool_la-terminal.o
Removing src/libcurltool_la-tool_bname.lo
Removing src/libcurltool_la-tool_bname.o
Removing src/libcurltool_la-tool_cb_dbg.lo
Removing src/libcurltool_la-tool_cb_dbg.o
Removing src/libcurltool_la-tool_cb_hdr.lo
Removing src/libcurltool_la-tool_cb_hdr.o
Removing src/libcurltool_la-tool_cb_prg.lo
Removing src/libcurltool_la-tool_cb_prg.o
Removing src/libcurltool_la-tool_cb_rea.lo
Removing src/libcurltool_la-tool_cb_rea.o
Removing src/libcurltool_la-tool_cb_see.lo
Removing src/libcurltool_la-tool_cb_see.o
Removing src/libcurltool_la-tool_cb_soc.lo
Removing src/libcurltool_la-tool_cb_soc.o
Removing src/libcurltool_la-tool_cb_wrt.lo
Removing src/libcurltool_la-tool_cb_wrt.o
Removing src/libcurltool_la-tool_cfgable.lo
Removing src/libcurltool_la-tool_cfgable.o
Removing src/libcurltool_la-tool_dirhie.lo
Removing src/libcurltool_la-tool_dirhie.o
Removing src/libcurltool_la-tool_doswin.lo
Removing src/libcurltool_la-tool_doswin.o
Removing src/libcurltool_la-tool_easysrc.lo
Removing src/libcurltool_la-tool_easysrc.o
Removing src/libcurltool_la-tool_filetime.lo
Removing src/libcurltool_la-tool_filetime.o
Removing src/libcurltool_la-tool_findfile.lo
Removing src/libcurltool_la-tool_findfile.o
Removing src/libcurltool_la-tool_formparse.lo
Removing src/libcurltool_la-tool_formparse.o
Removing src/libcurltool_la-tool_getparam.lo
Removing src/libcurltool_la-tool_getparam.o
Removing src/libcurltool_la-tool_getpass.lo
Removing src/libcurltool_la-tool_getpass.o
Removing src/libcurltool_la-tool_help.lo
Removing src/libcurltool_la-tool_help.o
Removing src/libcurltool_la-tool_helpers.lo
Removing src/libcurltool_la-tool_helpers.o
Removing src/libcurltool_la-tool_ipfs.lo
Removing src/libcurltool_la-tool_ipfs.o
Removing src/libcurltool_la-tool_libinfo.lo
Removing src/libcurltool_la-tool_libinfo.o
Removing src/libcurltool_la-tool_listhelp.lo
Removing src/libcurltool_la-tool_listhelp.o
Removing src/libcurltool_la-tool_main.lo
Removing src/libcurltool_la-tool_main.o
Removing src/libcurltool_la-tool_msgs.lo
Removing src/libcurltool_la-tool_msgs.o
Removing src/libcurltool_la-tool_operate.lo
Removing src/libcurltool_la-tool_operate.o
Removing src/libcurltool_la-tool_operhlp.lo
Removing src/libcurltool_la-tool_operhlp.o
Removing src/libcurltool_la-tool_paramhlp.lo
Removing src/libcurltool_la-tool_paramhlp.o
Removing src/libcurltool_la-tool_parsecfg.lo
Removing src/libcurltool_la-tool_parsecfg.o
Removing src/libcurltool_la-tool_progress.lo
Removing src/libcurltool_la-tool_progress.o
Removing src/libcurltool_la-tool_setopt.lo
Removing src/libcurltool_la-tool_setopt.o
Removing src/libcurltool_la-tool_sleep.lo
Removing src/libcurltool_la-tool_sleep.o
Removing src/libcurltool_la-tool_ssls.lo
Removing src/libcurltool_la-tool_ssls.o
Removing src/libcurltool_la-tool_stderr.lo
Removing src/libcurltool_la-tool_stderr.o
Removing src/libcurltool_la-tool_strdup.lo
Removing src/libcurltool_la-tool_strdup.o
Removing src/libcurltool_la-tool_urlglob.lo
Removing src/libcurltool_la-tool_urlglob.o
Removing src/libcurltool_la-tool_util.lo
Removing src/libcurltool_la-tool_util.o
Removing src/libcurltool_la-tool_vms.lo
Removing src/libcurltool_la-tool_vms.o
Removing src/libcurltool_la-tool_writeout.lo
Removing src/libcurltool_la-tool_writeout.o
Removing src/libcurltool_la-tool_writeout_json.lo
Removing src/libcurltool_la-tool_writeout_json.o
Removing src/libcurltool_la-tool_xattr.lo
Removing src/libcurltool_la-tool_xattr.o
Removing src/libcurltool_la-var.lo
Removing src/libcurltool_la-var.o
Removing src/tool_ca_embed.c
Removing src/tool_hugehelp.c
Removing tests/Makefile
Removing tests/Makefile.in
Removing tests/certs/Makefile
Removing tests/certs/Makefile.in
Removing tests/config
Removing tests/configurehelp.pm
Removing tests/data/Makefile
Removing tests/data/Makefile.in
Removing tests/http/Makefile
Removing tests/http/Makefile.in
Removing tests/http/clients/.deps/
Removing tests/http/clients/Makefile
Removing tests/http/clients/Makefile.in
Removing tests/http/config.ini
Removing tests/libtest/.deps/
Removing tests/libtest/Makefile
Removing tests/libtest/Makefile.in
Removing tests/server/.deps/
Removing tests/server/Makefile
Removing tests/server/Makefile.in
Removing tests/tunit/.deps/
Removing tests/tunit/Makefile
Removing tests/tunit/Makefile.in
Removing tests/unit/.deps/
Removing tests/unit/Makefile
Removing tests/unit/Makefile.in

$ autoreconf -fi
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure.ac:128: installing './compile'
configure.ac:436: installing './config.guess'
configure.ac:436: installing './config.sub'
configure.ac:128: installing './install-sh'
configure.ac:134: installing './missing'
docs/examples/Makefile.am: installing './depcomp'

$ bash -c find . -name config.guess -exec cp /usr/share/misc/config.guess {} \;

$ bash -c find . -name config.sub -exec cp /usr/share/misc/config.sub {} \;

$ chmod +x configure

$ ./configure --disable-shared --without-ssl --disable-docs
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable HTTPSRR support... no
checking whether to enable ECH support... no
checking whether to enable SSL session export support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking that grep -E works... yes
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... ccache gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether ccache gcc accepts -g... yes
checking for ccache gcc option to enable C11 features... none needed
checking whether ccache gcc understands -c and -o together... yes
checking how to run the C preprocessor... ccache gcc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdatomic.h... yes
checking if _Atomic is available... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of ccache gcc... gcc3
checking curl version... 8.14.2-DEV
checking for httpd... no
checking for apache2... no
checking for apxs... no
configure: httpd/apache2 not in PATH, http tests disabled
configure: apxs not in PATH, http tests disabled
checking for nghttpx... no
checking for caddy... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _ALL_SOURCE)... no
checking if _THREAD_SAFE is already defined... no
checking if _THREAD_SAFE is actually needed... no
checking if _THREAD_SAFE is onwards defined... no
checking if _REENTRANT is already defined... no
checking if _REENTRANT is actually needed... no
checking if _REENTRANT is onwards defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by ccache gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from ccache gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if ccache gcc supports -fno-rtti -fno-exceptions... no
checking for ccache gcc option to produce PIC... -fPIC -DPIC
checking if ccache gcc PIC flag -fPIC -DPIC works... yes
checking if ccache gcc static flag -static works... yes
checking if ccache gcc supports -c -o file.o... yes
checking if ccache gcc supports -c -o file.o... (cached) yes
checking whether the ccache gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether to build shared libraries with -version-info... yes
checking whether to build shared libraries with -no-undefined... no
checking whether to build shared libraries with -mimpure-text... no
checking whether to build shared libraries with PIC... yes
checking whether to build static libraries with PIC... yes
checking whether to build shared libraries only... no
checking whether to build static libraries only... yes
checking for windres... no
checking if cpp -P is needed... yes
checking if cpp -P works... yes
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking compiler version... gcc '1100' (raw: '11')
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking whether build target is a native Windows one... no
checking if compiler accepts some basic options... yes
configure: compiler options added: -Werror-implicit-function-declaration 
checking if compiler optimizer assumed setting might be used... yes
checking if compiler accepts optimizer enabling options... yes
configure: compiler options added: -O2
checking if compiler accepts strict warning options... yes
configure: compiler options added: -Wno-system-headers 
checking if compiler halts on compilation errors... yes
checking if compiler halts on negative sized arrays... yes
checking if compiler halts on function prototype mismatch... yes
checking if compiler supports hiding library internal symbols... yes
no
checking whether build target supports Win32 crypto API... no
checking whether to build libcurl and curl in "unity" mode... no
checking whether to build tests into single-binary bundles... no
checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support IPFS... yes
checking whether to support ldap... yes
checking whether to support ldaps... yes
checking whether to support rtsp... yes
checking whether to support proxies... yes
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to support pop3... yes
checking whether to support imap... yes
checking whether to support smb... yes
checking whether to support smtp... yes
checking whether to support gopher... yes
checking whether to support mqtt... no
checking whether to provide built-in manual... yes
checking whether to build documentation... no
checking whether to enable generation of C code... yes
checking whether to use libgcc... no
checking if X/Open network library is required... no
checking for gethostbyname... yes
checking whether build target is a native Windows one... (cached) no
checking for proto/bsdsocket.h... no
checking for connect in libraries... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for monotonic clock_gettime... yes
checking for clock_gettime in libraries... no additional lib required
checking if monotonic clock_gettime works... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for raw monotonic clock_gettime... yes
checking for pkg-config... /usr/bin/pkg-config
checking for zlib options with pkg-config... found
checking for zlib.h... yes
configure: found both libz and libz.h header
checking for BrotliDecoderDecompress in -lbrotlidec... no
checking for brotli/decode.h... no
checking for ZSTD_createDStream in -lzstd... no
checking for zstd.h... no
checking for lber.h... no
checking for ldap.h... no
checking for ldap_ssl.h... no
checking for LDAP libraries... cannot find LDAP libraries
checking whether to enable IPv6... yes
checking if struct sockaddr_in6 has sin6_scope_id member... yes
checking if argv can be written to... yes
checking if GSS-API support is requested... no
checking whether to enable Windows native SSL/TLS... no
checking whether to enable Secure Transport... no
checking whether to enable Amiga native SSL/TLS (AmiSSL v5)... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libpsl options with pkg-config... found
checking for psl_builtin in -lpsl... yes
checking for libpsl.h... yes
checking for library containing gsasl_init... no
checking for RTMP_Init in -lrtmp... no
checking whether versioned symbols are wanted... no
checking whether to build with libidn2... (assumed) yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libidn2 options with pkg-config... no
configure: IDN_LIBS: "-lidn2"
configure: IDN_LDFLAGS: ""
configure: IDN_CPPFLAGS: ""
configure: IDN_DIR: ""
checking if idn2_lookup_ul can be linked... no
checking for idn2.h... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libnghttp2 options with pkg-config... no
checking for nghttp2_session_get_stream_local_window_size in -lnghttp2... no
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/ioctl.h... yes
checking for unistd.h... (cached) yes
checking for arpa/inet.h... yes
checking for net/if.h... yes
checking for netinet/in.h... yes
checking for netinet/in6.h... no
checking for sys/un.h... yes
checking for linux/tcp.h... yes
checking for netinet/tcp.h... yes
checking for netinet/udp.h... yes
checking for netdb.h... yes
checking for sys/sockio.h... no
checking for sys/stat.h... (cached) yes
checking for sys/param.h... yes
checking for termios.h... yes
checking for termio.h... yes
checking for fcntl.h... yes
checking for io.h... no
checking for pwd.h... yes
checking for utime.h... yes
checking for sys/utime.h... no
checking for sys/poll.h... yes
checking for poll.h... yes
checking for sys/resource.h... yes
checking for libgen.h... yes
checking for locale.h... yes
checking for stdbool.h... yes
checking for stdint.h... (cached) yes
checking for sys/filio.h... no
checking for sys/eventfd.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for struct timeval... yes
checking run-time libs availability... fine
checking size of size_t... 8
checking size of long... 8
checking size of int... 4
checking size of time_t... 8
checking size of off_t... 8
checking size of curl_off_t... 8
checking size of curl_socket_t... 4
checking for long long... yes
checking for ssize_t... yes
checking for bool... yes
checking for sa_family_t... yes
checking for suseconds_t... yes
checking if time_t is unsigned... no
checking for struct sockaddr_storage... yes
checking for sys/select.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for select... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for recv... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for send... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for MSG_NOSIGNAL... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking if alarm can be linked... yes
checking if alarm is prototyped... yes
checking if alarm is compilable... yes
checking if alarm usage allowed... yes
checking if alarm might be used... yes
checking for sys/types.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for libgen.h... (cached) yes
checking if basename can be linked... yes
checking if basename is prototyped... yes
checking if basename is compilable... yes
checking if basename usage allowed... yes
checking if basename might be used... yes
checking if closesocket can be linked... no
checking if closesocket might be used... no
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking if CloseSocket can be linked... no
checking if CloseSocket might be used... no
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for fcntl.h... (cached) yes
checking if fcntl can be linked... yes
checking if fcntl is prototyped... yes
checking if fcntl is compilable... yes
checking if fcntl usage allowed... yes
checking if fcntl might be used... yes
checking if fcntl O_NONBLOCK is compilable... yes
checking if fcntl O_NONBLOCK usage allowed... yes
checking if fcntl O_NONBLOCK might be used... yes
checking whether build target is a native Windows one... (cached) no
checking for sys/types.h... (cached) yes
checking for netdb.h... (cached) yes
checking if freeaddrinfo can be linked... yes
checking if freeaddrinfo is prototyped... yes
checking if freeaddrinfo is compilable... yes
checking if freeaddrinfo usage allowed... yes
checking if freeaddrinfo might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/xattr.h... yes
checking if fsetxattr can be linked... yes
checking if fsetxattr is prototyped... yes
checking if fsetxattr takes 5 args.... yes
checking if fsetxattr is compilable... yes
checking if fsetxattr usage allowed... yes
checking if fsetxattr might be used... yes
checking if ftruncate can be linked... yes
checking if ftruncate is prototyped... yes
checking if ftruncate is compilable... yes
checking if ftruncate usage allowed... yes
checking if ftruncate might be used... yes
checking for sys/types.h... (cached) yes
checking if getaddrinfo can be linked... yes
checking if getaddrinfo is prototyped... yes
checking if getaddrinfo is compilable... yes
checking if getaddrinfo seems to work... yes
checking if getaddrinfo usage allowed... yes
checking if getaddrinfo might be used... yes
checking if getaddrinfo is threadsafe... yes
checking if gethostbyname_r can be linked... yes
checking if gethostbyname_r is prototyped... yes
checking if gethostbyname_r takes 3 args.... no
checking if gethostbyname_r takes 5 args.... no
checking if gethostbyname_r takes 6 args.... yes
checking if gethostbyname_r is compilable... yes
checking if gethostbyname_r usage allowed... yes
checking if gethostbyname_r might be used... yes
checking if gethostname can be linked... yes
checking if gethostname is prototyped... yes
checking if gethostname is compilable... yes
checking for gethostname arg 2 data type... size_t
checking if gethostname usage allowed... yes
checking if gethostname might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for ifaddrs.h... yes
checking if getifaddrs can be linked... yes
checking if getifaddrs is prototyped... yes
checking if getifaddrs is compilable... yes
checking if getifaddrs seems to work... yes
checking if getifaddrs usage allowed... yes
checking if getifaddrs might be used... yes
checking if getpeername can be linked... yes
checking if getpeername is prototyped... yes
checking if getpeername is compilable... yes
checking if getpeername usage allowed... yes
checking if getpeername might be used... yes
checking if getsockname can be linked... yes
checking if getsockname is prototyped... yes
checking if getsockname is compilable... yes
checking if getsockname usage allowed... yes
checking if getsockname might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking if gmtime_r can be linked... yes
checking if gmtime_r is prototyped... yes
checking if gmtime_r is compilable... yes
checking if gmtime_r seems to work... yes
checking if gmtime_r usage allowed... yes
checking if gmtime_r might be used... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for stropts.h... no
checking if ioctl can be linked... yes
checking if ioctl is prototyped... yes
checking if ioctl is compilable... yes
checking if ioctl usage allowed... yes
checking if ioctl might be used... yes
checking if ioctl FIONBIO is compilable... yes
checking if ioctl FIONBIO usage allowed... yes
checking if ioctl FIONBIO might be used... yes
checking if ioctl SIOCGIFADDR is compilable... yes
checking if ioctl SIOCGIFADDR usage allowed... yes
checking if ioctl SIOCGIFADDR might be used... yes
checking if ioctlsocket can be linked... no
checking if ioctlsocket might be used... no
checking if IoctlSocket can be linked... no
checking if IoctlSocket might be used... no
checking if memrchr can be linked... yes
checking if memrchr is prototyped... yes
checking if memrchr is compilable... yes
checking if memrchr usage allowed... yes
checking if memrchr might be used... yes
checking for sys/types.h... (cached) yes
checking if sigaction can be linked... yes
checking if sigaction is prototyped... yes
checking if sigaction is compilable... yes
checking if sigaction usage allowed... yes
checking if sigaction might be used... yes
checking if siginterrupt can be linked... yes
checking if siginterrupt is prototyped... yes
checking if siginterrupt is compilable... yes
checking if siginterrupt usage allowed... yes
checking if siginterrupt might be used... yes
checking if signal can be linked... yes
checking if signal is prototyped... yes
checking if signal is compilable... yes
checking if signal usage allowed... yes
checking if signal might be used... yes
checking for sys/types.h... (cached) yes
checking if sigsetjmp can be linked... no
checking if sigsetjmp seems a macro... yes
checking if sigsetjmp is compilable... yes
checking if sigsetjmp usage allowed... yes
checking if sigsetjmp might be used... yes
checking if socket can be linked... yes
checking if socket is prototyped... yes
checking if socket is compilable... yes
checking if socket usage allowed... yes
checking if socket might be used... yes
checking if socketpair can be linked... yes
checking if socketpair is prototyped... yes
checking if socketpair is compilable... yes
checking if socketpair usage allowed... yes
checking if socketpair might be used... yes
checking if strdup can be linked... yes
checking if strdup is prototyped... yes
checking if strdup is compilable... yes
checking if strdup usage allowed... yes
checking if strdup might be used... yes
checking if strerror_r can be linked... yes
checking if strerror_r is prototyped... yes
checking if strerror_r is compilable... yes
checking if strerror_r is glibc like... yes
checking if strerror_r seems to work... yes
checking if strerror_r usage allowed... yes
checking if strerror_r might be used... yes
checking for accept4... yes
checking for eventfd... yes
checking for fnmatch... yes
checking for geteuid... yes
checking for getpass_r... no
checking for getppid... yes
checking for getpwuid... yes
checking for getpwuid_r... yes
checking for getrlimit... yes
checking for gettimeofday... yes
checking for if_nametoindex... yes
checking for mach_absolute_time... no
checking for pipe... yes
checking for pipe2... yes
checking for poll... yes
checking for sendmmsg... yes
checking for sendmsg... yes
checking for setlocale... yes
checking for setrlimit... yes
checking for snprintf... yes
checking for utime... yes
checking for utimes... yes
checking for realpath... yes
checking for sched_yield... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for arpa/inet.h... (cached) yes
checking if inet_ntop can be linked... yes
checking if inet_ntop is prototyped... yes
checking if inet_ntop is compilable... yes
checking if inet_ntop seems to work... yes
checking if inet_ntop usage allowed... yes
checking if inet_ntop might be used... yes
checking if inet_pton can be linked... yes
checking if inet_pton is prototyped... yes
checking if inet_pton is compilable... yes
checking if inet_pton seems to work... yes
checking if inet_pton usage allowed... yes
checking if inet_pton might be used... yes
checking if strcasecmp can be linked... yes
checking if strcasecmp is prototyped... yes
checking if strcasecmp is compilable... yes
checking if strcasecmp usage allowed... yes
checking if strcasecmp might be used... yes
checking if strcmpi can be linked... no
checking if strcmpi might be used... no
checking if stricmp can be linked... no
checking if stricmp might be used... no
checking for setmode... no
checking for arc4random... no
checking for fseeko... yes
checking for ccache gcc options needed to detect all undeclared functions... none needed
checking whether fseeko is declared... yes
checking how to set a socket into non-blocking mode... fcntl O_NONBLOCK
checking for perl... /usr/bin/perl
checking whether to enable the threaded resolver... yes
checking for pthread.h... yes
checking for pthread_create... yes
checking for dirent.h... yes
checking for opendir... yes
checking convert -I options to -isystem... yes
checking whether to enable verbose strings... yes
checking whether to enable SSPI support (Windows native builds only)... no
checking whether to enable basic authentication method... yes
checking whether to enable bearer authentication method... yes
checking whether to enable digest authentication method... yes
checking whether to enable kerberos authentication method... yes
checking whether to enable negotiate authentication method... yes
checking whether to enable aws sig methods... yes
checking whether to support NTLM... yes
checking whether to enable TLS-SRP authentication... yes
checking whether to enable Unix domain sockets... auto
checking for struct sockaddr_un.sun_path... yes
checking whether to support cookies... yes
checking whether to support socketpair... yes
checking whether to support HTTP authentication... yes
checking whether to support DoH... yes
checking whether to support the MIME API... yes
checking whether to support binding connections locally... yes
checking whether to support the form API... yes
checking whether to support date parsing... yes
checking whether to support netrc parsing... yes
checking whether to support progress-meter... yes
checking whether to support the SHA-512/256 hash algorithm... yes
checking whether to support DNS shuffling... yes
checking whether to support curl_easy_option*... yes
checking whether to support alt-svc... yes
checking whether to support headers-api... yes
configure: disables HSTS due to lack of SSL
checking whether to enable HTTPS-RR support... no
checking whether to support WebSockets... yes
checking whether hiding of library internal symbols will actually happen... yes
checking if this build supports HTTPS-proxy... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/examples/Makefile
config.status: creating docs/libcurl/Makefile
config.status: creating docs/libcurl/opts/Makefile
config.status: creating docs/cmdline-opts/Makefile
config.status: creating include/Makefile
config.status: creating include/curl/Makefile
config.status: creating src/Makefile
config.status: creating lib/Makefile
config.status: creating scripts/Makefile
config.status: creating lib/libcurl.vers
config.status: creating tests/Makefile
config.status: creating tests/config
config.status: creating tests/configurehelp.pm
config.status: creating tests/certs/Makefile
config.status: creating tests/data/Makefile
config.status: creating tests/server/Makefile
config.status: creating tests/libtest/Makefile
config.status: creating tests/unit/Makefile
config.status: creating tests/tunit/Makefile
config.status: creating tests/http/config.ini
config.status: creating tests/http/Makefile
config.status: creating tests/http/clients/Makefile
config.status: creating packages/Makefile
config.status: creating packages/vms/Makefile
config.status: creating curl-config
config.status: creating libcurl.pc
config.status: creating lib/curl_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Configured to build curl/libcurl:

  Host setup:       x86_64-pc-linux-gnu
  Install prefix:   /usr/local
  Compiler:         ccache gcc
   CFLAGS:          -Werror-implicit-function-declaration -O2 -Wno-system-headers
   CFLAGS extras:   
   CPPFLAGS:        -D_GNU_SOURCE
   LDFLAGS:         
     curl-config:   
   LIBS:            -lpsl -lz

  curl version:     8.14.2-DEV
  SSL:              no      (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )
  SSH:              no      (--with-{libssh,libssh2})
  zlib:             enabled
  brotli:           no      (--with-brotli)
  zstd:             no      (--with-zstd)
  GSS-API:          no      (--with-gssapi)
  GSASL:            no      (libgsasl not found)
  TLS-SRP:          no      (--enable-tls-srp)
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     enabled
  IDN:              no      (--with-{libidn2,winidn})
  Build docs:       no
  Build libcurl:    Shared=no, Static=yes
  Built-in manual:  no      (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     
  ca cert embed:    no
  ca fallback:      
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  IPFS/IPNS:        enabled
  RTSP:             enabled
  RTMP:             no      (--with-librtmp)
  PSL:              enabled
  Alt-svc:          enabled (--disable-alt-svc)
  Headers API:      enabled (--disable-headers-api)
  HSTS:             no      (--enable-hsts)
  HTTP1:            enabled (internal)
  HTTP2:            no      (--with-nghttp2)
  HTTP3:            no      (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic, --with-msh3)
  ECH:              no      (--enable-ech)
  HTTPS RR:         no      (--enable-httpsrr)
  SSLS-EXPORT:      no      (--enable-ssls-export)
  Protocols:        dict file ftp gopher http imap ipfs ipns mqtt pop3 rtsp smtp telnet tftp ws
  Features:         alt-svc AsynchDNS IPv6 Largefile libz PSL threadsafe UnixSockets

configure: WARNING: Cannot find libraries for LDAP support: LDAP disabled
configure: WARNING: libgsasl was not found
configure: WARNING: Cannot find libidn2

$ make -j3
Making all in lib
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
make  all-am
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
  CC       libcurl_la-altsvc.lo
  CC       libcurl_la-amigaos.lo
  CC       libcurl_la-asyn-ares.lo
  CC       libcurl_la-asyn-base.lo
  CC       libcurl_la-asyn-thrdd.lo
  CC       libcurl_la-bufq.lo
  CC       libcurl_la-bufref.lo
  CC       libcurl_la-cf-h1-proxy.lo
  CC       libcurl_la-cf-h2-proxy.lo
  CC       libcurl_la-cf-haproxy.lo
  CC       libcurl_la-cf-https-connect.lo
  CC       libcurl_la-cf-socket.lo
  CC       libcurl_la-cfilters.lo
  CC       libcurl_la-conncache.lo
  CC       libcurl_la-connect.lo
  CC       libcurl_la-content_encoding.lo
  CC       libcurl_la-cookie.lo
  CC       libcurl_la-cshutdn.lo
  CC       libcurl_la-curl_addrinfo.lo
  CC       libcurl_la-curl_des.lo
  CC       libcurl_la-curl_endian.lo
  CC       libcurl_la-curl_fnmatch.lo
  CC       libcurl_la-curl_get_line.lo
  CC       libcurl_la-curl_gethostname.lo
  CC       libcurl_la-curl_gssapi.lo
  CC       libcurl_la-curl_memrchr.lo
  CC       libcurl_la-curl_ntlm_core.lo
  CC       libcurl_la-curl_range.lo
  CC       libcurl_la-curl_rtmp.lo
  CC       libcurl_la-curl_sasl.lo
  CC       libcurl_la-curl_sha512_256.lo
  CC       libcurl_la-curl_sspi.lo
  CC       libcurl_la-curl_trc.lo
  CC       libcurl_la-curl_threads.lo
  CC       libcurl_la-cw-out.lo
  CC       libcurl_la-dict.lo
  CC       libcurl_la-cw-pause.lo
  CC       libcurl_la-doh.lo
  CC       libcurl_la-dynhds.lo
  CC       libcurl_la-easy.lo
  CC       libcurl_la-easygetopt.lo
  CC       libcurl_la-easyoptions.lo
  CC       libcurl_la-escape.lo
  CC       libcurl_la-fake_addrinfo.lo
  CC       libcurl_la-file.lo
  CC       libcurl_la-fileinfo.lo
  CC       libcurl_la-fopen.lo
  CC       libcurl_la-formdata.lo
  CC       libcurl_la-ftp.lo
  CC       libcurl_la-ftplistparser.lo
  CC       libcurl_la-getenv.lo
  CC       libcurl_la-getinfo.lo
  CC       libcurl_la-gopher.lo
  CC       libcurl_la-hash.lo
  CC       libcurl_la-headers.lo
  CC       libcurl_la-hmac.lo
  CC       libcurl_la-hostip.lo
  CC       libcurl_la-hostip4.lo
  CC       libcurl_la-hostip6.lo
  CC       libcurl_la-hsts.lo
  CC       libcurl_la-http.lo
  CC       libcurl_la-http1.lo
  CC       libcurl_la-http2.lo
  CC       libcurl_la-http_aws_sigv4.lo
  CC       libcurl_la-http_chunks.lo
  CC       libcurl_la-http_digest.lo
  CC       libcurl_la-http_negotiate.lo
  CC       libcurl_la-http_ntlm.lo
  CC       libcurl_la-http_proxy.lo
  CC       libcurl_la-httpsrr.lo
  CC       libcurl_la-idn.lo
  CC       libcurl_la-if2ip.lo
  CC       libcurl_la-imap.lo
  CC       libcurl_la-krb5.lo
  CC       libcurl_la-ldap.lo
  CC       libcurl_la-llist.lo
  CC       libcurl_la-macos.lo
  CC       libcurl_la-md4.lo
  CC       libcurl_la-md5.lo
  CC       libcurl_la-memdebug.lo
  CC       libcurl_la-mime.lo
  CC       libcurl_la-mprintf.lo
  CC       libcurl_la-mqtt.lo
  CC       libcurl_la-multi.lo
  CC       libcurl_la-multi_ev.lo
  CC       libcurl_la-netrc.lo
  CC       libcurl_la-noproxy.lo
  CC       libcurl_la-openldap.lo
  CC       libcurl_la-parsedate.lo
  CC       libcurl_la-pingpong.lo
  CC       libcurl_la-pop3.lo
  CC       libcurl_la-progress.lo
  CC       libcurl_la-psl.lo
  CC       libcurl_la-rand.lo
  CC       libcurl_la-rename.lo
  CC       libcurl_la-request.lo
  CC       libcurl_la-select.lo
  CC       libcurl_la-sendf.lo
  CC       libcurl_la-rtsp.lo
  CC       libcurl_la-setopt.lo
  CC       libcurl_la-sha256.lo
  CC       libcurl_la-share.lo
  CC       libcurl_la-slist.lo
  CC       libcurl_la-smb.lo
  CC       libcurl_la-smtp.lo
  CC       libcurl_la-socketpair.lo
  CC       libcurl_la-socks.lo
  CC       libcurl_la-socks_gssapi.lo
  CC       libcurl_la-socks_sspi.lo
  CC       libcurl_la-speedcheck.lo
  CC       libcurl_la-splay.lo
  CC       libcurl_la-strcase.lo
  CC       libcurl_la-strequal.lo
  CC       libcurl_la-strdup.lo
  CC       libcurl_la-strerror.lo
  CC       libcurl_la-system_win32.lo
  CC       libcurl_la-telnet.lo
  CC       libcurl_la-tftp.lo
  CC       libcurl_la-transfer.lo
  CC       libcurl_la-uint-bset.lo
  CC       libcurl_la-uint-hash.lo
  CC       libcurl_la-uint-spbset.lo
  CC       libcurl_la-uint-table.lo
  CC       libcurl_la-url.lo
  CC       libcurl_la-urlapi.lo
  CC       libcurl_la-version.lo
  CC       libcurl_la-ws.lo
  CC       libcurlu_la-altsvc.lo
  CC       libcurlu_la-amigaos.lo
  CC       libcurlu_la-asyn-ares.lo
  CC       libcurlu_la-asyn-base.lo
  CC       libcurlu_la-asyn-thrdd.lo
  CC       libcurlu_la-bufq.lo
  CC       libcurlu_la-bufref.lo
  CC       libcurlu_la-cf-h1-proxy.lo
  CC       libcurlu_la-cf-h2-proxy.lo
  CC       libcurlu_la-cf-haproxy.lo
  CC       libcurlu_la-cf-https-connect.lo
  CC       libcurlu_la-cf-socket.lo
  CC       libcurlu_la-cfilters.lo
  CC       libcurlu_la-conncache.lo
  CC       libcurlu_la-connect.lo
  CC       libcurlu_la-content_encoding.lo
  CC       libcurlu_la-cookie.lo
  CC       libcurlu_la-cshutdn.lo
  CC       libcurlu_la-curl_addrinfo.lo
  CC       libcurlu_la-curl_des.lo
  CC       libcurlu_la-curl_endian.lo
  CC       libcurlu_la-curl_fnmatch.lo
  CC       libcurlu_la-curl_get_line.lo
  CC       libcurlu_la-curl_gethostname.lo
  CC       libcurlu_la-curl_gssapi.lo
  CC       libcurlu_la-curl_memrchr.lo
  CC       libcurlu_la-curl_ntlm_core.lo
  CC       libcurlu_la-curl_range.lo
  CC       libcurlu_la-curl_rtmp.lo
  CC       libcurlu_la-curl_sasl.lo
  CC       libcurlu_la-curl_sha512_256.lo
  CC       libcurlu_la-curl_sspi.lo
  CC       libcurlu_la-curl_threads.lo
  CC       libcurlu_la-curl_trc.lo
  CC       libcurlu_la-cw-out.lo
  CC       libcurlu_la-cw-pause.lo
  CC       libcurlu_la-dict.lo
  CC       libcurlu_la-doh.lo
  CC       libcurlu_la-dynhds.lo
  CC       libcurlu_la-easy.lo
  CC       libcurlu_la-easygetopt.lo
  CC       libcurlu_la-easyoptions.lo
  CC       libcurlu_la-escape.lo
  CC       libcurlu_la-fake_addrinfo.lo
  CC       libcurlu_la-file.lo
  CC       libcurlu_la-fileinfo.lo
  CC       libcurlu_la-fopen.lo
  CC       libcurlu_la-formdata.lo
  CC       libcurlu_la-ftp.lo
  CC       libcurlu_la-ftplistparser.lo
  CC       libcurlu_la-getenv.lo
  CC       libcurlu_la-getinfo.lo
  CC       libcurlu_la-gopher.lo
  CC       libcurlu_la-hash.lo
  CC       libcurlu_la-headers.lo
  CC       libcurlu_la-hmac.lo
  CC       libcurlu_la-hostip.lo
  CC       libcurlu_la-hostip4.lo
  CC       libcurlu_la-hostip6.lo
  CC       libcurlu_la-hsts.lo
  CC       libcurlu_la-http.lo
  CC       libcurlu_la-http1.lo
  CC       libcurlu_la-http2.lo
  CC       libcurlu_la-http_chunks.lo
  CC       libcurlu_la-http_aws_sigv4.lo
  CC       libcurlu_la-http_digest.lo
  CC       libcurlu_la-http_negotiate.lo
  CC       libcurlu_la-http_ntlm.lo
  CC       libcurlu_la-http_proxy.lo
  CC       libcurlu_la-httpsrr.lo
  CC       libcurlu_la-idn.lo
  CC       libcurlu_la-if2ip.lo
  CC       libcurlu_la-imap.lo
  CC       libcurlu_la-krb5.lo
  CC       libcurlu_la-ldap.lo
  CC       libcurlu_la-llist.lo
  CC       libcurlu_la-macos.lo
  CC       libcurlu_la-md4.lo
  CC       libcurlu_la-memdebug.lo
  CC       libcurlu_la-md5.lo
  CC       libcurlu_la-mime.lo
  CC       libcurlu_la-mprintf.lo
  CC       libcurlu_la-multi.lo
  CC       libcurlu_la-mqtt.lo
  CC       libcurlu_la-multi_ev.lo
  CC       libcurlu_la-netrc.lo
  CC       libcurlu_la-noproxy.lo
  CC       libcurlu_la-openldap.lo
  CC       libcurlu_la-parsedate.lo
  CC       libcurlu_la-pingpong.lo
  CC       libcurlu_la-pop3.lo
  CC       libcurlu_la-progress.lo
  CC       libcurlu_la-psl.lo
  CC       libcurlu_la-rand.lo
  CC       libcurlu_la-rename.lo
  CC       libcurlu_la-request.lo
  CC       libcurlu_la-rtsp.lo
  CC       libcurlu_la-select.lo
  CC       libcurlu_la-sendf.lo
  CC       libcurlu_la-setopt.lo
  CC       libcurlu_la-sha256.lo
  CC       libcurlu_la-share.lo
  CC       libcurlu_la-slist.lo
  CC       libcurlu_la-smb.lo
  CC       libcurlu_la-smtp.lo
  CC       libcurlu_la-socketpair.lo
  CC       libcurlu_la-socks.lo
  CC       libcurlu_la-socks_gssapi.lo
  CC       libcurlu_la-socks_sspi.lo
  CC       libcurlu_la-speedcheck.lo
  CC       libcurlu_la-splay.lo
  CC       libcurlu_la-strcase.lo
  CC       libcurlu_la-strdup.lo
  CC       libcurlu_la-strequal.lo
  CC       libcurlu_la-strerror.lo
  CC       libcurlu_la-system_win32.lo
  CC       libcurlu_la-telnet.lo
  CC       libcurlu_la-tftp.lo
  CC       libcurlu_la-transfer.lo
  CC       libcurlu_la-uint-bset.lo
  CC       libcurlu_la-uint-hash.lo
  CC       libcurlu_la-uint-spbset.lo
  CC       libcurlu_la-uint-table.lo
  CC       libcurlu_la-url.lo
  CC       libcurlu_la-urlapi.lo
  CC       libcurlu_la-version.lo
  CC       libcurlu_la-ws.lo
  CC       vauth/libcurlu_la-cleartext.lo
  CC       vauth/libcurlu_la-cram.lo
  CC       vauth/libcurlu_la-digest.lo
  CC       vauth/libcurlu_la-digest_sspi.lo
  CC       vauth/libcurlu_la-gsasl.lo
  CC       vauth/libcurlu_la-krb5_gssapi.lo
  CC       vauth/libcurlu_la-krb5_sspi.lo
  CC       vauth/libcurlu_la-ntlm.lo
  CC       vauth/libcurlu_la-ntlm_sspi.lo
  CC       vauth/libcurlu_la-oauth2.lo
  CC       vauth/libcurlu_la-spnego_gssapi.lo
  CC       vauth/libcurlu_la-spnego_sspi.lo
  CC       vauth/libcurlu_la-vauth.lo
  CC       vtls/libcurlu_la-bearssl.lo
  CC       vtls/libcurlu_la-cipher_suite.lo
  CC       vtls/libcurlu_la-gtls.lo
  CC       vtls/libcurlu_la-hostcheck.lo
  CC       vtls/libcurlu_la-keylog.lo
  CC       vtls/libcurlu_la-mbedtls.lo
  CC       vtls/libcurlu_la-mbedtls_threadlock.lo
  CC       vtls/libcurlu_la-openssl.lo
  CC       vtls/libcurlu_la-rustls.lo
  CC       vtls/libcurlu_la-schannel.lo
  CC       vtls/libcurlu_la-schannel_verify.lo
  CC       vtls/libcurlu_la-sectransp.lo
  CC       vtls/libcurlu_la-vtls.lo
  CC       vtls/libcurlu_la-vtls_scache.lo
  CC       vtls/libcurlu_la-vtls_spack.lo
  CC       vtls/libcurlu_la-wolfssl.lo
  CC       vtls/libcurlu_la-x509asn1.lo
  CC       vquic/libcurlu_la-curl_msh3.lo
  CC       vquic/libcurlu_la-curl_ngtcp2.lo
  CC       vquic/libcurlu_la-curl_osslq.lo
  CC       vquic/libcurlu_la-curl_quiche.lo
  CC       vquic/libcurlu_la-vquic.lo
  CC       vquic/libcurlu_la-vquic-tls.lo
  CC       vssh/libcurlu_la-libssh.lo
  CC       vssh/libcurlu_la-libssh2.lo
  CC       vssh/libcurlu_la-curl_path.lo
  CC       vssh/libcurlu_la-wolfssh.lo
  CC       curlx/libcurlu_la-base64.lo
  CC       curlx/libcurlu_la-dynbuf.lo
  CC       curlx/libcurlu_la-inet_ntop.lo
  CC       curlx/libcurlu_la-inet_pton.lo
  CC       curlx/libcurlu_la-multibyte.lo
  CC       curlx/libcurlu_la-nonblock.lo
  CC       curlx/libcurlu_la-strparse.lo
  CC       curlx/libcurlu_la-timediff.lo
  CC       curlx/libcurlu_la-timeval.lo
  CC       curlx/libcurlu_la-version_win32.lo
  CC       curlx/libcurlu_la-warnless.lo
  CC       curlx/libcurlu_la-winapi.lo
  CC       vauth/libcurl_la-cleartext.lo
  CC       vauth/libcurl_la-cram.lo
  CC       vauth/libcurl_la-digest.lo
  CC       vauth/libcurl_la-digest_sspi.lo
  CC       vauth/libcurl_la-gsasl.lo
  CC       vauth/libcurl_la-krb5_gssapi.lo
  CC       vauth/libcurl_la-krb5_sspi.lo
  CC       vauth/libcurl_la-ntlm.lo
  CC       vauth/libcurl_la-ntlm_sspi.lo
  CC       vauth/libcurl_la-oauth2.lo
  CC       vauth/libcurl_la-spnego_gssapi.lo
  CC       vauth/libcurl_la-spnego_sspi.lo
  CC       vauth/libcurl_la-vauth.lo
  CC       vtls/libcurl_la-bearssl.lo
  CC       vtls/libcurl_la-cipher_suite.lo
  CC       vtls/libcurl_la-gtls.lo
  CC       vtls/libcurl_la-hostcheck.lo
  CC       vtls/libcurl_la-keylog.lo
  CC       vtls/libcurl_la-mbedtls.lo
  CC       vtls/libcurl_la-mbedtls_threadlock.lo
  CC       vtls/libcurl_la-openssl.lo
  CC       vtls/libcurl_la-rustls.lo
  CC       vtls/libcurl_la-schannel.lo
  CC       vtls/libcurl_la-schannel_verify.lo
  CC       vtls/libcurl_la-sectransp.lo
  CC       vtls/libcurl_la-vtls.lo
  CC       vtls/libcurl_la-vtls_scache.lo
  CC       vtls/libcurl_la-vtls_spack.lo
  CC       vtls/libcurl_la-wolfssl.lo
  CC       vtls/libcurl_la-x509asn1.lo
  CC       vquic/libcurl_la-curl_msh3.lo
  CC       vquic/libcurl_la-curl_ngtcp2.lo
  CC       vquic/libcurl_la-curl_osslq.lo
  CC       vquic/libcurl_la-curl_quiche.lo
  CC       vquic/libcurl_la-vquic.lo
  CC       vquic/libcurl_la-vquic-tls.lo
  CC       vssh/libcurl_la-libssh.lo
  CC       vssh/libcurl_la-libssh2.lo
  CC       vssh/libcurl_la-curl_path.lo
  CC       vssh/libcurl_la-wolfssh.lo
  CC       curlx/libcurl_la-base64.lo
  CC       curlx/libcurl_la-dynbuf.lo
  CC       curlx/libcurl_la-inet_ntop.lo
  CC       curlx/libcurl_la-inet_pton.lo
  CC       curlx/libcurl_la-multibyte.lo
  CC       curlx/libcurl_la-nonblock.lo
  CC       curlx/libcurl_la-strparse.lo
  CC       curlx/libcurl_la-timediff.lo
  CC       curlx/libcurl_la-timeval.lo
  CC       curlx/libcurl_la-version_win32.lo
  CC       curlx/libcurl_la-warnless.lo
  CC       curlx/libcurl_la-winapi.lo
  CCLD     libcurlu.la
  CCLD     libcurl.la
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
Making all in docs
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in .
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in cmdline-opts
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/cmdline-opts'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/cmdline-opts'
Making all in libcurl
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
Making all in opts
make[3]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl/opts'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl/opts'
make[3]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in src
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/src'
  CC       curl-config2setopts.o
  CC       curl-slist_wc.o
  CC       curl-terminal.o
  CC       curl-tool_cb_dbg.o
  CC       curl-tool_bname.o
  CC       curl-tool_cb_hdr.o
  CC       curl-tool_cb_prg.o
  CC       curl-tool_cb_rea.o
  CC       curl-tool_cb_see.o
  CC       curl-tool_cb_soc.o
  CC       curl-tool_cb_wrt.o
  CC       curl-tool_cfgable.o
  CC       curl-tool_dirhie.o
  CC       curl-tool_doswin.o
  CC       curl-tool_easysrc.o
  CC       curl-tool_filetime.o
  CC       curl-tool_findfile.o
  CC       curl-tool_formparse.o
  CC       curl-tool_getparam.o
  CC       curl-tool_getpass.o
  CC       curl-tool_help.o
  CC       curl-tool_helpers.o
  CC       curl-tool_ipfs.o
  CC       curl-tool_libinfo.o
  CC       curl-tool_listhelp.o
  CC       curl-tool_main.o
  CC       curl-tool_msgs.o
  CC       curl-tool_operate.o
  CC       curl-tool_operhlp.o
  CC       curl-tool_paramhlp.o
  CC       curl-tool_parsecfg.o
  CC       curl-tool_progress.o
  CC       curl-tool_setopt.o
  CC       curl-tool_sleep.o
  CC       curl-tool_ssls.o
  CC       curl-tool_stderr.o
  CC       curl-tool_strdup.o
  CC       curl-tool_urlglob.o
  CC       curl-tool_util.o
  CC       curl-tool_vms.o
  CC       curl-tool_writeout.o
  CC       curl-tool_writeout_json.o
  CC       curl-tool_xattr.o
  CC       curl-var.o
  CC       ../lib/curlx/curl-base64.o
  CC       ../lib/curlx/curl-multibyte.o
  CC       ../lib/curlx/curl-dynbuf.o
  CC       ../lib/curlx/curl-nonblock.o
  CC       ../lib/curlx/curl-strparse.o
  CC       ../lib/curlx/curl-timediff.o
  CC       ../lib/curlx/curl-timeval.o
  CC       ../lib/curlx/curl-version_win32.o
  CC       ../lib/curlx/curl-warnless.o
echo '/* !checksrc! disable COPYRIGHT all */' > tool_hugehelp.c;   \
echo '#include "tool_hugehelp.h"' >> tool_hugehelp.c
echo '/* !checksrc! disable COPYRIGHT all */' > tool_ca_embed.c
echo 'extern const void *curl_ca_embed; const void *curl_ca_embed;' >> tool_ca_embed.c
  CC       curlinfo.o
  CC       libcurltool_la-config2setopts.lo
  CC       libcurltool_la-slist_wc.lo
  CC       libcurltool_la-terminal.lo
  CC       libcurltool_la-tool_cb_dbg.lo
  CC       libcurltool_la-tool_bname.lo
  CC       libcurltool_la-tool_cb_hdr.lo
  CC       libcurltool_la-tool_cb_prg.lo
  CC       libcurltool_la-tool_cb_rea.lo
  CC       libcurltool_la-tool_cb_see.lo
  CC       libcurltool_la-tool_cb_soc.lo
  CC       libcurltool_la-tool_cb_wrt.lo
  CC       libcurltool_la-tool_cfgable.lo
  CC       libcurltool_la-tool_dirhie.lo
  CC       libcurltool_la-tool_doswin.lo
  CC       libcurltool_la-tool_easysrc.lo
  CC       libcurltool_la-tool_filetime.lo
  CC       libcurltool_la-tool_findfile.lo
  CC       libcurltool_la-tool_formparse.lo
  CC       libcurltool_la-tool_getparam.lo
  CC       libcurltool_la-tool_getpass.lo
  CC       libcurltool_la-tool_help.lo
  CC       libcurltool_la-tool_helpers.lo
  CC       libcurltool_la-tool_ipfs.lo
  CC       libcurltool_la-tool_libinfo.lo
  CC       libcurltool_la-tool_listhelp.lo
  CC       libcurltool_la-tool_main.lo
  CC       libcurltool_la-tool_msgs.lo
  CC       libcurltool_la-tool_operate.lo
  CC       libcurltool_la-tool_operhlp.lo
  CC       libcurltool_la-tool_paramhlp.lo
  CC       libcurltool_la-tool_parsecfg.lo
  CC       libcurltool_la-tool_progress.lo
  CC       libcurltool_la-tool_setopt.lo
  CC       libcurltool_la-tool_ssls.lo
  CC       libcurltool_la-tool_sleep.lo
  CC       libcurltool_la-tool_stderr.lo
  CC       libcurltool_la-tool_strdup.lo
  CC       libcurltool_la-tool_urlglob.lo
  CC       libcurltool_la-tool_util.lo
  CC       libcurltool_la-tool_vms.lo
  CC       libcurltool_la-tool_writeout.lo
  CC       libcurltool_la-tool_writeout_json.lo
  CC       libcurltool_la-tool_xattr.lo
  CC       libcurltool_la-var.lo
  CC       ../lib/curlx/libcurltool_la-base64.lo
  CC       ../lib/curlx/libcurltool_la-multibyte.lo
  CC       ../lib/curlx/libcurltool_la-dynbuf.lo
  CC       ../lib/curlx/libcurltool_la-nonblock.lo
  CC       ../lib/curlx/libcurltool_la-strparse.lo
  CC       ../lib/curlx/libcurltool_la-timediff.lo
  CC       ../lib/curlx/libcurltool_la-timeval.lo
  CC       ../lib/curlx/libcurltool_la-version_win32.lo
  CC       ../lib/curlx/libcurltool_la-warnless.lo
  CC       curl-tool_hugehelp.o
  CC       curl-tool_ca_embed.o
  CCLD     curlinfo
  CCLD     curl
  CCLD     libcurltool.la
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/src'
Making all in scripts
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/scripts'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/scripts'
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0'

Commit Diff GitHub →

tests/Makefile.am +0 -1tests/data/test1596 +1 -1tests/libtest/Makefile.inc +20 -21tests/libtest/lib1485.c +9 -9tests/libtest/lib1500.c +0 -2tests/libtest/lib1501.c +1 -0tests/libtest/lib1502.c +0 -2tests/libtest/lib1506.c +0 -4tests/libtest/lib1507.c +2 -2tests/libtest/lib1510.c +1 -3tests/libtest/lib1512.c +1 -0tests/libtest/lib1514.c +11 -7tests/libtest/lib1515.c +0 -2tests/libtest/lib1517.c +9 -8tests/libtest/lib1518.c +6 -3tests/libtest/lib1520.c +16 -16tests/libtest/lib1522.c +2 -2tests/libtest/lib1523.c +2 -2tests/libtest/lib1525.c +8 -9tests/libtest/lib1526.c +8 -8tests/libtest/lib1527.c +8 -9tests/libtest/lib1531.c +3 -5tests/libtest/lib1533.c +6 -12tests/libtest/lib1540.c +9 -9tests/libtest/lib1541.c +12 -12tests/libtest/lib1552.c +0 -2tests/libtest/lib1553.c +4 -6tests/libtest/lib1554.c +5 -5tests/libtest/lib1555.c +12 -12tests/libtest/lib1560.c +1 -1tests/libtest/lib1564.c +0 -1tests/libtest/lib1565.c +9 -10tests/libtest/lib1576.c +11 -11tests/libtest/lib1591.c +8 -7tests/libtest/lib1592.c +3 -3tests/libtest/lib1598.c +4 -4tests/libtest/lib1662.c +7 -8tests/libtest/lib1901.c +9 -13tests/libtest/lib1911.c +2 -2tests/libtest/lib1915.c +19 -19tests/libtest/lib1940.c +41 -35tests/libtest/lib1945.c +4 -4tests/libtest/lib1947.c +2 -2tests/libtest/lib1971.c +4 -5tests/libtest/lib1975.c +4 -5tests/libtest/lib2301.c +10 -10tests/libtest/lib2302.c +2 -2tests/libtest/lib2304.c +8 -8tests/libtest/lib2402.c +0 -4tests/libtest/lib2404.c +0 -4tests/libtest/lib2502.c +0 -4tests/libtest/lib3026.c +6 -6tests/libtest/lib3105.c +0 -2tests/libtest/lib3207.c +5 -5tests/libtest/lib3208.c +0 -2tests/libtest/lib500.c +2 -4tests/libtest/lib502.c +0 -2tests/libtest/lib503.c +0 -2tests/libtest/lib504.c +0 -2tests/libtest/lib506.c +20 -29tests/libtest/lib507.c +0 -2tests/libtest/lib508.c +9 -8tests/libtest/lib510.c +16 -13tests/libtest/lib513.c +2 -2tests/libtest/lib517.c +126 -126tests/libtest/lib518.c +119 -141tests/libtest/lib525.c +0 -2tests/libtest/lib526.c +0 -4tests/libtest/lib530.c +35 -33tests/libtest/lib533.c +0 -2tests/libtest/lib537.c +113 -135tests/libtest/lib540.c +1 -2tests/libtest/lib544.c +10 -6tests/libtest/lib547.c +5 -12tests/libtest/lib552.c +13 -21tests/libtest/lib553.c +2 -2tests/libtest/lib554.c +13 -22tests/libtest/lib555.c +6 -13tests/libtest/lib560.c +0 -2tests/libtest/lib564.c +0 -2tests/libtest/lib568.c +5 -10tests/libtest/lib569.c +4 -8tests/libtest/lib570.c +5 -9tests/libtest/lib571.c +7 -11tests/libtest/lib572.c +6 -11tests/libtest/lib573.c +0 -2tests/libtest/lib574.c +0 -2tests/libtest/lib575.c +0 -2tests/libtest/lib576.c +2 -4tests/libtest/lib578.c +7 -7tests/libtest/lib579.c +17 -18tests/libtest/lib582.c +33 -32tests/libtest/lib586.c +14 -14tests/libtest/lib587.c +189 -0tests/libtest/lib591.c +0 -2tests/libtest/lib597.c +0 -2tests/libtest/lib599.c +3 -3tests/libtest/lib643.c +16 -25tests/libtest/lib645.c +258 -0tests/libtest/lib650.c +4 -7tests/libtest/lib651.c +2 -2tests/libtest/lib652.c +2 -2tests/libtest/lib654.c +10 -11tests/libtest/lib655.c +6 -5tests/libtest/lib666.c +2 -2tests/libtest/lib667.c +9 -9tests/libtest/lib668.c +10 -9tests/libtest/lib670.c +19 -14tests/libtest/lib677.c +3 -3tests/libtest/libntlmconnect.c +0 -1tests/libtest/mk-lib1521.pl +5 -5tests/libtest/test.h +7 -0tests/libtest/testtrace.c +3 -3tests/libtest/testutil.c +29 -0tests/libtest/testutil.h +13 -0tests/mk-bundle-hints.sh +0 -74tests/mk-bundle.pl +1 -82tests/server/first.c +1 -1tests/server/mk-bundle.pl +1 -4tests/unit/unit1302.c +4 -4tests/unit/unit1303.c +11 -11tests/unit/unit1305.c +4 -4tests/unit/unit1307.c +197 -196tests/unit/unit1397.c +59 -58tests/unit/unit1398.c +8 -2tests/unit/unit1399.c +1 -2tests/unit/unit1600.c +4 -4tests/unit/unit1602.c +8 -8tests/unit/unit1603.c +37 -37tests/unit/unit1605.c +6 -6tests/unit/unit1606.c +9 -9tests/unit/unit1607.c +53 -55tests/unit/unit1609.c +22 -23tests/unit/unit1616.c +11 -11tests/unit/unit1620.c +16 -15tests/unit/unit1652.c +69 -69tests/unit/unit1653.c +2 -4tests/unit/unit1654.c +2 -4tests/unit/unit1660.c +2 -4tests/unit/unit1663.c +13 -13tests/unit/unit2600.c +12 -12tests/unit/unit3200.c +1 -2
tests/Makefile.am+0 -1
@@ -62,7 +62,6 @@ EXTRA_DIST = \
http2-server.pl \
http3-server.pl \
memanalyze.pl \
- mk-bundle-hints.sh \
mk-bundle.pl \
negtelnetserver.py \
nghttpx.conf \
tests/data/test1596+1 -1
@@ -28,7 +28,7 @@ http
HTTP Retry-After header parsing using a date
</name>
<tool>
-lib%TESTNUMBER
+lib1594
</tool>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
tests/libtest/Makefile.inc+20 -21
@@ -63,8 +63,8 @@ LIBTESTPROGS = libauthretry libntlmconnect libprereq \
lib1540 lib1541 lib1542 lib1543 lib1545 \
lib1550 lib1551 lib1552 lib1553 lib1554 lib1555 lib1556 lib1557 \
lib1558 lib1559 lib1560 lib1564 lib1565 lib1567 lib1568 lib1569 lib1571 \
- lib1576 lib1578 \
- lib1591 lib1592 lib1593 lib1594 lib1596 lib1597 lib1598 \
+ lib1576 \
+ lib1591 lib1592 lib1593 lib1594 lib1597 lib1598 \
\
lib1662 \
\
@@ -107,7 +107,8 @@ lib504_LDADD = $(TESTUTIL_LIBS)
lib505_SOURCES = lib505.c $(SUPPORTFILES) $(MULTIBYTE)
-lib506_SOURCES = lib506.c $(SUPPORTFILES)
+lib506_SOURCES = lib506.c $(SUPPORTFILES) $(TESTUTIL)
+lib506_LDADD = $(TESTUTIL_LIBS)
lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib507_LDADD = $(TESTUTIL_LIBS)
@@ -132,7 +133,8 @@ lib516_SOURCES = lib516.c $(SUPPORTFILES)
lib517_SOURCES = lib517.c $(SUPPORTFILES)
-lib518_SOURCES = lib518.c $(SUPPORTFILES) $(WARNLESS) $(MULTIBYTE)
+lib518_SOURCES = lib518.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE)
+lib518_LDADD = $(TESTUTIL_LIBS)
lib519_SOURCES = lib519.c $(SUPPORTFILES)
@@ -171,7 +173,8 @@ lib533_LDADD = $(TESTUTIL_LIBS)
lib536_SOURCES = lib536.c $(SUPPORTFILES)
-lib537_SOURCES = lib537.c $(SUPPORTFILES) $(WARNLESS) $(MULTIBYTE)
+lib537_SOURCES = lib537.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE)
+lib537_LDADD = $(TESTUTIL_LIBS)
lib539_SOURCES = lib539.c $(SUPPORTFILES)
@@ -228,15 +231,20 @@ lib566_SOURCES = lib566.c $(SUPPORTFILES) $(MULTIBYTE)
lib567_SOURCES = lib567.c $(SUPPORTFILES)
-lib568_SOURCES = lib568.c $(SUPPORTFILES) $(MULTIBYTE)
+lib568_SOURCES = lib568.c $(SUPPORTFILES) $(TESTUTIL) $(MULTIBYTE)
+lib568_LDADD = $(TESTUTIL_LIBS)
-lib569_SOURCES = lib569.c $(SUPPORTFILES) $(MULTIBYTE)
+lib569_SOURCES = lib569.c $(SUPPORTFILES) $(TESTUTIL) $(MULTIBYTE)
+lib569_LDADD = $(TESTUTIL_LIBS)
-lib570_SOURCES = lib570.c $(SUPPORTFILES)
+lib570_SOURCES = lib570.c $(SUPPORTFILES) $(TESTUTIL)
+lib570_LDADD = $(TESTUTIL_LIBS)
-lib571_SOURCES = lib571.c $(SUPPORTFILES) $(WARNLESS) $(MULTIBYTE)
+lib571_SOURCES = lib571.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE)
+lib571_LDADD = $(TESTUTIL_LIBS)
-lib572_SOURCES = lib572.c $(SUPPORTFILES) $(MULTIBYTE)
+lib572_SOURCES = lib572.c $(SUPPORTFILES) $(TESTUTIL) $(MULTIBYTE)
+lib572_LDADD = $(TESTUTIL_LIBS)
lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(TSTTRACE)
lib573_LDADD = $(TESTUTIL_LIBS)
@@ -266,8 +274,7 @@ lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
lib586_SOURCES = lib586.c $(SUPPORTFILES)
-lib587_SOURCES = lib554.c $(SUPPORTFILES)
-lib587_CPPFLAGS = $(AM_CPPFLAGS) -DLIB587
+lib587_SOURCES = lib587.c $(SUPPORTFILES)
lib589_SOURCES = lib589.c $(SUPPORTFILES)
@@ -285,8 +292,7 @@ lib599_SOURCES = lib599.c $(SUPPORTFILES) $(MULTIBYTE)
lib643_SOURCES = lib643.c $(SUPPORTFILES)
-lib645_SOURCES = lib643.c $(SUPPORTFILES)
-lib645_CPPFLAGS = $(AM_CPPFLAGS) -DLIB645
+lib645_SOURCES = lib645.c $(SUPPORTFILES)
lib650_SOURCES = lib650.c $(SUPPORTFILES)
@@ -538,9 +544,6 @@ lib1571_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1571
lib1576_SOURCES = lib1576.c $(SUPPORTFILES)
-lib1578_SOURCES = lib1576.c $(SUPPORTFILES)
-lib1578_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1578
-
lib1591_SOURCES = lib1591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1591_LDADD = $(TESTUTIL_LIBS)
@@ -553,10 +556,6 @@ lib1593_LDADD = $(TESTUTIL_LIBS)
lib1594_SOURCES = lib1594.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1594_LDADD = $(TESTUTIL_LIBS)
-lib1596_SOURCES = lib1594.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
-lib1596_LDADD = $(TESTUTIL_LIBS)
-lib1596_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1596
-
lib1597_SOURCES = lib1597.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1597_LDADD = $(TESTUTIL_LIBS)
tests/libtest/lib1485.c+9 -9
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-struct transfer_status {
+struct t1485_transfer_status {
CURL *easy;
curl_off_t out_len;
size_t hd_line;
@@ -35,10 +35,10 @@ struct transfer_status {
int http_status;
};
-static size_t header_callback(char *ptr, size_t size, size_t nmemb,
- void *userp)
+static size_t t1485_header_callback(char *ptr, size_t size, size_t nmemb,
+ void *userp)
{
- struct transfer_status *st = (struct transfer_status *)userp;
+ struct t1485_transfer_status *st = (struct t1485_transfer_status *)userp;
const char *hd = ptr;
size_t len = size * nmemb;
CURLcode result;
@@ -78,9 +78,9 @@ static size_t header_callback(char *ptr, size_t size, size_t nmemb,
return len;
}
-static size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1485_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct transfer_status *st = (struct transfer_status *)userp;
+ struct t1485_transfer_status *st = (struct t1485_transfer_status *)userp;
size_t len = size * nmemb;
fwrite(ptr, size, nmemb, stdout);
st->out_len += (curl_off_t)len;
@@ -91,7 +91,7 @@ CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLcode res = CURLE_OK;
- struct transfer_status st;
+ struct t1485_transfer_status st;
start_test_timing();
@@ -103,9 +103,9 @@ CURLcode test(char *URL)
st.easy = curls; /* to allow callbacks access */
easy_setopt(curls, CURLOPT_URL, URL);
- easy_setopt(curls, CURLOPT_WRITEFUNCTION, write_callback);
+ easy_setopt(curls, CURLOPT_WRITEFUNCTION, t1485_write_cb);
easy_setopt(curls, CURLOPT_WRITEDATA, &st);
- easy_setopt(curls, CURLOPT_HEADERFUNCTION, header_callback);
+ easy_setopt(curls, CURLOPT_HEADERFUNCTION, t1485_header_callback);
easy_setopt(curls, CURLOPT_HEADERDATA, &st);
easy_setopt(curls, CURLOPT_NOPROGRESS, 1L);
tests/libtest/lib1500.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURL *curls = NULL;
tests/libtest/lib1501.c+1 -0
@@ -29,6 +29,7 @@
#include "warnless.h"
#include "memdebug.h"
+#undef TEST_HANG_TIMEOUT
#define TEST_HANG_TIMEOUT 30 * 1000
/* 500 milliseconds allowed. An extreme number but lets be really conservative
tests/libtest/lib1502.c+0 -2
@@ -37,8 +37,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURL *easy = NULL;
tests/libtest/lib1506.c+0 -4
@@ -27,10 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-#define NUM_HANDLES 4
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib1507.c+2 -2
@@ -38,7 +38,7 @@
#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1507_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
(void)ptr;
(void)size;
@@ -73,7 +73,7 @@ CURLcode test(char *URL)
curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD);
#endif
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
- curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, t1507_read_cb);
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM);
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
tests/libtest/lib1510.c+1 -3
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
#define NUM_URLS 4
CURLcode test(char *URL)
@@ -73,7 +71,7 @@ CURLcode test(char *URL)
easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L);
- /* get NUM_HANDLES easy handles */
+ /* get NUM_URLS easy handles */
for(i = 0; i < NUM_URLS; i++) {
/* specify target */
curl_msnprintf(target_url, sizeof(target_url),
tests/libtest/lib1512.c+1 -0
@@ -32,6 +32,7 @@
#include "memdebug.h"
+#undef NUM_HANDLES
#define NUM_HANDLES 2
CURLcode test(char *URL)
tests/libtest/lib1514.c+11 -7
@@ -30,16 +30,16 @@
#include "memdebug.h"
-static char testdata[]="dummy";
-
-struct WriteThis {
+#ifndef LIB1514_C
+#define LIB1514_C
+struct t1514_WriteThis {
char *readptr;
size_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1514_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t1514_WriteThis *pooh = (struct t1514_WriteThis *)userp;
if(size*nmemb < 1)
return 0;
@@ -53,13 +53,17 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
+#endif
CURLcode test(char *URL)
{
CURL *curl;
CURLcode result = CURLE_OK;
CURLcode res = CURLE_OK;
- struct WriteThis pooh = { testdata, sizeof(testdata)-1 };
+
+ static char testdata[] = "dummy";
+
+ struct t1514_WriteThis pooh = { testdata, sizeof(testdata)-1 };
global_init(CURL_GLOBAL_ALL);
@@ -68,7 +72,7 @@ CURLcode test(char *URL)
easy_setopt(curl, CURLOPT_URL, URL);
easy_setopt(curl, CURLOPT_POST, 1L);
/* Purposely omit to set CURLOPT_POSTFIELDSIZE */
- easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ easy_setopt(curl, CURLOPT_READFUNCTION, t1514_read_cb);
easy_setopt(curl, CURLOPT_READDATA, &pooh);
#ifdef LIB1539
/* speak HTTP 1.0 - no chunked! */
tests/libtest/lib1515.c+0 -2
@@ -34,8 +34,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
#define DNS_TIMEOUT 1L
static CURLcode do_one_request(CURLM *m, char *URL, char *resolve)
tests/libtest/lib1517.c+9 -8
@@ -25,16 +25,14 @@
#include "memdebug.h"
-static char testdata[]="this is what we post to the silly web server\n";
-
-struct WriteThis {
- char *readptr;
+struct t1517_WriteThis {
+ const char *readptr;
size_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t1517_WriteThis *pooh = (struct t1517_WriteThis *)userp;
size_t tocopy = size * nmemb;
/* Wait one second before return POST data *
@@ -55,10 +53,13 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
CURLcode test(char *URL)
{
+ static const char testdata[] =
+ "this is what we post to the silly web server\n";
+
CURL *curl;
CURLcode res = CURLE_OK;
- struct WriteThis pooh;
+ struct t1517_WriteThis pooh;
if(!strcmp(URL, "check")) {
#if (defined(_WIN32) || defined(__CYGWIN__))
@@ -96,7 +97,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
/* we want to use our own read function */
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1517_read_cb);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_READDATA, &pooh);
tests/libtest/lib1518.c+6 -3
@@ -27,8 +27,10 @@
/* Test inspired by github issue 3340 */
-static size_t writecb(char *buffer, size_t size, size_t nitems,
- void *outstream)
+#ifndef LIB1518_C
+#define LIB1518_C
+static size_t t1518_write_cb(char *buffer, size_t size, size_t nitems,
+ void *outstream)
{
(void)buffer;
(void)size;
@@ -36,6 +38,7 @@ static size_t writecb(char *buffer, size_t size, size_t nitems,
(void)outstream;
return 0;
}
+#endif
CURLcode test(char *URL)
{
@@ -83,7 +86,7 @@ CURLcode test(char *URL)
curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &curlRedirectCount);
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effectiveUrl);
curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &redirectUrl);
- test_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
+ test_setopt(curl, CURLOPT_WRITEFUNCTION, t1518_write_cb);
curl_mprintf("res %d\n"
"status %ld\n"
tests/libtest/lib1520.c+16 -16
@@ -31,26 +31,26 @@
#define TO "<[email protected]>"
#define FROM "<[email protected]>"
-static const char *payload_text[] = {
- "From: different\r\n",
- "To: another\r\n",
- "\r\n",
- "\r\n",
- ".\r\n",
- ".\r\n",
- "\r\n",
- ".\r\n",
- "\r\n",
- "body",
- NULL
-};
-
struct upload_status {
int lines_read;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1520_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
+ static const char *payload_text[] = {
+ "From: different\r\n",
+ "To: another\r\n",
+ "\r\n",
+ "\r\n",
+ ".\r\n",
+ ".\r\n",
+ "\r\n",
+ ".\r\n",
+ "\r\n",
+ "body",
+ NULL
+ };
+
struct upload_status *upload_ctx = (struct upload_status *)userp;
const char *data;
@@ -97,7 +97,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
test_setopt(curl, CURLOPT_UPLOAD, 1L);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1520_read_cb);
test_setopt(curl, CURLOPT_READDATA, &upload_ctx);
test_setopt(curl, CURLOPT_MAIL_FROM, FROM);
test_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
tests/libtest/lib1522.c+2 -2
@@ -30,8 +30,6 @@
#include "warnless.h"
#include "memdebug.h"
-static char g_Data[40 * 1024]; /* POST 40KB */
-
static int sockopt_callback(void *clientp, curl_socket_t curlfd,
curlsocktype purpose)
{
@@ -51,6 +49,8 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd,
CURLcode test(char *URL)
{
+ static char g_Data[40 * 1024]; /* POST 40KB */
+
CURLcode code = TEST_ERR_MAJOR_BAD;
CURLcode res;
struct curl_slist *pHeaderList = NULL;
tests/libtest/lib1523.c+2 -2
@@ -40,7 +40,7 @@ static int dload_progress_cb(void *a, curl_off_t b, curl_off_t c,
return 0;
}
-static size_t write_cb(char *d, size_t n, size_t l, void *p)
+static size_t t1523_write_cb(char *d, size_t n, size_t l, void *p)
{
/* take care of the data here, ignored in this example */
(void)d;
@@ -63,7 +63,7 @@ CURLcode test(char *URL)
curl_global_init(CURL_GLOBAL_ALL);
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_URL, URL);
- curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, t1523_write_cb);
curl_easy_setopt(hnd, CURLOPT_ERRORBUFFER, buffer);
curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 0L);
curl_easy_setopt(hnd, CURLOPT_XFERINFOFUNCTION, dload_progress_cb);
tests/libtest/lib1525.c+8 -9
@@ -32,20 +32,19 @@
#include "memdebug.h"
-static char testdata[] = "Hello Cloud!\n";
+static const char t1525_testdata[] = "Hello Cloud!\n";
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+static size_t t1525_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- if(amount < strlen(testdata)) {
- return strlen(testdata);
+ if(amount < strlen(t1525_testdata)) {
+ return strlen(t1525_testdata);
}
(void)stream;
- memcpy(ptr, testdata, strlen(testdata));
- return strlen(testdata);
+ memcpy(ptr, t1525_testdata, strlen(t1525_testdata));
+ return strlen(t1525_testdata);
}
-
CURLcode test(char *URL)
{
CURL *curl = NULL;
@@ -82,9 +81,9 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1525_read_cb);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
- test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(testdata));
+ test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(t1525_testdata));
res = curl_easy_perform(curl);
tests/libtest/lib1526.c+8 -8
@@ -31,17 +31,17 @@
#include "memdebug.h"
-static char testdata[] = "Hello Cloud!\n";
+static const char t1526_testdata[] = "Hello Cloud!\n";
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+static size_t t1526_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- if(amount < strlen(testdata)) {
- return strlen(testdata);
+ if(amount < strlen(t1526_testdata)) {
+ return strlen(t1526_testdata);
}
(void)stream;
- memcpy(ptr, testdata, strlen(testdata));
- return strlen(testdata);
+ memcpy(ptr, t1526_testdata, strlen(t1526_testdata));
+ return strlen(t1526_testdata);
}
CURLcode test(char *URL)
@@ -85,9 +85,9 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1526_read_cb);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
- test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(testdata));
+ test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(t1526_testdata));
res = curl_easy_perform(curl);
tests/libtest/lib1527.c+8 -9
@@ -31,20 +31,19 @@
#include "memdebug.h"
-static char testdata[] = "Hello Cloud!\n";
+static const char t1527_testdata[] = "Hello Cloud!\n";
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+static size_t t1527_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- if(amount < strlen(testdata)) {
- return strlen(testdata);
+ if(amount < strlen(t1527_testdata)) {
+ return strlen(t1527_testdata);
}
(void)stream;
- memcpy(ptr, testdata, strlen(testdata));
- return strlen(testdata);
+ memcpy(ptr, t1527_testdata, strlen(t1527_testdata));
+ return strlen(t1527_testdata);
}
-
CURLcode test(char *URL)
{
CURL *curl = NULL;
@@ -83,9 +82,9 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1527_read_cb);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
- test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(testdata));
+ test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(t1527_testdata));
test_setopt(curl, CURLOPT_HEADEROPT, (long)CURLHEADER_UNIFIED);
res = curl_easy_perform(curl);
tests/libtest/lib1531.c+3 -5
@@ -28,13 +28,11 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-static char const testData[] = ".abc\0xyz";
-static curl_off_t const testDataSize = sizeof(testData) - 1;
-
CURLcode test(char *URL)
{
+ static char const testData[] = ".abc\0xyz";
+ static curl_off_t const testDataSize = sizeof(testData) - 1;
+
CURL *easy;
CURLM *multi_handle;
int still_running; /* keep number of running handles */
tests/libtest/lib1533.c+6 -12
@@ -40,7 +40,6 @@ struct cb_data {
size_t remaining_bytes;
};
-
static void reset_data(struct cb_data *data, CURL *curl)
{
data->easy_handle = curl;
@@ -49,11 +48,9 @@ static void reset_data(struct cb_data *data, CURL *curl)
data->remaining_bytes = 3;
}
-
-static size_t read_callback(char *ptr, size_t size, size_t nitems,
- void *userdata)
+static size_t t1533_read_cb(char *ptr, size_t size, size_t nitems, void *userp)
{
- struct cb_data *data = (struct cb_data *)userdata;
+ struct cb_data *data = (struct cb_data *)userp;
/* wait until the server has sent all response headers */
if(data->response_received) {
@@ -75,11 +72,9 @@ static size_t read_callback(char *ptr, size_t size, size_t nitems,
}
}
-
-static size_t write_callback(char *ptr, size_t size, size_t nmemb,
- void *userdata)
+static size_t t1533_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct cb_data *data = (struct cb_data *)userdata;
+ struct cb_data *data = (struct cb_data *)userp;
size_t totalsize = nmemb * size;
/* unused parameter */
@@ -97,7 +92,6 @@ static size_t write_callback(char *ptr, size_t size, size_t nmemb,
return totalsize;
}
-
static CURLcode perform_and_check_connections(CURL *curl,
const char *description,
long expected_connections)
@@ -155,9 +149,9 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE,
(curl_off_t)data.remaining_bytes);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1533_read_cb);
test_setopt(curl, CURLOPT_READDATA, &data);
- test_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
+ test_setopt(curl, CURLOPT_WRITEFUNCTION, t1533_write_cb);
test_setopt(curl, CURLOPT_WRITEDATA, &data);
result = perform_and_check_connections(curl,
tests/libtest/lib1540.c+9 -9
@@ -28,7 +28,7 @@
#include "warnless.h"
#include "memdebug.h"
-struct transfer_status {
+struct t1540_transfer_status {
CURL *easy;
int halted;
int counter; /* count write callback invokes */
@@ -41,7 +41,7 @@ static int please_continue(void *userp,
curl_off_t ultotal,
curl_off_t ulnow)
{
- struct transfer_status *st = (struct transfer_status *)userp;
+ struct t1540_transfer_status *st = (struct t1540_transfer_status *)userp;
(void)dltotal;
(void)dlnow;
(void)ultotal;
@@ -57,8 +57,8 @@ static int please_continue(void *userp,
return 0; /* go on */
}
-static size_t header_callback(char *ptr, size_t size, size_t nmemb,
- void *userp)
+static size_t t1540_header_callback(char *ptr, size_t size, size_t nmemb,
+ void *userp)
{
size_t len = size * nmemb;
(void)userp;
@@ -66,9 +66,9 @@ static size_t header_callback(char *ptr, size_t size, size_t nmemb,
return len;
}
-static size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1540_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct transfer_status *st = (struct transfer_status *)userp;
+ struct t1540_transfer_status *st = (struct t1540_transfer_status *)userp;
size_t len = size * nmemb;
st->counter++;
if(st->counter > 1) {
@@ -87,7 +87,7 @@ CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLcode res = CURLE_OK;
- struct transfer_status st;
+ struct t1540_transfer_status st;
start_test_timing();
@@ -99,9 +99,9 @@ CURLcode test(char *URL)
st.easy = curls; /* to allow callbacks access */
easy_setopt(curls, CURLOPT_URL, URL);
- easy_setopt(curls, CURLOPT_WRITEFUNCTION, write_callback);
+ easy_setopt(curls, CURLOPT_WRITEFUNCTION, t1540_write_cb);
easy_setopt(curls, CURLOPT_WRITEDATA, &st);
- easy_setopt(curls, CURLOPT_HEADERFUNCTION, header_callback);
+ easy_setopt(curls, CURLOPT_HEADERFUNCTION, t1540_header_callback);
easy_setopt(curls, CURLOPT_HEADERDATA, &st);
easy_setopt(curls, CURLOPT_XFERINFOFUNCTION, please_continue);
tests/libtest/lib1541.c+12 -12
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-struct transfer_status {
+struct t1541_transfer_status {
CURL *easy;
int hd_count;
int bd_count;
@@ -36,7 +36,7 @@ struct transfer_status {
#define KN(a) a, #a
-static int geterr(const char *name, CURLcode val, int lineno)
+static int t1541_geterr(const char *name, CURLcode val, int lineno)
{
curl_mprintf("CURLINFO_%s returned %d, \"%s\" on line %d\n",
name, val, curl_easy_strerror(val), lineno);
@@ -59,7 +59,7 @@ static void check_time(CURL *easy, int key, const char *name,
curl_off_t tval;
CURLcode res = curl_easy_getinfo(easy, (CURLINFO)key, &tval);
if(res) {
- geterr(name, res, __LINE__);
+ t1541_geterr(name, res, __LINE__);
}
else
report_time(name, where, tval, tval > 0);
@@ -71,16 +71,16 @@ static void check_time0(CURL *easy, int key, const char *name,
curl_off_t tval;
CURLcode res = curl_easy_getinfo(easy, (CURLINFO)key, &tval);
if(res) {
- geterr(name, res, __LINE__);
+ t1541_geterr(name, res, __LINE__);
}
else
report_time(name, where, tval, !tval);
}
-static size_t header_callback(char *ptr, size_t size, size_t nmemb,
- void *userp)
+static size_t t1541_header_callback(char *ptr, size_t size, size_t nmemb,
+ void *userp)
{
- struct transfer_status *st = (struct transfer_status *)userp;
+ struct t1541_transfer_status *st = (struct t1541_transfer_status *)userp;
size_t len = size * nmemb;
(void)ptr;
@@ -100,9 +100,9 @@ static size_t header_callback(char *ptr, size_t size, size_t nmemb,
return len;
}
-static size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1541_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct transfer_status *st = (struct transfer_status *)userp;
+ struct t1541_transfer_status *st = (struct t1541_transfer_status *)userp;
(void)ptr;
(void)st;
@@ -114,7 +114,7 @@ CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLcode res = CURLE_OK;
- struct transfer_status st;
+ struct t1541_transfer_status st;
start_test_timing();
@@ -126,9 +126,9 @@ CURLcode test(char *URL)
st.easy = curls; /* to allow callbacks access */
easy_setopt(curls, CURLOPT_URL, URL);
- easy_setopt(curls, CURLOPT_WRITEFUNCTION, write_callback);
+ easy_setopt(curls, CURLOPT_WRITEFUNCTION, t1541_write_cb);
easy_setopt(curls, CURLOPT_WRITEDATA, &st);
- easy_setopt(curls, CURLOPT_HEADERFUNCTION, header_callback);
+ easy_setopt(curls, CURLOPT_HEADERFUNCTION, t1541_header_callback);
easy_setopt(curls, CURLOPT_HEADERDATA, &st);
easy_setopt(curls, CURLOPT_NOPROGRESS, 0L);
tests/libtest/lib1552.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURL *curls = NULL;
tests/libtest/lib1553.c+4 -6
@@ -28,11 +28,9 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-static int xferinfo(void *p,
- curl_off_t dltotal, curl_off_t dlnow,
- curl_off_t ultotal, curl_off_t ulnow)
+static int t1553_xferinfo(void *p,
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow)
{
(void)p;
(void)dlnow;
@@ -72,7 +70,7 @@ CURLcode test(char *URL)
easy_setopt(curls, CURLOPT_VERBOSE, 1L);
easy_setopt(curls, CURLOPT_MIMEPOST, mime);
easy_setopt(curls, CURLOPT_USERPWD, "u:s");
- easy_setopt(curls, CURLOPT_XFERINFOFUNCTION, xferinfo);
+ easy_setopt(curls, CURLOPT_XFERINFOFUNCTION, t1553_xferinfo);
easy_setopt(curls, CURLOPT_NOPROGRESS, 1L);
libtest_debug_config.nohex = 1;
tests/libtest/lib1554.c+5 -5
@@ -36,8 +36,8 @@ static const char *ldata_names[] = {
"NULL",
};
-static void test_lock(CURL *handle, curl_lock_data data,
- curl_lock_access laccess, void *useptr)
+static void t1554_test_lock(CURL *handle, curl_lock_data data,
+ curl_lock_access laccess, void *useptr)
{
(void)handle;
(void)data;
@@ -46,7 +46,7 @@ static void test_lock(CURL *handle, curl_lock_data data,
curl_mprintf("-> Mutex lock %s\n", ldata_names[data]);
}
-static void test_unlock(CURL *handle, curl_lock_data data, void *useptr)
+static void t1554_test_unlock(CURL *handle, curl_lock_data data, void *useptr)
{
(void)handle;
(void)data;
@@ -70,8 +70,8 @@ CURLcode test(char *URL)
}
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
- curl_share_setopt(share, CURLSHOPT_LOCKFUNC, test_lock);
- curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, test_unlock);
+ curl_share_setopt(share, CURLSHOPT_LOCKFUNC, t1554_test_lock);
+ curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, t1554_test_unlock);
/* Loop the transfer and cleanup the handle properly every lap. This will
still reuse connections since the pool is in the shared object! */
tests/libtest/lib1555.c+12 -12
@@ -29,7 +29,7 @@
#include "memdebug.h"
-static CURL *curl;
+static CURL *t1555_curl;
static int progressCallback(void *arg,
double dltotal,
@@ -45,9 +45,9 @@ static int progressCallback(void *arg,
(void)dlnow;
(void)ultotal;
(void)ulnow;
- res = curl_easy_recv(curl, buffer, 256, &n);
+ res = curl_easy_recv(t1555_curl, buffer, 256, &n);
curl_mprintf("curl_easy_recv returned %d\n", res);
- res = curl_easy_send(curl, buffer, n, &n);
+ res = curl_easy_send(t1555_curl, buffer, n, &n);
curl_mprintf("curl_easy_send returned %d\n", res);
return 1;
@@ -59,22 +59,22 @@ CURLcode test(char *URL)
global_init(CURL_GLOBAL_ALL);
- easy_init(curl);
+ easy_init(t1555_curl);
- easy_setopt(curl, CURLOPT_URL, URL);
- easy_setopt(curl, CURLOPT_TIMEOUT, (long)7);
- easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
- easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressCallback);
- easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
- easy_setopt(curl, CURLOPT_NOPROGRESS, (long)0);
+ easy_setopt(t1555_curl, CURLOPT_URL, URL);
+ easy_setopt(t1555_curl, CURLOPT_TIMEOUT, (long)7);
+ easy_setopt(t1555_curl, CURLOPT_NOSIGNAL, (long)1);
+ easy_setopt(t1555_curl, CURLOPT_PROGRESSFUNCTION, progressCallback);
+ easy_setopt(t1555_curl, CURLOPT_PROGRESSDATA, NULL);
+ easy_setopt(t1555_curl, CURLOPT_NOPROGRESS, (long)0);
- res = curl_easy_perform(curl);
+ res = curl_easy_perform(t1555_curl);
test_cleanup:
/* undocumented cleanup sequence - type UA */
- curl_easy_cleanup(curl);
+ curl_easy_cleanup(t1555_curl);
curl_global_cleanup();
return res;
tests/libtest/lib1560.c+1 -1
@@ -1906,7 +1906,7 @@ static int huge(void)
int i;
CURLU *urlp = curl_url();
CURLUcode rc;
- CURLUPart part[]= {
+ CURLUPart part[] = {
CURLUPART_SCHEME,
CURLUPART_USER,
CURLUPART_PASSWORD,
tests/libtest/lib1564.c+0 -1
@@ -27,7 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
#define WAKEUP_NUM 10
CURLcode test(char *URL)
tests/libtest/lib1565.c+9 -10
@@ -31,19 +31,18 @@
#include <pthread.h>
#include <unistd.h>
-#define TEST_HANG_TIMEOUT 60 * 1000
#define CONN_NUM 3
#define TIME_BETWEEN_START_SECS 2
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static CURL *pending_handles[CONN_NUM];
static int pending_num = 0;
-static CURLcode test_failure = CURLE_OK;
+static CURLcode t1565_test_failure = CURLE_OK;
static CURLM *testmulti = NULL;
static const char *url;
-static void *run_thread(void *ptr)
+static void *t1565_run_thread(void *ptr)
{
CURL *easy = NULL;
CURLcode res = CURLE_OK;
@@ -61,7 +60,7 @@ static void *run_thread(void *ptr)
pthread_mutex_lock(&lock);
- if(test_failure) {
+ if(t1565_test_failure) {
pthread_mutex_unlock(&lock);
goto test_cleanup;
}
@@ -81,8 +80,8 @@ test_cleanup:
pthread_mutex_lock(&lock);
- if(!test_failure)
- test_failure = res;
+ if(!t1565_test_failure)
+ t1565_test_failure = res;
pthread_mutex_unlock(&lock);
@@ -111,7 +110,7 @@ CURLcode test(char *URL)
url = URL;
- result = pthread_create(&tid, NULL, run_thread, NULL);
+ result = pthread_create(&tid, NULL, t1565_run_thread, NULL);
if(!result)
tid_valid = true;
else {
@@ -185,8 +184,8 @@ CURLcode test(char *URL)
test_cleanup:
pthread_mutex_lock(&lock);
- if(!test_failure)
- test_failure = res;
+ if(!t1565_test_failure)
+ t1565_test_failure = res;
pthread_mutex_unlock(&lock);
if(tid_valid)
@@ -199,7 +198,7 @@ test_cleanup:
curl_easy_cleanup(started_handles[i]);
curl_global_cleanup();
- return test_failure;
+ return t1565_test_failure;
}
#else /* without pthread, this test doesn't work */
tests/libtest/lib1576.c+11 -11
@@ -25,20 +25,20 @@
#include "memdebug.h"
-static char testdata[] = "request indicates that the client, which made";
+static char t1576_testdata[] = "request indicates that the client, which made";
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+static size_t t1576_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
- size_t amount = nmemb * size; /* Total bytes curl wants */
- if(amount < strlen(testdata)) {
- return strlen(testdata);
+ size_t amount = nmemb * size; /* Total bytes curl wants */
+ if(amount < strlen(t1576_testdata)) {
+ return strlen(t1576_testdata);
}
(void)stream;
- memcpy(ptr, testdata, strlen(testdata));
- return strlen(testdata);
+ memcpy(ptr, t1576_testdata, strlen(t1576_testdata));
+ return strlen(t1576_testdata);
}
-static int seek_callback(void *ptr, curl_off_t offset, int origin)
+static int t1576_seek_callback(void *ptr, curl_off_t offset, int origin)
{
(void)ptr;
(void)offset;
@@ -70,9 +70,9 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_URL, URL);
test_setopt(curl, CURLOPT_UPLOAD, 1L);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
- test_setopt(curl, CURLOPT_SEEKFUNCTION, seek_callback);
- test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(testdata));
+ test_setopt(curl, CURLOPT_READFUNCTION, t1576_read_cb);
+ test_setopt(curl, CURLOPT_SEEKFUNCTION, t1576_seek_callback);
+ test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(t1576_testdata));
test_setopt(curl, CURLOPT_CUSTOMREQUEST, "CURL");
if(testno == 1578) {
tests/libtest/lib1591.c+8 -7
@@ -31,18 +31,19 @@
#include <stdio.h>
#include "memdebug.h"
-static char testdata[] = "Hello Cloud!\r\n";
static size_t consumed = 0;
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+static size_t t1591_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
- size_t amount = nmemb * size; /* Total bytes curl wants */
+ static const char testdata[] = "Hello Cloud!\r\n";
+
+ size_t amount = nmemb * size; /* Total bytes curl wants */
if(consumed == strlen(testdata)) {
return 0;
}
- if(amount > strlen(testdata)-consumed) {
+ if(amount > strlen(testdata) - consumed) {
amount = strlen(testdata);
}
@@ -55,7 +56,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
/*
* carefully not leak memory on OOM
*/
-static int trailers_callback(struct curl_slist **list, void *userdata)
+static int t1591_trailers_callback(struct curl_slist **list, void *userdata)
{
struct curl_slist *nlist = NULL;
struct curl_slist *nlist2 = NULL;
@@ -102,8 +103,8 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
test_setopt(curl, CURLOPT_HTTPHEADER, hhl);
test_setopt(curl, CURLOPT_UPLOAD, 1L);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
- test_setopt(curl, CURLOPT_TRAILERFUNCTION, trailers_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1591_read_cb);
+ test_setopt(curl, CURLOPT_TRAILERFUNCTION, t1591_trailers_callback);
test_setopt(curl, CURLOPT_TRAILERDATA, NULL);
res = curl_easy_perform(curl);
tests/libtest/lib1592.c+3 -3
@@ -32,9 +32,9 @@
/* We're willing to wait a very generous two seconds for the removal. This is
as low as we can go while still easily supporting SIGALRM timing for the
non-threaded blocking resolver. It doesn't matter that much because when
- the test passes, we never wait this long. We set it much higher to avoid
- issues when running on overloaded CI machines. */
-#define TEST_HANG_TIMEOUT 60 * 1000
+ the test passes, we never wait this long. We set it much higher via
+ the default TEST_HANG_TIMEOUT to avoid issues when running on overloaded
+ CI machines. */
#include "test.h"
#include "testutil.h"
tests/libtest/lib1598.c+4 -4
@@ -34,7 +34,7 @@
/*
* carefully not leak memory on OOM
*/
-static int trailers_callback(struct curl_slist **list, void *userdata)
+static int t1598_trailers_callback(struct curl_slist **list, void *userdata)
{
struct curl_slist *nlist = NULL;
struct curl_slist *nlist2 = NULL;
@@ -52,10 +52,10 @@ static int trailers_callback(struct curl_slist **list, void *userdata)
}
}
-static const char *post_data = "xxx=yyy&aaa=bbbbb";
-
CURLcode test(char *URL)
{
+ static const char *post_data = "xxx=yyy&aaa=bbbbb";
+
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
/* http and proxy header list */
@@ -89,7 +89,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_HTTPHEADER, hhl);
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(post_data));
test_setopt(curl, CURLOPT_POSTFIELDS, post_data);
- test_setopt(curl, CURLOPT_TRAILERFUNCTION, trailers_callback);
+ test_setopt(curl, CURLOPT_TRAILERFUNCTION, t1598_trailers_callback);
test_setopt(curl, CURLOPT_TRAILERDATA, NULL);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
tests/libtest/lib1662.c+7 -8
@@ -23,15 +23,15 @@
***************************************************************************/
#include "test.h"
-static char testdata[]="mooaaa";
-
-struct WriteThis {
+struct t1662_WriteThis {
size_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t1662_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ static const char testdata[] = "mooaaa";
+
+ struct t1662_WriteThis *pooh = (struct t1662_WriteThis *)userp;
size_t len = strlen(testdata);
if(size*nmemb < len)
@@ -46,14 +46,13 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd;
curl_mime *mime1;
curl_mimepart *part1;
- struct WriteThis pooh = { 1 };
+ struct t1662_WriteThis pooh = { 1 };
mime1 = NULL;
@@ -67,7 +66,7 @@ CURLcode test(char *URL)
mime1 = curl_mime_init(hnd);
if(mime1) {
part1 = curl_mime_addpart(mime1);
- curl_mime_data_cb(part1, -1, read_callback, NULL, NULL, &pooh);
+ curl_mime_data_cb(part1, -1, t1662_read_cb, NULL, NULL, &pooh);
curl_mime_filename(part1, "poetry.txt");
curl_mime_name(part1, "content");
curl_easy_setopt(hnd, CURLOPT_MIMEPOST, mime1);
tests/libtest/lib1901.c+9 -13
@@ -27,19 +27,15 @@
#include "warnless.h"
#include "memdebug.h"
-
-
-static const char *chunks[]={
- "one",
- "two",
- "three",
- "four",
- NULL
-};
-
-
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
+ static const char *chunks[] = {
+ "one",
+ "two",
+ "three",
+ "four",
+ NULL
+ };
static int ix = 0;
(void)size;
(void)nmemb;
@@ -67,7 +63,7 @@ CURLcode test(char *URL)
ignores it */
easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 4L);
easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
- easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ easy_setopt(curl, CURLOPT_READFUNCTION, t1901_read_cb);
easy_setopt(curl, CURLOPT_POST, 1L);
easy_setopt(curl, CURLOPT_VERBOSE, 1L);
easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
tests/libtest/lib1911.c+2 -2
@@ -31,10 +31,10 @@
define not publicly exposed so we set our own */
#define MAX_INPUT_LENGTH 8000000
-static char testbuf[MAX_INPUT_LENGTH + 2];
-
CURLcode test(char *URL)
{
+ static char testbuf[MAX_INPUT_LENGTH + 2];
+
const struct curl_easyoption *o;
CURL *easy;
int error = 0;
tests/libtest/lib1915.c+19 -19
@@ -28,25 +28,6 @@
#include "warnless.h"
#include "memdebug.h"
-struct entry {
- const char *name;
- const char *exp;
-};
-
-static const struct entry preload_hosts[] = {
-#if (SIZEOF_TIME_T < 5)
- { "1.example.com", "20370320 01:02:03" },
- { "2.example.com", "20370320 03:02:01" },
- { "3.example.com", "20370319 01:02:03" },
-#else
- { "1.example.com", "25250320 01:02:03" },
- { "2.example.com", "25250320 03:02:01" },
- { "3.example.com", "25250319 01:02:03" },
-#endif
- { "4.example.com", "" },
- { NULL, NULL } /* end of list marker */
-};
-
struct state {
int index;
};
@@ -55,6 +36,25 @@ struct state {
static CURLSTScode hstsread(CURL *easy, struct curl_hstsentry *e,
void *userp)
{
+ struct entry {
+ const char *name;
+ const char *exp;
+ };
+
+ static const struct entry preload_hosts[] = {
+#if (SIZEOF_TIME_T < 5)
+ { "1.example.com", "20370320 01:02:03" },
+ { "2.example.com", "20370320 03:02:01" },
+ { "3.example.com", "20370319 01:02:03" },
+#else
+ { "1.example.com", "25250320 01:02:03" },
+ { "2.example.com", "25250320 03:02:01" },
+ { "3.example.com", "25250319 01:02:03" },
+#endif
+ { "4.example.com", "" },
+ { NULL, NULL } /* end of list marker */
+ };
+
const char *host;
const char *expire;
struct state *s = (struct state *)userp;
tests/libtest/lib1940.c+41 -35
@@ -26,33 +26,38 @@
#include "memdebug.h"
-static const char *testdata[]={
- "daTE",
- "Server",
- "content-type",
- "content-length",
- "location",
- "set-cookie",
- "silly-thing",
- "fold",
- "blank",
- "Blank2",
- NULL
-};
+#ifndef LIB1940_C
+#define LIB1940_C
-#ifdef LIB1946
-#define HEADER_REQUEST 0
-#else
-#define HEADER_REQUEST -1
-#endif
+static size_t t1940_write_cb(char *data, size_t n, size_t l, void *userp)
+{
+ /* take care of the data here, ignored in this example */
+ (void)data;
+ (void)userp;
+ return n*l;
+}
-static void showem(CURL *easy, unsigned int type)
+static void t1940_showem(CURL *easy, int header_request, unsigned int type)
{
+ static const char *testdata[] = {
+ "daTE",
+ "Server",
+ "content-type",
+ "content-length",
+ "location",
+ "set-cookie",
+ "silly-thing",
+ "fold",
+ "blank",
+ "Blank2",
+ NULL
+ };
+
int i;
struct curl_header *header;
for(i = 0; testdata[i]; i++) {
- if(CURLHE_OK == curl_easy_header(easy, testdata[i], 0, type,
- HEADER_REQUEST, &header)) {
+ if(CURLHE_OK == curl_easy_header(easy, testdata[i], 0,
+ type, header_request, &header)) {
if(header->amount > 1) {
/* more than one, iterate over them */
size_t index = 0;
@@ -63,8 +68,8 @@ static void showem(CURL *easy, unsigned int type)
if(++index == amount)
break;
- if(CURLHE_OK != curl_easy_header(easy, testdata[i], index, type,
- HEADER_REQUEST, &header))
+ if(CURLHE_OK != curl_easy_header(easy, testdata[i], index,
+ type, header_request, &header))
break;
} while(1);
}
@@ -75,26 +80,27 @@ static void showem(CURL *easy, unsigned int type)
}
}
}
+#endif
-static size_t write_cb(char *data, size_t n, size_t l, void *userp)
-{
- /* take care of the data here, ignored in this example */
- (void)data;
- (void)userp;
- return n*l;
-}
CURLcode test(char *URL)
{
CURL *easy = NULL;
CURLcode res = CURLE_OK;
+ int header_request;
+#ifdef LIB1946
+ header_request = 0;
+#else
+ header_request = -1;
+#endif
+
global_init(CURL_GLOBAL_DEFAULT);
easy_init(easy);
easy_setopt(easy, CURLOPT_URL, URL);
easy_setopt(easy, CURLOPT_VERBOSE, 1L);
easy_setopt(easy, CURLOPT_FOLLOWLOCATION, 1L);
/* ignores any content */
- easy_setopt(easy, CURLOPT_WRITEFUNCTION, write_cb);
+ easy_setopt(easy, CURLOPT_WRITEFUNCTION, t1940_write_cb);
/* if there's a proxy set, use it */
if(libtest_arg2 && *libtest_arg2) {
@@ -105,13 +111,13 @@ CURLcode test(char *URL)
if(res)
goto test_cleanup;
- showem(easy, CURLH_HEADER);
+ t1940_showem(easy, header_request, CURLH_HEADER);
if(libtest_arg2 && *libtest_arg2) {
/* now show connect headers only */
- showem(easy, CURLH_CONNECT);
+ t1940_showem(easy, header_request, CURLH_CONNECT);
}
- showem(easy, CURLH_1XX);
- showem(easy, CURLH_TRAILER);
+ t1940_showem(easy, header_request, CURLH_1XX);
+ t1940_showem(easy, header_request, CURLH_TRAILER);
test_cleanup:
curl_easy_cleanup(easy);
tests/libtest/lib1945.c+4 -4
@@ -26,7 +26,7 @@
#include "memdebug.h"
-static void showem(CURL *easy, unsigned int type)
+static void t1945_showem(CURL *easy, unsigned int type)
{
struct curl_header *header = NULL;
struct curl_header *prev = NULL;
@@ -39,7 +39,7 @@ static void showem(CURL *easy, unsigned int type)
}
}
-static size_t write_cb(char *data, size_t n, size_t l, void *userp)
+static size_t t1945_write_cb(char *data, size_t n, size_t l, void *userp)
{
/* take care of the data here, ignored in this example */
(void)data;
@@ -58,7 +58,7 @@ CURLcode test(char *URL)
curl_easy_setopt(easy, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(easy, CURLOPT_FOLLOWLOCATION, 1L);
/* ignores any content */
- curl_easy_setopt(easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(easy, CURLOPT_WRITEFUNCTION, t1945_write_cb);
/* if there's a proxy set, use it */
if(libtest_arg2 && *libtest_arg2) {
@@ -69,7 +69,7 @@ CURLcode test(char *URL)
if(res) {
curl_mprintf("badness: %d\n", res);
}
- showem(easy, CURLH_CONNECT|CURLH_HEADER|CURLH_TRAILER|CURLH_1XX);
+ t1945_showem(easy, CURLH_CONNECT|CURLH_HEADER|CURLH_TRAILER|CURLH_1XX);
test_cleanup:
curl_easy_cleanup(easy);
tests/libtest/lib1947.c+2 -2
@@ -26,7 +26,7 @@
#include "memdebug.h"
-static size_t writecb(char *data, size_t n, size_t l, void *userp)
+static size_t t1947_write_cb(char *data, size_t n, size_t l, void *userp)
{
/* ignore the data */
(void)data;
@@ -47,7 +47,7 @@ CURLcode test(char *URL)
/* perform a request that involves redirection */
easy_setopt(curl, CURLOPT_URL, URL);
- easy_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
+ easy_setopt(curl, CURLOPT_WRITEFUNCTION, t1947_write_cb);
easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
res = curl_easy_perform(curl);
if(res) {
tests/libtest/lib1971.c+4 -5
@@ -25,13 +25,12 @@
#include "memdebug.h"
-static size_t read_callback(char *buffer, size_t size, size_t nitems,
- void *userdata)
+static size_t t1971_read_cb(char *ptr, size_t size, size_t nitems, void *userp)
{
- (void)buffer; /* unused */
+ (void)ptr; /* unused */
(void)size; /* unused */
(void)nitems; /* unused */
- (void)userdata; /* unused */
+ (void)userp; /* unused */
return 0;
}
@@ -55,7 +54,7 @@ CURLcode test(char *URL)
}
test_setopt(curl, CURLOPT_UPLOAD, 1L);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1971_read_cb);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_AWS_SIGV4, "aws:amz:us-east-1:s3");
test_setopt(curl, CURLOPT_USERPWD, "xxx");
tests/libtest/lib1975.c+4 -5
@@ -25,13 +25,12 @@
#include "memdebug.h"
-static size_t read_callback(char *buffer, size_t size, size_t nitems,
- void *userdata)
+static size_t t1975_read_cb(char *ptr, size_t size, size_t nitems, void *userp)
{
- (void)buffer; /* unused */
+ (void)ptr; /* unused */
(void)size; /* unused */
(void)nitems; /* unused */
- (void)userdata; /* unused */
+ (void)userp; /* unused */
return 0;
}
@@ -55,7 +54,7 @@ CURLcode test(char *URL)
}
test_setopt(curl, CURLOPT_UPLOAD, 1L);
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t1975_read_cb);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_AWS_SIGV4, "aws:amz:us-east-1:s3");
test_setopt(curl, CURLOPT_USERPWD, "xxx");
tests/libtest/lib2301.c+10 -10
@@ -27,7 +27,7 @@
#ifndef CURL_DISABLE_WEBSOCKETS
#if 0
-static CURLcode send_ping(CURL *curl, const char *send_payload)
+static CURLcode t2301_send_ping(CURL *curl, const char *send_payload)
{
size_t sent;
CURLcode result =
@@ -38,7 +38,7 @@ static CURLcode send_ping(CURL *curl, const char *send_payload)
return result;
}
-static CURLcode recv_pong(CURL *curl, const char *expected_payload)
+static CURLcode t2301_recv_pong(CURL *curl, const char *expected_payload)
{
size_t rlen;
unsigned int rflags;
@@ -67,7 +67,7 @@ static CURLcode recv_pong(CURL *curl, const char *expected_payload)
}
/* just close the connection */
-static void websocket_close(CURL *curl)
+static void t2301_websocket_close(CURL *curl)
{
size_t sent;
CURLcode result =
@@ -76,23 +76,23 @@ static void websocket_close(CURL *curl)
"ws: curl_ws_send returned %d, sent %d\n", result, (int)sent);
}
-static void websocket(CURL *curl)
+static void t2301_websocket(CURL *curl)
{
int i = 0;
curl_mfprintf(stderr, "ws: websocket() starts\n");
do {
- if(send_ping(curl, "foobar"))
+ if(t2301_send_ping(curl, "foobar"))
return;
- if(recv_pong(curl, "foobar"))
+ if(t2301_recv_pong(curl, "foobar"))
return;
sleep(2);
} while(i++ < 10);
- websocket_close(curl);
+ t2301_websocket_close(curl);
}
#endif
-static size_t writecb(char *b, size_t size, size_t nitems, void *p)
+static size_t t2301_write_cb(char *b, size_t size, size_t nitems, void *p)
{
CURL *easy = p;
unsigned char *buffer = (unsigned char *)b;
@@ -135,13 +135,13 @@ CURLcode test(char *URL)
curl_easy_setopt(curl, CURLOPT_USERAGENT, "webbie-sox/3");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, (long)CURLWS_RAW_MODE);
- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, t2301_write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl);
res = curl_easy_perform(curl);
curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", res);
#if 0
if(res == CURLE_OK)
- websocket(curl);
+ t2301_websocket(curl);
#endif
/* always cleanup */
curl_easy_cleanup(curl);
tests/libtest/lib2302.c+2 -2
@@ -78,7 +78,7 @@ static size_t add_data(struct ws_data *wd, const char *buf, size_t blen,
}
-static size_t writecb(char *buffer, size_t size, size_t nitems, void *p)
+static size_t t2302_write_cb(char *buffer, size_t size, size_t nitems, void *p)
{
struct ws_data *ws_data = p;
size_t incoming = nitems;
@@ -112,7 +112,7 @@ CURLcode test(char *URL)
/* use the callback style */
curl_easy_setopt(curl, CURLOPT_USERAGENT, "webbie-sox/3");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, t2302_write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ws_data);
res = curl_easy_perform(curl);
curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", res);
tests/libtest/lib2304.c+8 -8
@@ -26,7 +26,7 @@
#ifndef CURL_DISABLE_WEBSOCKETS
-static CURLcode send_ping(CURL *curl, const char *send_payload)
+static CURLcode t2304_send_ping(CURL *curl, const char *send_payload)
{
size_t sent;
CURLcode result =
@@ -38,7 +38,7 @@ static CURLcode send_ping(CURL *curl, const char *send_payload)
return result;
}
-static CURLcode recv_pong(CURL *curl, const char *expected_payload)
+static CURLcode t2304_recv_pong(CURL *curl, const char *expected_payload)
{
size_t rlen;
const struct curl_ws_frame *meta;
@@ -82,7 +82,7 @@ static CURLcode recv_any(CURL *curl)
}
/* just close the connection */
-static void websocket_close(CURL *curl)
+static void t2304_websocket_close(CURL *curl)
{
size_t sent;
CURLcode result =
@@ -91,23 +91,23 @@ static void websocket_close(CURL *curl)
"ws: curl_ws_send returned %d, sent %u\n", result, (int)sent);
}
-static void websocket(CURL *curl)
+static void t2304_websocket(CURL *curl)
{
int i = 0;
curl_mfprintf(stderr, "ws: websocket() starts\n");
do {
recv_any(curl);
curl_mfprintf(stderr, "Send ping\n");
- if(send_ping(curl, "foobar"))
+ if(t2304_send_ping(curl, "foobar"))
return;
curl_mfprintf(stderr, "Receive pong\n");
- if(recv_pong(curl, "foobar")) {
+ if(t2304_recv_pong(curl, "foobar")) {
curl_mprintf("Connection closed\n");
return;
}
sleep(2);
} while(i++ < 10);
- websocket_close(curl);
+ t2304_websocket_close(curl);
}
CURLcode test(char *URL)
@@ -128,7 +128,7 @@ CURLcode test(char *URL)
res = curl_easy_perform(curl);
curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", res);
if(res == CURLE_OK)
- websocket(curl);
+ t2304_websocket(curl);
/* always cleanup */
curl_easy_cleanup(curl);
tests/libtest/lib2402.c+0 -4
@@ -27,10 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-#define NUM_HANDLES 4
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib2404.c+0 -4
@@ -27,10 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-#define NUM_HANDLES 4
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib2502.c+0 -4
@@ -28,10 +28,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-#define NUM_HANDLES 4
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib3026.c+6 -6
@@ -30,10 +30,10 @@
#ifdef _WIN32
#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
-static DWORD WINAPI run_thread(LPVOID ptr)
+static DWORD WINAPI t3026_run_thread(LPVOID ptr)
#else
#include <process.h>
-static unsigned int WINAPI run_thread(void *ptr)
+static unsigned int WINAPI t3026_run_thread(void *ptr)
#endif
{
CURLcode *result = ptr;
@@ -71,9 +71,9 @@ CURLcode test(char *URL)
curl_win_thread_handle_t th;
results[i] = CURL_LAST; /* initialize with invalid value */
#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
- th = CreateThread(NULL, 0, run_thread, &results[i], 0, NULL);
+ th = CreateThread(NULL, 0, t3026_run_thread, &results[i], 0, NULL);
#else
- th = _beginthreadex(NULL, 0, run_thread, &results[i], 0, NULL);
+ th = _beginthreadex(NULL, 0, t3026_run_thread, &results[i], 0, NULL);
#endif
if(!th) {
curl_mfprintf(stderr, "%s:%d Couldn't create thread, errno %lu\n",
@@ -104,7 +104,7 @@ cleanup:
#include <pthread.h>
#include <unistd.h>
-static void *run_thread(void *ptr)
+static void *t3026_run_thread(void *ptr)
{
CURLcode *result = ptr;
@@ -135,7 +135,7 @@ CURLcode test(char *URL)
for(i = 0; i < tid_count; i++) {
int res;
results[i] = CURL_LAST; /* initialize with invalid value */
- res = pthread_create(&tids[i], NULL, run_thread, &results[i]);
+ res = pthread_create(&tids[i], NULL, t3026_run_thread, &results[i]);
if(res) {
curl_mfprintf(stderr, "%s:%d Couldn't create thread, errno %d\n",
__FILE__, __LINE__, res);
tests/libtest/lib3105.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURL *curls = NULL;
tests/libtest/lib3207.c+5 -5
@@ -126,8 +126,8 @@ test_cleanup:
#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
-static void test_lock(CURL *handle, curl_lock_data data,
- curl_lock_access laccess, void *useptr)
+static void t3207_test_lock(CURL *handle, curl_lock_data data,
+ curl_lock_access laccess, void *useptr)
{
curl_mutex_t *mutexes = (curl_mutex_t*) useptr;
(void)handle;
@@ -135,7 +135,7 @@ static void test_lock(CURL *handle, curl_lock_data data,
Curl_mutex_acquire(&mutexes[data]);
}
-static void test_unlock(CURL *handle, curl_lock_data data, void *useptr)
+static void t3207_test_unlock(CURL *handle, curl_lock_data data, void *useptr)
{
curl_mutex_t *mutexes = (curl_mutex_t*) useptr;
(void)handle;
@@ -150,8 +150,8 @@ static void execute(CURLSH *share, struct Ctx *ctx)
for(i = 0; i < CURL_LOCK_DATA_LAST - 1; i++) {
Curl_mutex_init(&mutexes[i]);
}
- curl_share_setopt(share, CURLSHOPT_LOCKFUNC, test_lock);
- curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, test_unlock);
+ curl_share_setopt(share, CURLSHOPT_LOCKFUNC, t3207_test_lock);
+ curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, t3207_test_unlock);
curl_share_setopt(share, CURLSHOPT_USERDATA, (void *)mutexes);
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
tests/libtest/lib3208.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURL *curl = NULL;
tests/libtest/lib500.c+2 -4
@@ -54,8 +54,6 @@ static void setupcallbacks(CURL *curl)
testcounter = 0;
}
-#else
-#define setupcallbacks(x) Curl_nop_stmt
#endif
@@ -89,7 +87,9 @@ CURLcode test(char *URL)
if(libtest_arg3 && !strcmp(libtest_arg3, "activeftp"))
test_setopt(curl, CURLOPT_FTPPORT, "-");
+#ifdef LIB585
setupcallbacks(curl);
+#endif
res = curl_easy_perform(curl);
@@ -181,5 +181,3 @@ test_cleanup:
return res;
}
-
-#undef setupcallbacks
tests/libtest/lib502.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
/*
* Get a single URL without select().
*/
tests/libtest/lib503.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
/*
* Source code in here hugely as reported in bug report 651460 by
* Christopher R. Palmer.
tests/libtest/lib504.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
/*
* Source code in here hugely as reported in bug report 651464 by
* Christopher R. Palmer.
tests/libtest/lib506.c+20 -29
@@ -22,19 +22,20 @@
*
***************************************************************************/
#include "test.h"
+
+#include "testutil.h"
#include "memdebug.h"
-static const char * const HOSTHEADER = "Host: www.host.foo.com";
#define JAR libtest_arg2
#define THREADS 2
/* struct containing data of a thread */
-struct Tdata {
+struct t506_Tdata {
CURLSH *share;
char *url;
};
-struct userdata {
+struct t506_userdata {
const char *text;
int counter;
};
@@ -42,11 +43,11 @@ struct userdata {
static int locks[3];
/* lock callback */
-static void test_lock(CURL *handle, curl_lock_data data,
- curl_lock_access laccess, void *useptr)
+static void t506_test_lock(CURL *handle, curl_lock_data data,
+ curl_lock_access laccess, void *useptr)
{
const char *what;
- struct userdata *user = (struct userdata *)useptr;
+ struct t506_userdata *user = (struct t506_userdata *)useptr;
int locknum;
(void)handle;
@@ -82,10 +83,10 @@ static void test_lock(CURL *handle, curl_lock_data data,
}
/* unlock callback */
-static void test_unlock(CURL *handle, curl_lock_data data, void *useptr)
+static void t506_test_unlock(CURL *handle, curl_lock_data data, void *useptr)
{
const char *what;
- struct userdata *user = (struct userdata *)useptr;
+ struct t506_userdata *user = (struct t506_userdata *)useptr;
int locknum;
(void)handle;
switch(data) {
@@ -117,21 +118,19 @@ static void test_unlock(CURL *handle, curl_lock_data data, void *useptr)
user->counter++;
}
-
/* build host entry */
static struct curl_slist *sethost(struct curl_slist *headers)
{
(void)headers;
- return curl_slist_append(NULL, HOSTHEADER);
+ return curl_slist_append(NULL, "Host: www.host.foo.com");
}
-
/* the dummy thread function */
-static void *test_fire(void *ptr)
+static void *t506_test_fire(void *ptr)
{
CURLcode code;
struct curl_slist *headers;
- struct Tdata *tdata = (struct Tdata*)ptr;
+ struct t506_Tdata *tdata = (struct t506_Tdata*)ptr;
CURL *curl;
curl = curl_easy_init();
@@ -163,14 +162,6 @@ static void *test_fire(void *ptr)
return NULL;
}
-
-/* build request url */
-static char *suburl(const char *base, int i)
-{
- return curl_maprintf("%s%.4d", base, i);
-}
-
-
/* test function */
CURLcode test(char *URL)
{
@@ -178,14 +169,14 @@ CURLcode test(char *URL)
CURLSHcode scode = CURLSHE_OK;
CURLcode code = CURLE_OK;
char *url = NULL;
- struct Tdata tdata;
+ struct t506_Tdata tdata;
CURL *curl;
CURLSH *share;
struct curl_slist *headers = NULL;
struct curl_slist *cookies = NULL;
struct curl_slist *next_cookie = NULL;
int i;
- struct userdata user;
+ struct t506_userdata user;
user.text = "Pigs in space";
user.counter = 0;
@@ -207,11 +198,11 @@ CURLcode test(char *URL)
if(CURLSHE_OK == scode) {
curl_mprintf("CURLSHOPT_LOCKFUNC\n");
- scode = curl_share_setopt(share, CURLSHOPT_LOCKFUNC, test_lock);
+ scode = curl_share_setopt(share, CURLSHOPT_LOCKFUNC, t506_test_lock);
}
if(CURLSHE_OK == scode) {
curl_mprintf("CURLSHOPT_UNLOCKFUNC\n");
- scode = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, test_unlock);
+ scode = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, t506_test_unlock);
}
if(CURLSHE_OK == scode) {
curl_mprintf("CURLSHOPT_USERDATA\n");
@@ -265,12 +256,12 @@ CURLcode test(char *URL)
for(i = 1; i <= THREADS; i++) {
/* set thread data */
- tdata.url = suburl(URL, i); /* must be curl_free()d */
+ tdata.url = tutil_suburl(URL, i); /* must be curl_free()d */
tdata.share = share;
/* simulate thread, direct call of "thread" function */
curl_mprintf("*** run %d\n",i);
- test_fire(&tdata);
+ t506_test_fire(&tdata);
curl_free(tdata.url);
}
@@ -286,7 +277,7 @@ CURLcode test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- url = suburl(URL, i);
+ url = tutil_suburl(URL, i);
headers = sethost(NULL);
test_setopt(curl, CURLOPT_HTTPHEADER, headers);
test_setopt(curl, CURLOPT_URL, url);
@@ -313,7 +304,7 @@ CURLcode test(char *URL)
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
- url = suburl(URL, i);
+ url = tutil_suburl(URL, i);
headers = sethost(NULL);
test_setopt(curl, CURLOPT_HTTPHEADER, headers);
test_setopt(curl, CURLOPT_URL, url);
tests/libtest/lib507.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURL *curls = NULL;
tests/libtest/lib508.c+9 -8
@@ -25,16 +25,14 @@
#include "memdebug.h"
-static char testdata[]="this is what we post to the silly web server\n";
-
-struct WriteThis {
- char *readptr;
+struct t508_WriteThis {
+ const char *readptr;
size_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t508_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t508_WriteThis *pooh = (struct t508_WriteThis *)userp;
if(size*nmemb < 1)
return 0;
@@ -51,10 +49,13 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
CURLcode test(char *URL)
{
+ static const char testdata[] =
+ "this is what we post to the silly web server\n";
+
CURL *curl;
CURLcode res = CURLE_OK;
- struct WriteThis pooh;
+ struct t508_WriteThis pooh;
pooh.readptr = testdata;
pooh.sizeleft = strlen(testdata);
@@ -81,7 +82,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
/* we want to use our own read function */
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t508_read_cb);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_READDATA, &pooh);
tests/libtest/lib510.c+16 -13
@@ -25,22 +25,24 @@
#include "memdebug.h"
-static const char * const testpost[]={
- "one",
- "two",
- "three",
- "and a final longer crap: four",
- NULL
-};
-
+#ifndef LIB510_C
+#define LIB510_C
-struct WriteThis {
+struct t510_WriteThis {
int counter;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t510_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ static const char * const testpost[] = {
+ "one",
+ "two",
+ "three",
+ "and a final longer crap: four",
+ NULL
+ };
+
+ struct t510_WriteThis *pooh = (struct t510_WriteThis *)userp;
const char *data;
if(size*nmemb < 1)
@@ -60,13 +62,14 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
}
return 0; /* no more data left to deliver */
}
+#endif
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
struct curl_slist *slist = NULL;
- struct WriteThis pooh;
+ struct t510_WriteThis pooh;
pooh.counter = 0;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
@@ -96,7 +99,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POST, 1L);
/* we want to use our own read function */
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t510_read_cb);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_READDATA, &pooh);
tests/libtest/lib513.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t513_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
(void)ptr;
(void)size;
@@ -61,7 +61,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POSTFIELDSIZE, 1L);
/* we want to use our own read function */
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t513_read_cb);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_READDATA, NULL);
tests/libtest/lib517.c+126 -126
@@ -25,145 +25,145 @@
#include "memdebug.h"
-struct dcheck {
- const char *input;
- time_t output;
-};
+CURLcode test(char *URL)
+{
+ struct dcheck {
+ const char *input;
+ time_t output;
+ };
-static const struct dcheck dates[] = {
- {"Sun, 06 Nov 1994 08:49:37 GMT", 784111777 },
- {"Sunday, 06-Nov-94 08:49:37 GMT", 784111777 },
- {"Sun Nov 6 08:49:37 1994", 784111777 },
- {"Sun Nov 6 8:49:37 1994", 784111777 },
- {"Sun Nov 6 8:9:37 1994", 784109377 },
- {"Sun Nov 6 008:09:37 1994", -1 },
- {"Nov Sun 6 8:9:7 1994", 784109347 },
- {"06 Nov 1994 08:49:37 GMT", 784111777 },
- {"06-Nov-94 08:49:37 GMT", 784111777 },
- {"Nov 6 08:49:37 1994", 784111777 },
- {"06 Nov 1994 08:49:37", 784111777 },
- {"06-Nov-94 08:49:37", 784111777 },
- {"1994 Nov 6 08:49:37", 784111777 },
- {"GMT 08:49:37 06-Nov-94 Sunday", 784111777 },
- {"94 6 Nov 08:49:37", 784111777 },
- {"1994 Nov 6", 784080000 },
- {"06-Nov-94", 784080000 },
- {"Sun Nov 6 94", 784080000 },
- {"1994.Nov.6", 784080000 },
- {"Sun/Nov/6/94/GMT", 784080000 },
- {"Sun, 06 Nov 1994 08:49:37 CET", 784108177 },
- {"06 Nov 1994 08:49:37 EST", 784129777 },
- {"Sun, 06 Nov 1994 08:49:37 UT", 784111777 },
- {"Sun, 12 Sep 2004 15:05:58 -0700", 1095026758 },
- {"Sat, 11 Sep 2004 21:32:11 +0200", 1094931131 },
- {"20040912 15:05:58 -0700", 1095026758 },
- {"20040911 +0200", 1094853600 },
- {"Thu, 01-Jan-1970 00:59:59 GMT", 3599 },
- {"Thu, 01-Jan-1970 01:00:00 GMT", 3600 },
- {"Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },
- {"Thu, 19-Apr-2007 16:00:00 GMT", 1176998400 },
- {"Wed, 25 Apr 2007 21:02:13 GMT", 1177534933 },
- {"Thu, 19/Apr\\2007 16:00:00 GMT", 1176998400 },
- {"Fri, 1 Jan 2010 01:01:50 GMT", 1262307710 },
- {"Wednesday, 1-Jan-2003 00:00:00 GMT", 1041379200 },
- {", 1-Jan-2003 00:00:00 GMT", 1041379200 },
- {"1-Jan-2003 00:00:00 GMT", 1041379200 },
- {"1-Jan-2003 00:00:00 GMT", 1041379200 },
- {"Wed,18-Apr-07 22:50:12 GMT", 1176936612 },
- {"WillyWonka , 18-Apr-07 22:50:12 GMT", -1 },
- {"WillyWonka , 18-Apr-07 22:50:12", -1 },
- {"WillyWonka , 18-apr-07 22:50:12", -1 },
- {"Mon, 18-Apr-1977 22:50:13 GMT", 230251813 },
- {"Mon, 18-Apr-77 22:50:13 GMT", 230251813 },
- {"Sat, 15-Apr-17\"21:01:22\"GMT", 1492290082 },
- {"Partyday, 18- April-07 22:50:12", -1 },
- {"Partyday, 18 - Apri-07 22:50:12", -1 },
- {"Wednes, 1-Januar-2003 00:00:00 GMT", -1 },
- {"Sat, 15-Apr-17 21:01:22", 1492290082 },
- {"Sat, 15-Apr-17 21:01:22 GMT-2", 1492290082 },
- {"Sat, 15-Apr-17 21:01:22 GMT BLAH", 1492290082 },
- {"Sat, 15-Apr-17 21:01:22 GMT-0400", 1492290082 },
- {"Sat, 15-Apr-17 21:01:22 GMT-0400 (EDT)", 1492290082 },
- {"Sat, 15-Apr-17 21:01:22 DST", -1 },
- {"Sat, 15-Apr-17 21:01:22 -0400", 1492304482 },
- {"Sat, 15-Apr-17 21:01:22 (hello there)", -1 },
- {"Sat, 15-Apr-17 21:01:22 11:22:33", -1 },
- {"Sat, 15-Apr-17 ::00 21:01:22", -1 },
- {"Sat, 15-Apr-17 boink:z 21:01:22", -1 },
- {"Sat, 15-Apr-17 91:22:33 21:01:22", -1 },
- {"Thu Apr 18 22:50:12 2007 GMT", 1176936612 },
- {"22:50:12 Thu Apr 18 2007 GMT", 1176936612 },
- {"Thu 22:50:12 Apr 18 2007 GMT", 1176936612 },
- {"Thu Apr 22:50:12 18 2007 GMT", 1176936612 },
- {"Thu Apr 18 22:50:12 2007 GMT", 1176936612 },
- {"Thu Apr 18 2007 22:50:12 GMT", 1176936612 },
- {"Thu Apr 18 2007 GMT 22:50:12", 1176936612 },
+ static const struct dcheck dates[] = {
+ {"Sun, 06 Nov 1994 08:49:37 GMT", 784111777 },
+ {"Sunday, 06-Nov-94 08:49:37 GMT", 784111777 },
+ {"Sun Nov 6 08:49:37 1994", 784111777 },
+ {"Sun Nov 6 8:49:37 1994", 784111777 },
+ {"Sun Nov 6 8:9:37 1994", 784109377 },
+ {"Sun Nov 6 008:09:37 1994", -1 },
+ {"Nov Sun 6 8:9:7 1994", 784109347 },
+ {"06 Nov 1994 08:49:37 GMT", 784111777 },
+ {"06-Nov-94 08:49:37 GMT", 784111777 },
+ {"Nov 6 08:49:37 1994", 784111777 },
+ {"06 Nov 1994 08:49:37", 784111777 },
+ {"06-Nov-94 08:49:37", 784111777 },
+ {"1994 Nov 6 08:49:37", 784111777 },
+ {"GMT 08:49:37 06-Nov-94 Sunday", 784111777 },
+ {"94 6 Nov 08:49:37", 784111777 },
+ {"1994 Nov 6", 784080000 },
+ {"06-Nov-94", 784080000 },
+ {"Sun Nov 6 94", 784080000 },
+ {"1994.Nov.6", 784080000 },
+ {"Sun/Nov/6/94/GMT", 784080000 },
+ {"Sun, 06 Nov 1994 08:49:37 CET", 784108177 },
+ {"06 Nov 1994 08:49:37 EST", 784129777 },
+ {"Sun, 06 Nov 1994 08:49:37 UT", 784111777 },
+ {"Sun, 12 Sep 2004 15:05:58 -0700", 1095026758 },
+ {"Sat, 11 Sep 2004 21:32:11 +0200", 1094931131 },
+ {"20040912 15:05:58 -0700", 1095026758 },
+ {"20040911 +0200", 1094853600 },
+ {"Thu, 01-Jan-1970 00:59:59 GMT", 3599 },
+ {"Thu, 01-Jan-1970 01:00:00 GMT", 3600 },
+ {"Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },
+ {"Thu, 19-Apr-2007 16:00:00 GMT", 1176998400 },
+ {"Wed, 25 Apr 2007 21:02:13 GMT", 1177534933 },
+ {"Thu, 19/Apr\\2007 16:00:00 GMT", 1176998400 },
+ {"Fri, 1 Jan 2010 01:01:50 GMT", 1262307710 },
+ {"Wednesday, 1-Jan-2003 00:00:00 GMT", 1041379200 },
+ {", 1-Jan-2003 00:00:00 GMT", 1041379200 },
+ {"1-Jan-2003 00:00:00 GMT", 1041379200 },
+ {"1-Jan-2003 00:00:00 GMT", 1041379200 },
+ {"Wed,18-Apr-07 22:50:12 GMT", 1176936612 },
+ {"WillyWonka , 18-Apr-07 22:50:12 GMT", -1 },
+ {"WillyWonka , 18-Apr-07 22:50:12", -1 },
+ {"WillyWonka , 18-apr-07 22:50:12", -1 },
+ {"Mon, 18-Apr-1977 22:50:13 GMT", 230251813 },
+ {"Mon, 18-Apr-77 22:50:13 GMT", 230251813 },
+ {"Sat, 15-Apr-17\"21:01:22\"GMT", 1492290082 },
+ {"Partyday, 18- April-07 22:50:12", -1 },
+ {"Partyday, 18 - Apri-07 22:50:12", -1 },
+ {"Wednes, 1-Januar-2003 00:00:00 GMT", -1 },
+ {"Sat, 15-Apr-17 21:01:22", 1492290082 },
+ {"Sat, 15-Apr-17 21:01:22 GMT-2", 1492290082 },
+ {"Sat, 15-Apr-17 21:01:22 GMT BLAH", 1492290082 },
+ {"Sat, 15-Apr-17 21:01:22 GMT-0400", 1492290082 },
+ {"Sat, 15-Apr-17 21:01:22 GMT-0400 (EDT)", 1492290082 },
+ {"Sat, 15-Apr-17 21:01:22 DST", -1 },
+ {"Sat, 15-Apr-17 21:01:22 -0400", 1492304482 },
+ {"Sat, 15-Apr-17 21:01:22 (hello there)", -1 },
+ {"Sat, 15-Apr-17 21:01:22 11:22:33", -1 },
+ {"Sat, 15-Apr-17 ::00 21:01:22", -1 },
+ {"Sat, 15-Apr-17 boink:z 21:01:22", -1 },
+ {"Sat, 15-Apr-17 91:22:33 21:01:22", -1 },
+ {"Thu Apr 18 22:50:12 2007 GMT", 1176936612 },
+ {"22:50:12 Thu Apr 18 2007 GMT", 1176936612 },
+ {"Thu 22:50:12 Apr 18 2007 GMT", 1176936612 },
+ {"Thu Apr 22:50:12 18 2007 GMT", 1176936612 },
+ {"Thu Apr 18 22:50:12 2007 GMT", 1176936612 },
+ {"Thu Apr 18 2007 22:50:12 GMT", 1176936612 },
+ {"Thu Apr 18 2007 GMT 22:50:12", 1176936612 },
- {"\"Thu Apr 18 22:50:12 2007 GMT\"", 1176936612 },
- {"-\"22:50:12 Thu Apr 18 2007 GMT\"", 1176936612 },
- {"*\"Thu 22:50:12 Apr 18 2007 GMT\"", 1176936612 },
- {";\"Thu Apr 22:50:12 18 2007 GMT\"", 1176936612 },
- {".\"Thu Apr 18 22:50:12 2007 GMT\"", 1176936612 },
- {"\"Thu Apr 18 2007 22:50:12 GMT\"", 1176936612 },
- {"\"Thu Apr 18 2007 GMT 22:50:12\"", 1176936612 },
+ {"\"Thu Apr 18 22:50:12 2007 GMT\"", 1176936612 },
+ {"-\"22:50:12 Thu Apr 18 2007 GMT\"", 1176936612 },
+ {"*\"Thu 22:50:12 Apr 18 2007 GMT\"", 1176936612 },
+ {";\"Thu Apr 22:50:12 18 2007 GMT\"", 1176936612 },
+ {".\"Thu Apr 18 22:50:12 2007 GMT\"", 1176936612 },
+ {"\"Thu Apr 18 2007 22:50:12 GMT\"", 1176936612 },
+ {"\"Thu Apr 18 2007 GMT 22:50:12\"", 1176936612 },
- {"Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },
- {"15-Sat, Apr-17 21:01:22 GMT", 1492290082 },
- {"15-Sat, Apr 21:01:22 GMT 17", 1492290082 },
- {"15-Sat, Apr 21:01:22 GMT 2017", 1492290082 },
- {"15 Apr 21:01:22 2017", 1492290082 },
- {"15 17 Apr 21:01:22", 1492290082 },
- {"Apr 15 17 21:01:22", 1492290082 },
- {"Apr 15 21:01:22 17", 1492290082 },
- {"2017 April 15 21:01:22", -1 },
- {"15 April 2017 21:01:22", -1 },
- {"98 April 17 21:01:22", -1 },
- {"Thu, 012-Aug-2008 20:49:07 GMT", 1218574147 },
- {"Thu, 999999999999-Aug-2007 20:49:07 GMT", -1 },
- {"Thu, 12-Aug-2007 20:61:99999999999 GMT", -1 },
- {"IAintNoDateFool", -1 },
- {"Thu Apr 18 22:50 2007 GMT", 1176936600 },
- {"20110623 12:34:56", 1308832496 },
- {"20110632 12:34:56", -1 },
- {"20110623 56:34:56", -1 },
- {"20111323 12:34:56", -1 },
- {"20110623 12:34:79", -1 },
- {"Wed, 31 Dec 2008 23:59:60 GMT", 1230768000 },
- {"Wed, 31 Dec 2008 23:59:61 GMT", -1 },
- {"Wed, 31 Dec 2008 24:00:00 GMT", -1 },
- {"Wed, 31 Dec 2008 23:60:59 GMT", -1 },
- {"20110623 12:3", 1308830580 },
- {"20110623 1:3", 1308790980 },
- {"20110623 1:30", 1308792600 },
- {"20110623 12:12:3", 1308831123 },
- {"20110623 01:12:3", 1308791523 },
- {"20110623 01:99:30", -1 },
- {"Thu, 01-Jan-1970 00:00:00 GMT", 0 },
- {"Thu, 31-Dec-1969 23:59:58 GMT", -2 },
- {"Thu, 31-Dec-1969 23:59:59 GMT", 0 }, /* avoids -1 ! */
+ {"Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },
+ {"15-Sat, Apr-17 21:01:22 GMT", 1492290082 },
+ {"15-Sat, Apr 21:01:22 GMT 17", 1492290082 },
+ {"15-Sat, Apr 21:01:22 GMT 2017", 1492290082 },
+ {"15 Apr 21:01:22 2017", 1492290082 },
+ {"15 17 Apr 21:01:22", 1492290082 },
+ {"Apr 15 17 21:01:22", 1492290082 },
+ {"Apr 15 21:01:22 17", 1492290082 },
+ {"2017 April 15 21:01:22", -1 },
+ {"15 April 2017 21:01:22", -1 },
+ {"98 April 17 21:01:22", -1 },
+ {"Thu, 012-Aug-2008 20:49:07 GMT", 1218574147 },
+ {"Thu, 999999999999-Aug-2007 20:49:07 GMT", -1 },
+ {"Thu, 12-Aug-2007 20:61:99999999999 GMT", -1 },
+ {"IAintNoDateFool", -1 },
+ {"Thu Apr 18 22:50 2007 GMT", 1176936600 },
+ {"20110623 12:34:56", 1308832496 },
+ {"20110632 12:34:56", -1 },
+ {"20110623 56:34:56", -1 },
+ {"20111323 12:34:56", -1 },
+ {"20110623 12:34:79", -1 },
+ {"Wed, 31 Dec 2008 23:59:60 GMT", 1230768000 },
+ {"Wed, 31 Dec 2008 23:59:61 GMT", -1 },
+ {"Wed, 31 Dec 2008 24:00:00 GMT", -1 },
+ {"Wed, 31 Dec 2008 23:60:59 GMT", -1 },
+ {"20110623 12:3", 1308830580 },
+ {"20110623 1:3", 1308790980 },
+ {"20110623 1:30", 1308792600 },
+ {"20110623 12:12:3", 1308831123 },
+ {"20110623 01:12:3", 1308791523 },
+ {"20110623 01:99:30", -1 },
+ {"Thu, 01-Jan-1970 00:00:00 GMT", 0 },
+ {"Thu, 31-Dec-1969 23:59:58 GMT", -2 },
+ {"Thu, 31-Dec-1969 23:59:59 GMT", 0 }, /* avoids -1 ! */
#if SIZEOF_TIME_T > 4
- {"Sun, 06 Nov 2044 08:49:37 GMT", (time_t) 2362034977 },
- {"Sun, 06 Nov 3144 08:49:37 GMT", 37074617377 },
+ {"Sun, 06 Nov 2044 08:49:37 GMT", (time_t) 2362034977 },
+ {"Sun, 06 Nov 3144 08:49:37 GMT", 37074617377 },
#ifndef HAVE_TIME_T_UNSIGNED
#if 0
- /* causes warning on MSVC */
- {"Sun, 06 Nov 1900 08:49:37 GMT", -2182259423 },
+ /* causes warning on MSVC */
+ {"Sun, 06 Nov 1900 08:49:37 GMT", -2182259423 },
#endif
- {"Sun, 06 Nov 1800 08:49:37 GMT", -5337933023 },
- {"Thu, 01-Jan-1583 00:00:00 GMT", -12212553600 },
+ {"Sun, 06 Nov 1800 08:49:37 GMT", -5337933023 },
+ {"Thu, 01-Jan-1583 00:00:00 GMT", -12212553600 },
#endif
- {"Thu, 01-Jan-1499 00:00:00 GMT", -1 },
+ {"Thu, 01-Jan-1499 00:00:00 GMT", -1 },
#else
- {"Sun, 06 Nov 2044 08:49:37 GMT", -1 },
+ {"Sun, 06 Nov 2044 08:49:37 GMT", -1 },
#endif
#ifndef HAVE_TIME_T_UNSIGNED
- {"Sun, 06 Nov 1968 08:49:37 GMT", -36342623 },
+ {"Sun, 06 Nov 1968 08:49:37 GMT", -36342623 },
#endif
- { NULL, 0 }
-};
+ { NULL, 0 }
+ };
-CURLcode test(char *URL)
-{
int i;
int error = 0;
tests/libtest/lib518.c+119 -141
@@ -23,14 +23,11 @@
***************************************************************************/
#include "test.h"
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#include <limits.h>
+#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
@@ -38,9 +35,10 @@
#error "this test requires FD_SETSIZE"
#endif
-#define SAFETY_MARGIN (16)
+#define T518_SAFETY_MARGIN (16)
+
#define NUM_OPEN (FD_SETSIZE + 10)
-#define NUM_NEEDED (NUM_OPEN + SAFETY_MARGIN)
+#define NUM_NEEDED (NUM_OPEN + T518_SAFETY_MARGIN)
#if defined(_WIN32) || defined(MSDOS)
#define DEV_NULL "NUL"
@@ -50,31 +48,31 @@
#if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
-static int *testfd = NULL;
-static struct rlimit num_open;
-static char msgbuff[256];
+static int *t518_testfd = NULL;
+static struct rlimit t518_num_open;
+static char t518_msgbuff[256];
-static void store_errmsg(const char *msg, int err)
+static void t518_store_errmsg(const char *msg, int err)
{
if(!err)
- curl_msnprintf(msgbuff, sizeof(msgbuff), "%s", msg);
+ curl_msnprintf(t518_msgbuff, sizeof(t518_msgbuff), "%s", msg);
else
- curl_msnprintf(msgbuff, sizeof(msgbuff), "%s, errno %d, %s", msg,
- err, strerror(err));
+ curl_msnprintf(t518_msgbuff, sizeof(t518_msgbuff), "%s, errno %d, %s", msg,
+ err, strerror(err));
}
-static void close_file_descriptors(void)
+static void t518_close_file_descriptors(void)
{
- for(num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
- if(testfd[num_open.rlim_cur] > 0)
- close(testfd[num_open.rlim_cur]);
- free(testfd);
- testfd = NULL;
+ for(t518_num_open.rlim_cur = 0;
+ t518_num_open.rlim_cur < t518_num_open.rlim_max;
+ t518_num_open.rlim_cur++)
+ if(t518_testfd[t518_num_open.rlim_cur] > 0)
+ close(t518_testfd[t518_num_open.rlim_cur]);
+ free(t518_testfd);
+ t518_testfd = NULL;
}
-static int fopen_works(void)
+static int t518_fopen_works(void)
{
FILE *fpa[3];
int i;
@@ -86,8 +84,8 @@ static int fopen_works(void)
for(i = 0; i < 3; i++) {
fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
if(!fpa[i]) {
- store_errmsg("fopen failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t518_store_errmsg("fopen failed", errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
ret = 0;
break;
}
@@ -99,28 +97,7 @@ static int fopen_works(void)
return ret;
}
-static void rlim2str(char *buf, size_t len, rlim_t val)
-{
-#ifdef RLIM_INFINITY
- if(val == RLIM_INFINITY) {
- curl_msnprintf(buf, len, "INFINITY");
- return;
- }
-#endif
-#ifdef HAVE_LONGLONG
- if(sizeof(rlim_t) > sizeof(long))
- curl_msnprintf(buf, len, "%llu", (unsigned long long)val);
- else
-#endif
- {
- if(sizeof(rlim_t) < sizeof(long))
- curl_msnprintf(buf, len, "%u", (unsigned int)val);
- else
- curl_msnprintf(buf, len, "%lu", (unsigned long)val);
- }
-}
-
-static int test_rlimit(int keep_open)
+static int t518_test_rlimit(int keep_open)
{
rlim_t nitems, i;
int *memchunk = NULL;
@@ -132,17 +109,17 @@ static int test_rlimit(int keep_open)
/* get initial open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t518_store_errmsg("getrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
return -1;
}
/* show initial open file limits */
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
curl_mfprintf(stderr, "initial soft limit: %s\n", strbuff);
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
curl_mfprintf(stderr, "initial hard limit: %s\n", strbuff);
/* show our constants */
@@ -169,9 +146,9 @@ static int test_rlimit(int keep_open)
rl.rlim_cur = OPEN_MAX;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- msgbuff[0] = '\0';
+ t518_store_errmsg("setrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
+ t518_msgbuff[0] = '\0';
}
}
#endif
@@ -180,25 +157,25 @@ static int test_rlimit(int keep_open)
rl.rlim_cur = rl.rlim_max;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- msgbuff[0] = '\0';
+ t518_store_errmsg("setrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
+ t518_msgbuff[0] = '\0';
}
/* get current open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t518_store_errmsg("getrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
return -3;
}
/* show current open file limits */
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
curl_mfprintf(stderr, "current soft limit: %s\n", strbuff);
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
curl_mfprintf(stderr, "current hard limit: %s\n", strbuff);
} /* (rl.rlim_cur != rl.rlim_max) */
@@ -214,23 +191,23 @@ static int test_rlimit(int keep_open)
/*
* verify that soft limit is higher than NUM_NEEDED,
* which is the number of file descriptors we would
- * try to open plus SAFETY_MARGIN to not exhaust the
+ * try to open plus T518_SAFETY_MARGIN to not exhaust the
* file descriptor pool
*/
- num_open.rlim_cur = NUM_NEEDED;
+ t518_num_open.rlim_cur = NUM_NEEDED;
if((rl.rlim_cur > 0) &&
#ifdef RLIM_INFINITY
(rl.rlim_cur != RLIM_INFINITY) &&
#endif
- (rl.rlim_cur <= num_open.rlim_cur)) {
- rlim2str(strbuff2, sizeof(strbuff2), rl.rlim_cur);
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur);
+ (rl.rlim_cur <= t518_num_open.rlim_cur)) {
+ tutil_rlim2str(strbuff2, sizeof(strbuff2), rl.rlim_cur);
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t518_num_open.rlim_cur);
curl_msnprintf(strbuff, sizeof(strbuff), "fds needed %s > system limit %s",
- strbuff1, strbuff2);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ strbuff1, strbuff2);
+ t518_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
return -4;
}
@@ -239,7 +216,7 @@ static int test_rlimit(int keep_open)
* avoid a low memory condition once the file descriptors are
* open. System conditions that could make the test fail should
* be addressed in the precheck phase. This chunk of memory shall
- * be always free()ed before exiting the test_rlimit() function so
+ * be always free()ed before exiting the t518_test_rlimit() function so
* that it becomes available to the test.
*/
@@ -248,8 +225,8 @@ static int test_rlimit(int keep_open)
if(nitems > 0x7fff)
nitems = 0x40000;
do {
- num_open.rlim_max = sizeof(*memchunk) * nitems;
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ t518_num_open.rlim_max = sizeof(*memchunk) * nitems;
+ tutil_rlim2str(strbuff, sizeof(strbuff), t518_num_open.rlim_max);
curl_mfprintf(stderr, "allocating memchunk %s byte array\n", strbuff);
memchunk = malloc(sizeof(*memchunk) * (size_t)nitems);
if(!memchunk) {
@@ -258,8 +235,8 @@ static int test_rlimit(int keep_open)
}
} while(nitems && !memchunk);
if(!memchunk) {
- store_errmsg("memchunk, malloc() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t518_store_errmsg("memchunk, malloc() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
return -5;
}
@@ -272,30 +249,31 @@ static int test_rlimit(int keep_open)
/* set the number of file descriptors we will try to open */
- num_open.rlim_max = NUM_OPEN;
+ t518_num_open.rlim_max = NUM_OPEN;
/* verify that we won't overflow size_t in malloc() */
- if((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*testfd)) {
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_max);
+ if((size_t)(t518_num_open.rlim_max) > ((size_t)-1) / sizeof(*t518_testfd)) {
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t518_num_open.rlim_max);
curl_msnprintf(strbuff, sizeof(strbuff),
"unable to allocate an array for %s "
"file descriptors, would overflow size_t", strbuff1);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t518_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
free(memchunk);
return -6;
}
/* allocate array for file descriptors */
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), t518_num_open.rlim_max);
curl_mfprintf(stderr, "allocating array for %s file descriptors\n", strbuff);
- testfd = malloc(sizeof(*testfd) * (size_t)(num_open.rlim_max));
- if(!testfd) {
- store_errmsg("testfd, malloc() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t518_testfd = malloc(sizeof(*t518_testfd) *
+ (size_t)(t518_num_open.rlim_max));
+ if(!t518_testfd) {
+ t518_store_errmsg("testfd, malloc() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
free(memchunk);
return -7;
}
@@ -304,70 +282,70 @@ static int test_rlimit(int keep_open)
curl_mfprintf(stderr, "initializing testfd array\n");
- for(num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
- testfd[num_open.rlim_cur] = -1;
+ for(t518_num_open.rlim_cur = 0;
+ t518_num_open.rlim_cur < t518_num_open.rlim_max;
+ t518_num_open.rlim_cur++)
+ t518_testfd[t518_num_open.rlim_cur] = -1;
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), t518_num_open.rlim_max);
curl_mfprintf(stderr, "trying to open %s file descriptors\n", strbuff);
/* open a dummy descriptor */
- testfd[0] = open(DEV_NULL, O_RDONLY);
- if(testfd[0] < 0) {
+ t518_testfd[0] = open(DEV_NULL, O_RDONLY);
+ if(t518_testfd[0] < 0) {
curl_msnprintf(strbuff, sizeof(strbuff), "opening of %s failed", DEV_NULL);
- store_errmsg(strbuff, errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- free(testfd);
- testfd = NULL;
+ t518_store_errmsg(strbuff, errno);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
+ free(t518_testfd);
+ t518_testfd = NULL;
free(memchunk);
return -8;
}
/* create a bunch of file descriptors */
- for(num_open.rlim_cur = 1;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++) {
+ for(t518_num_open.rlim_cur = 1;
+ t518_num_open.rlim_cur < t518_num_open.rlim_max;
+ t518_num_open.rlim_cur++) {
- testfd[num_open.rlim_cur] = dup(testfd[0]);
+ t518_testfd[t518_num_open.rlim_cur] = dup(t518_testfd[0]);
- if(testfd[num_open.rlim_cur] < 0) {
+ if(t518_testfd[t518_num_open.rlim_cur] < 0) {
- testfd[num_open.rlim_cur] = -1;
+ t518_testfd[t518_num_open.rlim_cur] = -1;
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur);
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t518_num_open.rlim_cur);
curl_msnprintf(strbuff, sizeof(strbuff), "dup() attempt %s failed",
strbuff1);
curl_mfprintf(stderr, "%s\n", strbuff);
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur);
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t518_num_open.rlim_cur);
curl_msnprintf(strbuff, sizeof(strbuff),
"fds system limit seems close to %s", strbuff1);
curl_mfprintf(stderr, "%s\n", strbuff);
- num_open.rlim_max = NUM_NEEDED;
+ t518_num_open.rlim_max = NUM_NEEDED;
- rlim2str(strbuff2, sizeof(strbuff2), num_open.rlim_max);
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur);
+ tutil_rlim2str(strbuff2, sizeof(strbuff2), t518_num_open.rlim_max);
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t518_num_open.rlim_cur);
curl_msnprintf(strbuff, sizeof(strbuff),
"fds needed %s > system limit %s", strbuff2, strbuff1);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
-
- for(num_open.rlim_cur = 0;
- testfd[num_open.rlim_cur] >= 0;
- num_open.rlim_cur++)
- close(testfd[num_open.rlim_cur]);
- free(testfd);
- testfd = NULL;
+ t518_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
+
+ for(t518_num_open.rlim_cur = 0;
+ t518_testfd[t518_num_open.rlim_cur] >= 0;
+ t518_num_open.rlim_cur++)
+ close(t518_testfd[t518_num_open.rlim_cur]);
+ free(t518_testfd);
+ t518_testfd = NULL;
free(memchunk);
return -9;
}
}
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), t518_num_open.rlim_max);
curl_mfprintf(stderr, "%s file descriptors open\n", strbuff);
#if !defined(HAVE_POLL) && !defined(USE_WINSOCK)
@@ -383,28 +361,28 @@ static int test_rlimit(int keep_open)
* with an indication that select limit would be exceeded.
*/
- num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
- if(num_open.rlim_max > num_open.rlim_cur) {
+ t518_num_open.rlim_cur = FD_SETSIZE - T518_SAFETY_MARGIN;
+ if(t518_num_open.rlim_max > t518_num_open.rlim_cur) {
curl_msnprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
- FD_SETSIZE);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- close_file_descriptors();
+ FD_SETSIZE);
+ t518_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
+ t518_close_file_descriptors();
free(memchunk);
return -10;
}
- num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
+ t518_num_open.rlim_cur = FD_SETSIZE - T518_SAFETY_MARGIN;
for(rl.rlim_cur = 0;
- rl.rlim_cur < num_open.rlim_max;
+ rl.rlim_cur < t518_num_open.rlim_max;
rl.rlim_cur++) {
- if((testfd[rl.rlim_cur] > 0) &&
- ((unsigned int)testfd[rl.rlim_cur] > num_open.rlim_cur)) {
+ if((t518_testfd[rl.rlim_cur] > 0) &&
+ ((unsigned int)t518_testfd[rl.rlim_cur] > t518_num_open.rlim_cur)) {
curl_msnprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
- FD_SETSIZE);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- close_file_descriptors();
+ FD_SETSIZE);
+ t518_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
+ t518_close_file_descriptors();
free(memchunk);
return -11;
}
@@ -421,15 +399,15 @@ static int test_rlimit(int keep_open)
* if it is capable of fopen()ing some additional files.
*/
- if(!fopen_works()) {
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_max);
+ if(!t518_fopen_works()) {
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t518_num_open.rlim_max);
curl_msnprintf(strbuff, sizeof(strbuff), "fopen fails with %s fds open",
strbuff1);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ curl_mfprintf(stderr, "%s\n", t518_msgbuff);
curl_msnprintf(strbuff, sizeof(strbuff),
"fopen fails with lots of fds open");
- store_errmsg(strbuff, 0);
- close_file_descriptors();
+ t518_store_errmsg(strbuff, 0);
+ t518_close_file_descriptors();
free(memchunk);
return -12;
}
@@ -442,7 +420,7 @@ static int test_rlimit(int keep_open)
/* close file descriptors unless instructed to keep them */
if(!keep_open) {
- close_file_descriptors();
+ t518_close_file_descriptors();
}
return 0;
@@ -455,14 +433,14 @@ CURLcode test(char *URL)
if(!strcmp(URL, "check")) {
/* used by the test script to ask if we can run this test or not */
- if(test_rlimit(FALSE)) {
- curl_mfprintf(stdout, "test_rlimit problem: %s\n", msgbuff);
+ if(t518_test_rlimit(FALSE)) {
+ curl_mfprintf(stdout, "test_rlimit problem: %s\n", t518_msgbuff);
return TEST_ERR_FAILURE;
}
return CURLE_OK; /* sure, run this! */
}
- if(test_rlimit(TRUE)) {
+ if(t518_test_rlimit(TRUE)) {
/* failure */
return TEST_ERR_MAJOR_BAD;
}
@@ -472,14 +450,14 @@ CURLcode test(char *URL)
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
curl_mfprintf(stderr, "curl_global_init() failed\n");
- close_file_descriptors();
+ t518_close_file_descriptors();
return TEST_ERR_MAJOR_BAD;
}
curl = curl_easy_init();
if(!curl) {
curl_mfprintf(stderr, "curl_easy_init() failed\n");
- close_file_descriptors();
+ t518_close_file_descriptors();
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
@@ -491,7 +469,7 @@ CURLcode test(char *URL)
test_cleanup:
- close_file_descriptors();
+ t518_close_file_descriptors();
curl_easy_cleanup(curl);
curl_global_cleanup();
tests/libtest/lib525.c+0 -2
@@ -29,8 +29,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib526.c+0 -4
@@ -48,10 +48,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-#define NUM_HANDLES 4
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib530.c+35 -33
@@ -36,22 +36,21 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-struct Sockets {
+struct t530_Sockets {
curl_socket_t *sockets;
int count; /* number of sockets actually stored in array */
int max_count; /* max number of sockets that fit in allocated array */
};
-struct ReadWriteSockets {
- struct Sockets read, write;
+struct t530_ReadWriteSockets {
+ struct t530_Sockets read, write;
};
/**
* Remove a file descriptor from a sockets array.
*/
-static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention)
+static void t530_removeFd(struct t530_Sockets *sockets, curl_socket_t fd,
+ int mention)
{
int i;
@@ -72,14 +71,15 @@ static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention)
* Add a file descriptor to a sockets array.
* Return 0 on success, 1 on error.
*/
-static int addFd(struct Sockets *sockets, curl_socket_t fd, const char *what)
+static int t530_addFd(struct t530_Sockets *sockets, curl_socket_t fd,
+ const char *what)
{
/**
* To ensure we only have each file descriptor once, we remove it then add
* it again.
*/
curl_mfprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what);
- removeFd(sockets, fd, 0);
+ t530_removeFd(sockets, fd, 0);
/*
* Allocate array storage when required.
*/
@@ -112,10 +112,10 @@ static int socket_calls = 0;
/**
* Callback invoked by curl to poll reading / writing of a socket.
*/
-static int curlSocketCallback(CURL *easy, curl_socket_t s, int action,
- void *userp, void *socketp)
+static int t530_curlSocketCallback(CURL *easy, curl_socket_t s, int action,
+ void *userp, void *socketp)
{
- struct ReadWriteSockets *sockets = userp;
+ struct t530_ReadWriteSockets *sockets = userp;
(void)easy; /* unused */
(void)socketp; /* unused */
@@ -128,16 +128,16 @@ static int curlSocketCallback(CURL *easy, curl_socket_t s, int action,
}
if(action == CURL_POLL_IN || action == CURL_POLL_INOUT)
- if(addFd(&sockets->read, s, "read"))
+ if(t530_addFd(&sockets->read, s, "read"))
return -1; /* bail out */
if(action == CURL_POLL_OUT || action == CURL_POLL_INOUT)
- if(addFd(&sockets->write, s, "write"))
+ if(t530_addFd(&sockets->write, s, "write"))
return -1;
if(action == CURL_POLL_REMOVE) {
- removeFd(&sockets->read, s, 1);
- removeFd(&sockets->write, s, 0);
+ t530_removeFd(&sockets->read, s, 1);
+ t530_removeFd(&sockets->write, s, 0);
}
return 0;
@@ -149,7 +149,7 @@ static int timer_calls = 0;
/**
* Callback invoked by curl to set a timeout.
*/
-static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
+static int t530_curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
{
struct timeval *timeout = userp;
@@ -172,7 +172,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
/**
* Check for curl completion.
*/
-static int checkForCompletion(CURLM *curl, int *success)
+static int t530_checkForCompletion(CURLM *curl, int *success)
{
int result = 0;
*success = 0;
@@ -198,7 +198,7 @@ static int checkForCompletion(CURLM *curl, int *success)
return result;
}
-static int getMicroSecondTimeout(struct timeval *timeout)
+static int t530_getMicroSecondTimeout(struct timeval *timeout)
{
struct timeval now;
ssize_t result;
@@ -214,8 +214,8 @@ static int getMicroSecondTimeout(struct timeval *timeout)
/**
* Update a fd_set with all of the sockets in use.
*/
-static void updateFdSet(struct Sockets *sockets, fd_set* fdset,
- curl_socket_t *maxFd)
+static void t530_updateFdSet(struct t530_Sockets *sockets, fd_set* fdset,
+ curl_socket_t *maxFd)
{
int i;
for(i = 0; i < sockets->count; ++i) {
@@ -248,9 +248,8 @@ static int socket_action(CURLM *curl, curl_socket_t s, int evBitmask,
/**
* Invoke curl when a file descriptor is set.
*/
-static int checkFdSet(CURLM *curl,
- struct Sockets *sockets, fd_set *fdset,
- int evBitmask, const char *name)
+static int t530_checkFdSet(CURLM *curl, struct t530_Sockets *sockets,
+ fd_set *fdset, int evBitmask, const char *name)
{
int i;
int result = 0;
@@ -268,7 +267,7 @@ static CURLcode testone(char *URL, int timercb, int socketcb)
{
CURLcode res = CURLE_OK;
CURL *curl = NULL; CURLM *m = NULL;
- struct ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
+ struct t530_ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
int success = 0;
struct timeval timeout = {0};
timeout.tv_sec = (time_t)-1;
@@ -296,10 +295,10 @@ static CURLcode testone(char *URL, int timercb, int socketcb)
multi_init(m);
- multi_setopt(m, CURLMOPT_SOCKETFUNCTION, curlSocketCallback);
+ multi_setopt(m, CURLMOPT_SOCKETFUNCTION, t530_curlSocketCallback);
multi_setopt(m, CURLMOPT_SOCKETDATA, &sockets);
- multi_setopt(m, CURLMOPT_TIMERFUNCTION, curlTimerCallback);
+ multi_setopt(m, CURLMOPT_TIMERFUNCTION, t530_curlTimerCallback);
multi_setopt(m, CURLMOPT_TIMERDATA, &timeout);
multi_add_handle(m, curl);
@@ -309,7 +308,7 @@ static CURLcode testone(char *URL, int timercb, int socketcb)
goto test_cleanup;
}
- while(!checkForCompletion(m, &success)) {
+ while(!t530_checkForCompletion(m, &success)) {
fd_set readSet, writeSet;
curl_socket_t maxFd = 0;
struct timeval tv = {0};
@@ -317,11 +316,11 @@ static CURLcode testone(char *URL, int timercb, int socketcb)
FD_ZERO(&readSet);
FD_ZERO(&writeSet);
- updateFdSet(&sockets.read, &readSet, &maxFd);
- updateFdSet(&sockets.write, &writeSet, &maxFd);
+ t530_updateFdSet(&sockets.read, &readSet, &maxFd);
+ t530_updateFdSet(&sockets.write, &writeSet, &maxFd);
if(timeout.tv_sec != (time_t)-1) {
- int usTimeout = getMicroSecondTimeout(&timeout);
+ int usTimeout = t530_getMicroSecondTimeout(&timeout);
tv.tv_sec = usTimeout / 1000000;
tv.tv_usec = usTimeout % 1000000;
}
@@ -334,16 +333,19 @@ static CURLcode testone(char *URL, int timercb, int socketcb)
select_test((int)maxFd, &readSet, &writeSet, NULL, &tv);
/* Check the sockets for reading / writing */
- if(checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read")) {
+ if(t530_checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN,
+ "read")) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
- if(checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write")) {
+ if(t530_checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT,
+ "write")) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
- if(timeout.tv_sec != (time_t)-1 && getMicroSecondTimeout(&timeout) == 0) {
+ if(timeout.tv_sec != (time_t)-1 &&
+ t530_getMicroSecondTimeout(&timeout) == 0) {
/* Curl's timer has elapsed. */
if(socket_action(m, CURL_SOCKET_TIMEOUT, 0, "timeout")) {
res = TEST_ERR_BAD_TIMEOUT;
tests/libtest/lib533.c+0 -2
@@ -31,8 +31,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib537.c+113 -135
@@ -23,14 +23,11 @@
***************************************************************************/
#include "test.h"
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#include <limits.h>
+#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
@@ -38,7 +35,7 @@
#error "this test requires FD_SETSIZE"
#endif
-#define SAFETY_MARGIN (11)
+#define T537_SAFETY_MARGIN (11)
#if defined(_WIN32) || defined(MSDOS)
#define DEV_NULL "NUL"
@@ -48,31 +45,31 @@
#if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
-static int *testfd = NULL;
-static struct rlimit num_open;
-static char msgbuff[256];
+static int *t537_testfd = NULL;
+static struct rlimit t537_num_open;
+static char t537_msgbuff[256];
-static void store_errmsg(const char *msg, int err)
+static void t537_store_errmsg(const char *msg, int err)
{
if(!err)
- curl_msnprintf(msgbuff, sizeof(msgbuff), "%s", msg);
+ curl_msnprintf(t537_msgbuff, sizeof(t537_msgbuff), "%s", msg);
else
- curl_msnprintf(msgbuff, sizeof(msgbuff), "%s, errno %d, %s", msg,
- err, strerror(err));
+ curl_msnprintf(t537_msgbuff, sizeof(t537_msgbuff), "%s, errno %d, %s", msg,
+ err, strerror(err));
}
-static void close_file_descriptors(void)
+static void t537_close_file_descriptors(void)
{
- for(num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
- if(testfd[num_open.rlim_cur] > 0)
- close(testfd[num_open.rlim_cur]);
- free(testfd);
- testfd = NULL;
+ for(t537_num_open.rlim_cur = 0;
+ t537_num_open.rlim_cur < t537_num_open.rlim_max;
+ t537_num_open.rlim_cur++)
+ if(t537_testfd[t537_num_open.rlim_cur] > 0)
+ close(t537_testfd[t537_num_open.rlim_cur]);
+ free(t537_testfd);
+ t537_testfd = NULL;
}
-static int fopen_works(void)
+static int t537_fopen_works(void)
{
FILE *fpa[3];
int i;
@@ -84,8 +81,8 @@ static int fopen_works(void)
for(i = 0; i < 3; i++) {
fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
if(!fpa[i]) {
- store_errmsg("fopen failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t537_store_errmsg("fopen failed", errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
ret = 0;
break;
}
@@ -97,28 +94,7 @@ static int fopen_works(void)
return ret;
}
-static void rlim2str(char *buf, size_t len, rlim_t val)
-{
-#ifdef RLIM_INFINITY
- if(val == RLIM_INFINITY) {
- curl_msnprintf(buf, len, "INFINITY");
- return;
- }
-#endif
-#ifdef HAVE_LONGLONG
- if(sizeof(rlim_t) > sizeof(long))
- curl_msnprintf(buf, len, "%llu", (unsigned long long)val);
- else
-#endif
- {
- if(sizeof(rlim_t) < sizeof(long))
- curl_msnprintf(buf, len, "%u", (unsigned int)val);
- else
- curl_msnprintf(buf, len, "%lu", (unsigned long)val);
- }
-}
-
-static int test_rlimit(int keep_open)
+static int t537_test_rlimit(int keep_open)
{
int *tmpfd;
rlim_t nitems, i;
@@ -130,17 +106,17 @@ static int test_rlimit(int keep_open)
/* get initial open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t537_store_errmsg("getrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
return -1;
}
/* show initial open file limits */
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
curl_mfprintf(stderr, "initial soft limit: %s\n", strbuff);
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
curl_mfprintf(stderr, "initial hard limit: %s\n", strbuff);
/* If the OS allows a HUGE number of open files, we do not run.
@@ -171,9 +147,9 @@ static int test_rlimit(int keep_open)
rl.rlim_cur = OPEN_MAX;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- msgbuff[0] = '\0';
+ t537_store_errmsg("setrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
+ t537_msgbuff[0] = '\0';
}
}
#endif
@@ -182,25 +158,25 @@ static int test_rlimit(int keep_open)
rl.rlim_cur = rl.rlim_max;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- msgbuff[0] = '\0';
+ t537_store_errmsg("setrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
+ t537_msgbuff[0] = '\0';
}
/* get current open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t537_store_errmsg("getrlimit() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
return -3;
}
/* show current open file limits */
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur);
curl_mfprintf(stderr, "current soft limit: %s\n", strbuff);
- rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), rl.rlim_max);
curl_mfprintf(stderr, "current hard limit: %s\n", strbuff);
} /* (rl.rlim_cur != rl.rlim_max) */
@@ -229,8 +205,8 @@ static int test_rlimit(int keep_open)
if(nitems > 0x7fff)
nitems = 0x40000;
do {
- num_open.rlim_max = sizeof(*memchunk) * nitems;
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ t537_num_open.rlim_max = sizeof(*memchunk) * nitems;
+ tutil_rlim2str(strbuff, sizeof(strbuff), t537_num_open.rlim_max);
curl_mfprintf(stderr, "allocating memchunk %s byte array\n", strbuff);
memchunk = malloc(sizeof(*memchunk) * (size_t)nitems);
if(!memchunk) {
@@ -239,8 +215,8 @@ static int test_rlimit(int keep_open)
}
} while(nitems && !memchunk);
if(!memchunk) {
- store_errmsg("memchunk, malloc() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t537_store_errmsg("memchunk, malloc() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
return -4;
}
@@ -258,8 +234,8 @@ static int test_rlimit(int keep_open)
#else
if(rl.rlim_cur > 0) {
#endif
- /* soft limit minus SAFETY_MARGIN */
- num_open.rlim_max = rl.rlim_cur - SAFETY_MARGIN;
+ /* soft limit minus T537_SAFETY_MARGIN */
+ t537_num_open.rlim_max = rl.rlim_cur - T537_SAFETY_MARGIN;
}
else {
/* a huge number of file descriptors */
@@ -267,18 +243,18 @@ static int test_rlimit(int keep_open)
nitems = i;
if(nitems > 0x7fff)
nitems = 0x40000;
- num_open.rlim_max = nitems;
+ t537_num_open.rlim_max = nitems;
}
/* verify that we won't overflow size_t in malloc() */
- if((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*testfd)) {
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_max);
+ if((size_t)(t537_num_open.rlim_max) > ((size_t)-1) / sizeof(*t537_testfd)) {
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t537_num_open.rlim_max);
curl_msnprintf(strbuff, sizeof(strbuff),
"unable to allocate an array for %s "
"file descriptors, would overflow size_t", strbuff1);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ t537_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
free(memchunk);
return -5;
}
@@ -286,19 +262,20 @@ static int test_rlimit(int keep_open)
/* allocate array for file descriptors */
do {
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), t537_num_open.rlim_max);
curl_mfprintf(stderr, "allocating array for %s file descriptors\n",
strbuff);
- testfd = malloc(sizeof(*testfd) * (size_t)(num_open.rlim_max));
- if(!testfd) {
+ t537_testfd = malloc(sizeof(*t537_testfd) *
+ (size_t)(t537_num_open.rlim_max));
+ if(!t537_testfd) {
curl_mfprintf(stderr, "testfd, malloc() failed\n");
- num_open.rlim_max /= 2;
+ t537_num_open.rlim_max /= 2;
}
- } while(num_open.rlim_max && !testfd);
- if(!testfd) {
- store_errmsg("testfd, malloc() failed", errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ } while(t537_num_open.rlim_max && !t537_testfd);
+ if(!t537_testfd) {
+ t537_store_errmsg("testfd, malloc() failed", errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
free(memchunk);
return -6;
}
@@ -307,73 +284,74 @@ static int test_rlimit(int keep_open)
curl_mfprintf(stderr, "initializing testfd array\n");
- for(num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
- testfd[num_open.rlim_cur] = -1;
+ for(t537_num_open.rlim_cur = 0;
+ t537_num_open.rlim_cur < t537_num_open.rlim_max;
+ t537_num_open.rlim_cur++)
+ t537_testfd[t537_num_open.rlim_cur] = -1;
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), t537_num_open.rlim_max);
curl_mfprintf(stderr, "trying to open %s file descriptors\n", strbuff);
/* open a dummy descriptor */
- testfd[0] = open(DEV_NULL, O_RDONLY);
- if(testfd[0] < 0) {
+ t537_testfd[0] = open(DEV_NULL, O_RDONLY);
+ if(t537_testfd[0] < 0) {
curl_msnprintf(strbuff, sizeof(strbuff), "opening of %s failed", DEV_NULL);
- store_errmsg(strbuff, errno);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- free(testfd);
- testfd = NULL;
+ t537_store_errmsg(strbuff, errno);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
+ free(t537_testfd);
+ t537_testfd = NULL;
free(memchunk);
return -7;
}
/* create a bunch of file descriptors */
- for(num_open.rlim_cur = 1;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++) {
+ for(t537_num_open.rlim_cur = 1;
+ t537_num_open.rlim_cur < t537_num_open.rlim_max;
+ t537_num_open.rlim_cur++) {
- testfd[num_open.rlim_cur] = dup(testfd[0]);
+ t537_testfd[t537_num_open.rlim_cur] = dup(t537_testfd[0]);
- if(testfd[num_open.rlim_cur] < 0) {
+ if(t537_testfd[t537_num_open.rlim_cur] < 0) {
- testfd[num_open.rlim_cur] = -1;
+ t537_testfd[t537_num_open.rlim_cur] = -1;
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur);
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t537_num_open.rlim_cur);
curl_msnprintf(strbuff, sizeof(strbuff), "dup() attempt %s failed",
strbuff1);
curl_mfprintf(stderr, "%s\n", strbuff);
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur);
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t537_num_open.rlim_cur);
curl_msnprintf(strbuff, sizeof(strbuff),
"fds system limit seems close to %s", strbuff1);
curl_mfprintf(stderr, "%s\n", strbuff);
- num_open.rlim_max = num_open.rlim_cur - SAFETY_MARGIN;
+ t537_num_open.rlim_max = t537_num_open.rlim_cur - T537_SAFETY_MARGIN;
- num_open.rlim_cur -= num_open.rlim_max;
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur);
+ t537_num_open.rlim_cur -= t537_num_open.rlim_max;
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t537_num_open.rlim_cur);
curl_msnprintf(strbuff, sizeof(strbuff), "closing %s file descriptors",
strbuff1);
curl_mfprintf(stderr, "%s\n", strbuff);
- for(num_open.rlim_cur = num_open.rlim_max;
- testfd[num_open.rlim_cur] >= 0;
- num_open.rlim_cur++) {
- close(testfd[num_open.rlim_cur]);
- testfd[num_open.rlim_cur] = -1;
+ for(t537_num_open.rlim_cur = t537_num_open.rlim_max;
+ t537_testfd[t537_num_open.rlim_cur] >= 0;
+ t537_num_open.rlim_cur++) {
+ close(t537_testfd[t537_num_open.rlim_cur]);
+ t537_testfd[t537_num_open.rlim_cur] = -1;
}
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), t537_num_open.rlim_max);
curl_mfprintf(stderr, "shrinking array for %s file descriptors\n",
strbuff);
/* we don't care if we can't shrink it */
- tmpfd = realloc(testfd, sizeof(*testfd) * (size_t)(num_open.rlim_max));
+ tmpfd = realloc(t537_testfd,
+ sizeof(*t537_testfd) * (size_t)(t537_num_open.rlim_max));
if(tmpfd) {
- testfd = tmpfd;
+ t537_testfd = tmpfd;
tmpfd = NULL;
}
@@ -381,7 +359,7 @@ static int test_rlimit(int keep_open)
}
}
- rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max);
+ tutil_rlim2str(strbuff, sizeof(strbuff), t537_num_open.rlim_max);
curl_mfprintf(stderr, "%s file descriptors open\n", strbuff);
#if !defined(HAVE_POLL) && !defined(USE_WINSOCK)
@@ -397,28 +375,28 @@ static int test_rlimit(int keep_open)
* with an indication that select limit would be exceeded.
*/
- num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
- if(num_open.rlim_max > num_open.rlim_cur) {
+ t537_num_open.rlim_cur = FD_SETSIZE - T537_SAFETY_MARGIN;
+ if(t537_num_open.rlim_max > t537_num_open.rlim_cur) {
curl_msnprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
- FD_SETSIZE);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- close_file_descriptors();
+ FD_SETSIZE);
+ t537_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
+ t537_close_file_descriptors();
free(memchunk);
return -8;
}
- num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
+ t537_num_open.rlim_cur = FD_SETSIZE - T537_SAFETY_MARGIN;
for(rl.rlim_cur = 0;
- rl.rlim_cur < num_open.rlim_max;
+ rl.rlim_cur < t537_num_open.rlim_max;
rl.rlim_cur++) {
- if((testfd[rl.rlim_cur] > 0) &&
- ((unsigned int)testfd[rl.rlim_cur] > num_open.rlim_cur)) {
+ if((t537_testfd[rl.rlim_cur] > 0) &&
+ ((unsigned int)t537_testfd[rl.rlim_cur] > t537_num_open.rlim_cur)) {
curl_msnprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
- FD_SETSIZE);
- store_errmsg(strbuff, 0);
- curl_mfprintf(stderr, "%s\n", msgbuff);
- close_file_descriptors();
+ FD_SETSIZE);
+ t537_store_errmsg(strbuff, 0);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
+ t537_close_file_descriptors();
free(memchunk);
return -9;
}
@@ -435,15 +413,15 @@ static int test_rlimit(int keep_open)
* if it is capable of fopen()ing some additional files.
*/
- if(!fopen_works()) {
- rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_max);
+ if(!t537_fopen_works()) {
+ tutil_rlim2str(strbuff1, sizeof(strbuff1), t537_num_open.rlim_max);
curl_msnprintf(strbuff, sizeof(strbuff), "fopen fails with %s fds open",
strbuff1);
- curl_mfprintf(stderr, "%s\n", msgbuff);
+ curl_mfprintf(stderr, "%s\n", t537_msgbuff);
curl_msnprintf(strbuff, sizeof(strbuff),
"fopen fails with lots of fds open");
- store_errmsg(strbuff, 0);
- close_file_descriptors();
+ t537_store_errmsg(strbuff, 0);
+ t537_close_file_descriptors();
free(memchunk);
return -10;
}
@@ -456,7 +434,7 @@ static int test_rlimit(int keep_open)
/* close file descriptors unless instructed to keep them */
if(!keep_open) {
- close_file_descriptors();
+ t537_close_file_descriptors();
}
return 0;
@@ -469,14 +447,14 @@ CURLcode test(char *URL)
if(!strcmp(URL, "check")) {
/* used by the test script to ask if we can run this test or not */
- if(test_rlimit(FALSE)) {
- curl_mfprintf(stdout, "test_rlimit problem: %s\n", msgbuff);
+ if(t537_test_rlimit(FALSE)) {
+ curl_mfprintf(stdout, "test_rlimit problem: %s\n", t537_msgbuff);
return TEST_ERR_FAILURE;
}
return CURLE_OK; /* sure, run this! */
}
- if(test_rlimit(TRUE)) {
+ if(t537_test_rlimit(TRUE)) {
/* failure */
return TEST_ERR_MAJOR_BAD;
}
@@ -486,14 +464,14 @@ CURLcode test(char *URL)
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
curl_mfprintf(stderr, "curl_global_init() failed\n");
- close_file_descriptors();
+ t537_close_file_descriptors();
return TEST_ERR_MAJOR_BAD;
}
curl = curl_easy_init();
if(!curl) {
curl_mfprintf(stderr, "curl_easy_init() failed\n");
- close_file_descriptors();
+ t537_close_file_descriptors();
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
@@ -505,7 +483,7 @@ CURLcode test(char *URL)
test_cleanup:
- close_file_descriptors();
+ t537_close_file_descriptors();
curl_easy_cleanup(curl);
curl_global_cleanup();
tests/libtest/lib540.c+1 -2
@@ -38,12 +38,11 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
#define PROXY libtest_arg2
#define PROXYUSERPWD libtest_arg3
#define HOST test_argv[4]
+#undef NUM_HANDLES
#define NUM_HANDLES 2
static CURL *testeh[NUM_HANDLES];
tests/libtest/lib544.c+10 -6
@@ -25,17 +25,21 @@
#include "memdebug.h"
-static char teststring[] =
-{ 'T', 'h', 'i', 's', '\0', ' ', 'i', 's', ' ', 't', 'e', 's', 't', ' ',
- 'b', 'i', 'n', 'a', 'r', 'y', ' ', 'd', 'a', 't', 'a', ' ',
- 'w', 'i', 't', 'h', ' ', 'a', 'n', ' ',
- 'e', 'm', 'b', 'e', 'd', 'd', 'e', 'd', ' ', 'N', 'U', 'L'};
-
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
+ static const char teststring_init[] = {
+ 'T', 'h', 'i', 's', '\0', ' ', 'i', 's', ' ', 't', 'e', 's', 't', ' ',
+ 'b', 'i', 'n', 'a', 'r', 'y', ' ', 'd', 'a', 't', 'a', ' ',
+ 'w', 'i', 't', 'h', ' ', 'a', 'n', ' ',
+ 'e', 'm', 'b', 'e', 'd', 'd', 'e', 'd', ' ', 'N', 'U', 'L'};
+
+ char teststring[sizeof(teststring_init)];
+
+ memcpy(teststring, teststring_init, sizeof(teststring_init));
+
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
curl_mfprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
tests/libtest/lib547.c+5 -12
@@ -33,10 +33,7 @@
#define UPLOADTHIS "this is the blurb we want to upload\n"
#ifndef LIB548
-static size_t readcallback(char *ptr,
- size_t size,
- size_t nmemb,
- void *clientp)
+static size_t t547_read_cb(char *ptr, size_t size, size_t nmemb, void *clientp)
{
int *counter = (int *)clientp;
@@ -55,9 +52,8 @@ static size_t readcallback(char *ptr,
curl_mfprintf(stderr, "READ NOT FINE!\n");
return 0;
}
-static curlioerr ioctlcallback(CURL *handle,
- int cmd,
- void *clientp)
+
+static curlioerr t547_ioctl_callback(CURL *handle, int cmd, void *clientp)
{
int *counter = (int *)clientp;
(void)handle; /* unused */
@@ -67,9 +63,6 @@ static curlioerr ioctlcallback(CURL *handle,
}
return CURLIOE_OK;
}
-
-
-
#endif
CURLcode test(char *URL)
@@ -100,10 +93,10 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POSTFIELDS, UPLOADTHIS);
#else
/* 547 style, which means reading the POST data from a callback */
- test_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback);
+ test_setopt(curl, CURLOPT_IOCTLFUNCTION, t547_ioctl_callback);
test_setopt(curl, CURLOPT_IOCTLDATA, &counter);
- test_setopt(curl, CURLOPT_READFUNCTION, readcallback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t547_read_cb);
test_setopt(curl, CURLOPT_READDATA, &counter);
/* We CANNOT do the POST fine without setting the size (or choose
chunked)! */
tests/libtest/lib552.c+13 -21
@@ -30,14 +30,13 @@
#include "warnless.h"
#include "memdebug.h"
-struct testdata {
+struct t552_testdata {
char trace_ascii; /* 1 or 0 */
};
-static
-void dump(const char *text,
- FILE *stream, unsigned char *ptr, size_t size,
- char nohex)
+static void dump(const char *text,
+ FILE *stream, unsigned char *ptr, size_t size,
+ char nohex)
{
size_t i;
size_t c;
@@ -84,12 +83,11 @@ void dump(const char *text,
fflush(stream);
}
-static
-int my_trace(CURL *handle, curl_infotype type,
- char *data, size_t size,
- void *userp)
+static int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
{
- struct testdata *config = (struct testdata *)userp;
+ struct t552_testdata *config = (struct t552_testdata *)userp;
const char *text;
(void)handle; /* prevent compiler warning */
@@ -123,12 +121,11 @@ int my_trace(CURL *handle, curl_infotype type,
return 0;
}
-
static size_t current_offset = 0;
static char databuf[70000]; /* MUST be more than 64k OR
MAX_INITIAL_POST_SIZE */
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+static size_t t552_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
size_t available = sizeof(databuf) - current_offset; /* What we have to
@@ -140,9 +137,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
return given;
}
-
-static size_t write_callback(char *ptr, size_t size, size_t nmemb,
- void *stream)
+static size_t t552_write_cb(char *ptr, size_t size, size_t nmemb, void *stream)
{
int amount = curlx_uztosi(size * nmemb);
curl_mprintf("%.*s", amount, (char *)ptr);
@@ -150,7 +145,6 @@ static size_t write_callback(char *ptr, size_t size, size_t nmemb,
return size * nmemb;
}
-
static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp)
{
(void)clientp;
@@ -164,13 +158,11 @@ static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp)
return CURLIOE_UNKNOWNCMD;
}
-
-
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
- struct testdata config;
+ struct t552_testdata config;
size_t i;
static const char fill[] = "test data";
@@ -193,10 +185,10 @@ CURLcode test(char *URL)
/* Setup read callback */
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof(databuf));
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t552_read_cb);
/* Write callback */
- test_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
+ test_setopt(curl, CURLOPT_WRITEFUNCTION, t552_write_cb);
/* Ioctl function */
test_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctl_callback);
tests/libtest/lib553.c+2 -2
@@ -55,10 +55,10 @@ static size_t myreadfunc(char *ptr, size_t size, size_t nmemb, void *stream)
#define NUM_HEADERS 8
#define SIZE_HEADERS 5000
-static char testbuf[SIZE_HEADERS + 100];
-
CURLcode test(char *URL)
{
+ static char testbuf[SIZE_HEADERS + 100];
+
CURL *curl;
CURLcode res = CURLE_FAILED_INIT;
int i;
tests/libtest/lib554.c+13 -22
@@ -25,25 +25,14 @@
#include "memdebug.h"
-static char testdata[]=
- "this is what we post to the silly web server\n";
-
-struct WriteThis {
- char *readptr;
+struct t554_WriteThis {
+ const char *readptr;
size_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t554_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
-#ifdef LIB587
- (void)ptr;
- (void)size;
- (void)nmemb;
- (void)userp;
- return CURL_READFUNC_ABORT;
-#else
-
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t554_WriteThis *pooh = (struct t554_WriteThis *)userp;
if(size*nmemb < 1)
return 0;
@@ -56,19 +45,21 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
}
return 0; /* no more data left to deliver */
-#endif
}
-static CURLcode test_once(char *URL, bool oldstyle)
+static CURLcode t554_test_once(char *URL, bool oldstyle)
{
+ static const char testdata[] =
+ "this is what we post to the silly web server\n";
+
CURL *curl;
CURLcode res = CURLE_OK;
CURLFORMcode formrc;
struct curl_httppost *formpost = NULL;
struct curl_httppost *lastptr = NULL;
- struct WriteThis pooh;
- struct WriteThis pooh2;
+ struct t554_WriteThis pooh;
+ struct t554_WriteThis pooh2;
pooh.readptr = testdata;
pooh.sizeleft = strlen(testdata);
@@ -162,7 +153,7 @@ static CURLcode test_once(char *URL, bool oldstyle)
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
/* we want to use our own read function */
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t554_read_cb);
/* send a multi-part formpost */
test_setopt(curl, CURLOPT_HTTPPOST, formpost);
@@ -196,9 +187,9 @@ CURLcode test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- res = test_once(URL, TRUE); /* old */
+ res = t554_test_once(URL, TRUE); /* old */
if(!res)
- res = test_once(URL, FALSE); /* new */
+ res = t554_test_once(URL, FALSE); /* new */
curl_global_cleanup();
tests/libtest/lib555.c+6 -13
@@ -35,15 +35,9 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
+static const char uploadthis[] = "this is the blurb we want to upload\n";
-static const char uploadthis[] =
- "this is the blurb we want to upload\n";
-
-static size_t readcallback(char *ptr,
- size_t size,
- size_t nmemb,
- void *clientp)
+static size_t t555_read_cb(char *ptr, size_t size, size_t nmemb, void *clientp)
{
int *counter = (int *)clientp;
@@ -62,9 +56,8 @@ static size_t readcallback(char *ptr,
curl_mfprintf(stderr, "READ NOT FINE!\n");
return 0;
}
-static curlioerr ioctlcallback(CURL *handle,
- int cmd,
- void *clientp)
+
+static curlioerr t555_ioctl_callback(CURL *handle, int cmd, void *clientp)
{
int *counter = (int *)clientp;
(void)handle; /* unused */
@@ -95,10 +88,10 @@ CURLcode test(char *URL)
easy_setopt(curl, CURLOPT_HEADER, 1L);
/* read the POST data from a callback */
- easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback);
+ easy_setopt(curl, CURLOPT_IOCTLFUNCTION, t555_ioctl_callback);
easy_setopt(curl, CURLOPT_IOCTLDATA, &counter);
- easy_setopt(curl, CURLOPT_READFUNCTION, readcallback);
+ easy_setopt(curl, CURLOPT_READFUNCTION, t555_read_cb);
easy_setopt(curl, CURLOPT_READDATA, &counter);
/* We CANNOT do the POST fine without setting the size (or choose
chunked)! */
tests/libtest/lib560.c+0 -2
@@ -27,8 +27,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
/*
* Simply download an HTTPS file!
*
tests/libtest/lib564.c+0 -2
@@ -29,8 +29,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
tests/libtest/lib568.c+5 -10
@@ -30,14 +30,9 @@
#include <fcntl.h>
#endif
+#include "testutil.h"
#include "memdebug.h"
-/* build request url */
-static char *suburl(const char *base, int i)
-{
- return curl_maprintf("%s%.4d", base, i);
-}
-
/*
* Test the Client->Server ANNOUNCE functionality (PUT style)
*/
@@ -69,7 +64,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -110,7 +105,7 @@ CURLcode test(char *URL)
sdpf = NULL;
/* Make sure we can do a normal request now */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -126,7 +121,7 @@ CURLcode test(char *URL)
/* Now do a POST style one */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -156,7 +151,7 @@ CURLcode test(char *URL)
custom_headers = NULL;
/* Make sure we can do a normal request now */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
tests/libtest/lib569.c+4 -8
@@ -22,13 +22,9 @@
*
***************************************************************************/
#include "test.h"
-#include "memdebug.h"
-/* build request url */
-static char *suburl(const char *base, int i)
-{
- return curl_maprintf("%s%.4d", base, i);
-}
+#include "testutil.h"
+#include "memdebug.h"
/*
* Test Session ID capture
@@ -79,7 +75,7 @@ CURLcode test(char *URL)
/* Go through the various Session IDs */
for(i = 0; i < 3; i++) {
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -99,7 +95,7 @@ CURLcode test(char *URL)
curl_mfprintf(idfile, "Got Session ID: [%s]\n", rtsp_session_id);
rtsp_session_id = NULL;
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
tests/libtest/lib570.c+5 -9
@@ -22,13 +22,9 @@
*
***************************************************************************/
#include "test.h"
-#include "memdebug.h"
-/* build request url */
-static char *suburl(const char *base, int i)
-{
- return curl_maprintf("%s%.4d", base, i);
-}
+#include "testutil.h"
+#include "memdebug.h"
CURLcode test(char *URL)
{
@@ -57,7 +53,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS);
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -78,7 +74,7 @@ CURLcode test(char *URL)
"RAW/RAW/UDP;unicast;client_port=3056-3057");
test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -93,7 +89,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_PLAY);
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
tests/libtest/lib571.c+7 -11
@@ -39,6 +39,7 @@
# include <fcntl.h>
#endif
+#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
@@ -48,12 +49,13 @@
((int)((unsigned char)((p)[3]))))
#define RTP_DATA_SIZE 12
-static const char *RTP_DATA = "$_1234\n\0Rsdf";
static int rtp_packet_count = 0;
static size_t rtp_write(char *ptr, size_t size, size_t nmemb, void *stream)
{
+ static const char *RTP_DATA = "$_1234\n\0Rsdf";
+
char *data = (char *)ptr;
int channel = RTP_PKT_CHANNEL(data);
int message_size;
@@ -95,12 +97,6 @@ static size_t rtp_write(char *ptr, size_t size, size_t nmemb, void *stream)
return size * nmemb;
}
-/* build request url */
-static char *suburl(const char *base, int i)
-{
- return curl_maprintf("%s%.4d", base, i);
-}
-
CURLcode test(char *URL)
{
CURLcode res;
@@ -129,7 +125,7 @@ CURLcode test(char *URL)
}
test_setopt(curl, CURLOPT_URL, URL);
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -151,7 +147,7 @@ CURLcode test(char *URL)
goto test_cleanup;
/* This PLAY starts the interleave */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -166,7 +162,7 @@ CURLcode test(char *URL)
goto test_cleanup;
/* The DESCRIBE request will try to consume data after the Content */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -180,7 +176,7 @@ CURLcode test(char *URL)
if(res)
goto test_cleanup;
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
tests/libtest/lib572.c+6 -11
@@ -30,14 +30,9 @@
#include <fcntl.h>
#endif
+#include "testutil.h"
#include "memdebug.h"
-/* build request url */
-static char *suburl(const char *base, int i)
-{
- return curl_maprintf("%s%.4d", base, i);
-}
-
/*
* Test GET_PARAMETER: PUT, HEARTBEAT, and POST
*/
@@ -72,7 +67,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
/* SETUP */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -87,7 +82,7 @@ CURLcode test(char *URL)
if(res)
goto test_cleanup;
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -127,7 +122,7 @@ CURLcode test(char *URL)
paramsf = NULL;
/* Heartbeat GET_PARAMETERS */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -142,7 +137,7 @@ CURLcode test(char *URL)
/* POST GET_PARAMETERS */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
@@ -161,7 +156,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POSTFIELDS, NULL);
/* Make sure we can do a normal request now */
- stream_uri = suburl(URL, request++);
+ stream_uri = tutil_suburl(URL, request++);
if(!stream_uri) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
tests/libtest/lib573.c+0 -2
@@ -28,8 +28,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
/*
* Get a single URL without select().
*/
tests/libtest/lib574.c+0 -2
@@ -25,8 +25,6 @@
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT (60 * 1000)
-
static int new_fnmatch(void *ptr,
const char *pattern, const char *string)
{
tests/libtest/lib575.c+0 -2
@@ -29,8 +29,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
/* 3x download!
* 1. normal
* 2. dup handle
tests/libtest/lib576.c+2 -4
@@ -31,8 +31,7 @@ struct chunk_data {
int print_content;
};
-static
-long chunk_bgn(const void *f, void *ptr, int remains)
+static long chunk_bgn(const void *f, void *ptr, int remains)
{
const struct curl_fileinfo *finfo = f;
struct chunk_data *ch_d = ptr;
@@ -83,8 +82,7 @@ long chunk_bgn(const void *f, void *ptr, int remains)
return CURL_CHUNK_BGN_FUNC_OK;
}
-static
-long chunk_end(void *ptr)
+static long chunk_end(void *ptr)
{
struct chunk_data *ch_d = ptr;
if(ch_d->print_content) {
tests/libtest/lib578.c+7 -7
@@ -26,12 +26,12 @@
#include "memdebug.h"
/* The size of data should be kept below MAX_INITIAL_POST_SIZE! */
-static char testdata[]="this is a short string.\n";
+static char t578_testdata[] = "this is a short string.\n";
-static size_t data_size = CURL_ARRAYSIZE(testdata);
+static size_t data_size = CURL_ARRAYSIZE(t578_testdata);
-static int progress_callback(void *clientp, double dltotal, double dlnow,
- double ultotal, double ulnow)
+static int t578_progress_callback(void *clientp, double dltotal, double dlnow,
+ double ultotal, double ulnow)
{
FILE *moo = fopen(libtest_arg2, "wb");
@@ -44,7 +44,7 @@ static int progress_callback(void *clientp, double dltotal, double dlnow,
curl_mfprintf(moo, "PASSED, UL data matched data size\n");
else
curl_mfprintf(moo, "Progress callback called with UL %f out of %f\n",
- ulnow, ultotal);
+ ulnow, ultotal);
fclose(moo);
}
return 0;
@@ -75,11 +75,11 @@ CURLcode test(char *URL)
/* Set the expected POST size */
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)data_size);
- test_setopt(curl, CURLOPT_POSTFIELDS, testdata);
+ test_setopt(curl, CURLOPT_POSTFIELDS, t578_testdata);
/* we want to use our own progress function */
test_setopt(curl, CURLOPT_NOPROGRESS, 0L);
- test_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
+ test_setopt(curl, CURLOPT_PROGRESSFUNCTION, t578_progress_callback);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
tests/libtest/lib579.c+17 -18
@@ -25,16 +25,7 @@
#include "memdebug.h"
-static const char * const testpost[]={
- "one",
- "two",
- "three",
- "and a final longer crap: four",
- NULL
-};
-
-
-struct WriteThis {
+struct t579_WriteThis {
int counter;
};
@@ -54,8 +45,8 @@ static void progress_final_report(void)
started = FALSE;
}
-static int progress_callback(void *clientp, double dltotal, double dlnow,
- double ultotal, double ulnow)
+static int t579_progress_callback(void *clientp, double dltotal, double dlnow,
+ double ultotal, double ulnow)
{
(void)clientp; /* UNUSED */
(void)dltotal; /* UNUSED */
@@ -70,7 +61,7 @@ static int progress_callback(void *clientp, double dltotal, double dlnow,
if(!started) {
FILE *moo = fopen(libtest_arg2, "ab");
curl_mfprintf(moo ? moo : stderr, "Progress: start UL %zu/%zu\n",
- last_ul, last_ul_total);
+ last_ul, last_ul_total);
if(moo)
fclose(moo);
else
@@ -82,9 +73,17 @@ static int progress_callback(void *clientp, double dltotal, double dlnow,
return 0;
}
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t579_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ static const char * const testpost[] = {
+ "one",
+ "two",
+ "three",
+ "and a final longer crap: four",
+ NULL
+ };
+
+ struct t579_WriteThis *pooh = (struct t579_WriteThis *)userp;
const char *data;
if(size*nmemb < 1)
@@ -106,7 +105,7 @@ CURLcode test(char *URL)
CURL *curl;
CURLcode res = CURLE_OK;
struct curl_slist *slist = NULL;
- struct WriteThis pooh;
+ struct t579_WriteThis pooh;
pooh.counter = 0;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
@@ -136,7 +135,7 @@ CURLcode test(char *URL)
test_setopt(curl, CURLOPT_POST, 1L);
/* we want to use our own read function */
- test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, t579_read_cb);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_READDATA, &pooh);
@@ -155,7 +154,7 @@ CURLcode test(char *URL)
/* we want to use our own progress function */
test_setopt(curl, CURLOPT_NOPROGRESS, 0L);
- test_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
+ test_setopt(curl, CURLOPT_PROGRESSFUNCTION, t579_progress_callback);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
tests/libtest/lib582.c+33 -32
@@ -29,22 +29,21 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
-struct Sockets {
+struct t582_Sockets {
curl_socket_t *sockets;
int count; /* number of sockets actually stored in array */
int max_count; /* max number of sockets that fit in allocated array */
};
-struct ReadWriteSockets {
- struct Sockets read, write;
+struct t582_ReadWriteSockets {
+ struct t582_Sockets read, write;
};
/**
* Remove a file descriptor from a sockets array.
*/
-static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention)
+static void t582_removeFd(struct t582_Sockets *sockets, curl_socket_t fd,
+ int mention)
{
int i;
@@ -64,14 +63,15 @@ static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention)
/**
* Add a file descriptor to a sockets array.
*/
-static void addFd(struct Sockets *sockets, curl_socket_t fd, const char *what)
+static void t582_addFd(struct t582_Sockets *sockets, curl_socket_t fd,
+ const char *what)
{
/**
* To ensure we only have each file descriptor once, we remove it then add
* it again.
*/
curl_mfprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what);
- removeFd(sockets, fd, 0);
+ t582_removeFd(sockets, fd, 0);
/*
* Allocate array storage when required.
*/
@@ -96,23 +96,23 @@ static void addFd(struct Sockets *sockets, curl_socket_t fd, const char *what)
/**
* Callback invoked by curl to poll reading / writing of a socket.
*/
-static int curlSocketCallback(CURL *easy, curl_socket_t s, int action,
- void *userp, void *socketp)
+static int t582_curlSocketCallback(CURL *easy, curl_socket_t s, int action,
+ void *userp, void *socketp)
{
- struct ReadWriteSockets *sockets = userp;
+ struct t582_ReadWriteSockets *sockets = userp;
(void)easy; /* unused */
(void)socketp; /* unused */
if(action == CURL_POLL_IN || action == CURL_POLL_INOUT)
- addFd(&sockets->read, s, "read");
+ t582_addFd(&sockets->read, s, "read");
if(action == CURL_POLL_OUT || action == CURL_POLL_INOUT)
- addFd(&sockets->write, s, "write");
+ t582_addFd(&sockets->write, s, "write");
if(action == CURL_POLL_REMOVE) {
- removeFd(&sockets->read, s, 1);
- removeFd(&sockets->write, s, 0);
+ t582_removeFd(&sockets->read, s, 1);
+ t582_removeFd(&sockets->write, s, 0);
}
return 0;
@@ -121,7 +121,7 @@ static int curlSocketCallback(CURL *easy, curl_socket_t s, int action,
/**
* Callback invoked by curl to set a timeout.
*/
-static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
+static int t582_curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
{
struct timeval *timeout = userp;
@@ -139,7 +139,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
/**
* Check for curl completion.
*/
-static int checkForCompletion(CURLM *curl, int *success)
+static int t582_checkForCompletion(CURLM *curl, int *success)
{
int result = 0;
*success = 0;
@@ -165,7 +165,7 @@ static int checkForCompletion(CURLM *curl, int *success)
return result;
}
-static int getMicroSecondTimeout(struct timeval *timeout)
+static int t582_getMicroSecondTimeout(struct timeval *timeout)
{
struct timeval now;
ssize_t result;
@@ -181,8 +181,8 @@ static int getMicroSecondTimeout(struct timeval *timeout)
/**
* Update a fd_set with all of the sockets in use.
*/
-static void updateFdSet(struct Sockets *sockets, fd_set* fdset,
- curl_socket_t *maxFd)
+static void t582_updateFdSet(struct t582_Sockets *sockets, fd_set* fdset,
+ curl_socket_t *maxFd)
{
int i;
for(i = 0; i < sockets->count; ++i) {
@@ -214,8 +214,8 @@ static void notifyCurl(CURLM *curl, curl_socket_t s, int evBitmask,
/**
* Invoke curl when a file descriptor is set.
*/
-static void checkFdSet(CURLM *curl, struct Sockets *sockets, fd_set *fdset,
- int evBitmask, const char *name)
+static void t582_checkFdSet(CURLM *curl, struct t582_Sockets *sockets,
+ fd_set *fdset, int evBitmask, const char *name)
{
int i;
for(i = 0; i < sockets->count; ++i) {
@@ -233,7 +233,7 @@ CURLcode test(char *URL)
int hd;
struct_stat file_info;
CURLM *m = NULL;
- struct ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
+ struct t582_ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
int success = 0;
struct timeval timeout = {0};
timeout.tv_sec = (time_t)-1;
@@ -300,15 +300,15 @@ CURLcode test(char *URL)
multi_init(m);
- multi_setopt(m, CURLMOPT_SOCKETFUNCTION, curlSocketCallback);
+ multi_setopt(m, CURLMOPT_SOCKETFUNCTION, t582_curlSocketCallback);
multi_setopt(m, CURLMOPT_SOCKETDATA, &sockets);
- multi_setopt(m, CURLMOPT_TIMERFUNCTION, curlTimerCallback);
+ multi_setopt(m, CURLMOPT_TIMERFUNCTION, t582_curlTimerCallback);
multi_setopt(m, CURLMOPT_TIMERDATA, &timeout);
multi_add_handle(m, curl);
- while(!checkForCompletion(m, &success)) {
+ while(!t582_checkForCompletion(m, &success)) {
fd_set readSet, writeSet;
curl_socket_t maxFd = 0;
struct timeval tv = {0};
@@ -316,11 +316,11 @@ CURLcode test(char *URL)
FD_ZERO(&readSet);
FD_ZERO(&writeSet);
- updateFdSet(&sockets.read, &readSet, &maxFd);
- updateFdSet(&sockets.write, &writeSet, &maxFd);
+ t582_updateFdSet(&sockets.read, &readSet, &maxFd);
+ t582_updateFdSet(&sockets.write, &writeSet, &maxFd);
if(timeout.tv_sec != (time_t)-1) {
- int usTimeout = getMicroSecondTimeout(&timeout);
+ int usTimeout = t582_getMicroSecondTimeout(&timeout);
tv.tv_sec = usTimeout / 1000000;
tv.tv_usec = usTimeout % 1000000;
}
@@ -332,10 +332,11 @@ CURLcode test(char *URL)
select_test((int)maxFd, &readSet, &writeSet, NULL, &tv);
/* Check the sockets for reading / writing */
- checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");
- checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write");
+ t582_checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");
+ t582_checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write");
- if(timeout.tv_sec != (time_t)-1 && getMicroSecondTimeout(&timeout) == 0) {
+ if(timeout.tv_sec != (time_t)-1 &&
+ t582_getMicroSecondTimeout(&timeout) == 0) {
/* Curl's timer has elapsed. */
notifyCurl(m, CURL_SOCKET_TIMEOUT, 0, "timeout");
}
tests/libtest/lib586.c+14 -14
@@ -27,22 +27,22 @@
#define THREADS 2
/* struct containing data of a thread */
-struct Tdata {
+struct t586_Tdata {
CURLSH *share;
char *url;
};
-struct userdata {
+struct t586_userdata {
const char *text;
int counter;
};
/* lock callback */
-static void test_lock(CURL *handle, curl_lock_data data,
- curl_lock_access laccess, void *useptr)
+static void t586_test_lock(CURL *handle, curl_lock_data data,
+ curl_lock_access laccess, void *useptr)
{
const char *what;
- struct userdata *user = (struct userdata *)useptr;
+ struct t586_userdata *user = (struct t586_userdata *)useptr;
(void)handle;
(void)laccess;
@@ -69,10 +69,10 @@ static void test_lock(CURL *handle, curl_lock_data data,
}
/* unlock callback */
-static void test_unlock(CURL *handle, curl_lock_data data, void *useptr)
+static void t586_test_unlock(CURL *handle, curl_lock_data data, void *useptr)
{
const char *what;
- struct userdata *user = (struct userdata *)useptr;
+ struct t586_userdata *user = (struct t586_userdata *)useptr;
(void)handle;
switch(data) {
case CURL_LOCK_DATA_SHARE:
@@ -96,10 +96,10 @@ static void test_unlock(CURL *handle, curl_lock_data data, void *useptr)
}
/* the dummy thread function */
-static void *test_fire(void *ptr)
+static void *t586_test_fire(void *ptr)
{
CURLcode code;
- struct Tdata *tdata = (struct Tdata*)ptr;
+ struct t586_Tdata *tdata = (struct t586_Tdata*)ptr;
CURL *curl;
curl = curl_easy_init();
@@ -134,11 +134,11 @@ CURLcode test(char *URL)
CURLcode res = CURLE_OK;
CURLSHcode scode = CURLSHE_OK;
char *url;
- struct Tdata tdata;
+ struct t586_Tdata tdata;
CURL *curl;
CURLSH *share;
int i;
- struct userdata user;
+ struct t586_userdata user;
user.text = "Pigs in space";
user.counter = 0;
@@ -160,11 +160,11 @@ CURLcode test(char *URL)
if(CURLSHE_OK == scode) {
curl_mprintf("CURLSHOPT_LOCKFUNC\n");
- scode = curl_share_setopt(share, CURLSHOPT_LOCKFUNC, test_lock);
+ scode = curl_share_setopt(share, CURLSHOPT_LOCKFUNC, t586_test_lock);
}
if(CURLSHE_OK == scode) {
curl_mprintf("CURLSHOPT_UNLOCKFUNC\n");
- scode = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, test_unlock);
+ scode = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, t586_test_unlock);
}
if(CURLSHE_OK == scode) {
curl_mprintf("CURLSHOPT_USERDATA\n");
@@ -193,7 +193,7 @@ CURLcode test(char *URL)
/* simulate thread, direct call of "thread" function */
curl_mprintf("*** run %d\n",i);
- test_fire(&tdata);
+ t586_test_fire(&tdata);
}
tests/libtest/lib587.c+189 -0
@@ -0,0 +1,189 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) Daniel Stenberg, <[email protected]>, 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
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+struct t587_WriteThis {
+ const char *readptr;
+ size_t sizeleft;
+};
+
+static size_t t587_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ (void)ptr;
+ (void)size;
+ (void)nmemb;
+ (void)userp;
+ return CURL_READFUNC_ABORT;
+}
+
+static CURLcode t587_test_once(char *URL, bool oldstyle)
+{
+ static const char testdata[] =
+ "this is what we post to the silly web server\n";
+
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ CURLFORMcode formrc;
+
+ struct curl_httppost *formpost = NULL;
+ struct curl_httppost *lastptr = NULL;
+ struct t587_WriteThis pooh;
+ struct t587_WriteThis pooh2;
+
+ pooh.readptr = testdata;
+ pooh.sizeleft = strlen(testdata);
+
+ /* Fill in the file upload field */
+ if(oldstyle) {
+ formrc = curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "sendfile",
+ CURLFORM_STREAM, &pooh,
+ CURLFORM_CONTENTSLENGTH, (long)pooh.sizeleft,
+ CURLFORM_FILENAME, "postit2.c",
+ CURLFORM_END);
+ }
+ else {
+ /* new style */
+ formrc = curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "sendfile alternative",
+ CURLFORM_STREAM, &pooh,
+ CURLFORM_CONTENTLEN, (curl_off_t)pooh.sizeleft,
+ CURLFORM_FILENAME, "file name 2",
+ CURLFORM_END);
+ }
+
+ if(formrc)
+ curl_mprintf("curl_formadd(1) = %d\n", (int)formrc);
+
+ /* Now add the same data with another name and make it not look like
+ a file upload but still using the callback */
+
+ pooh2.readptr = testdata;
+ pooh2.sizeleft = strlen(testdata);
+
+ /* Fill in the file upload field */
+ formrc = curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "callbackdata",
+ CURLFORM_STREAM, &pooh2,
+ CURLFORM_CONTENTSLENGTH, (long)pooh2.sizeleft,
+ CURLFORM_END);
+
+ if(formrc)
+ curl_mprintf("curl_formadd(2) = %d\n", (int)formrc);
+
+ /* Fill in the filename field */
+ formrc = curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "filename",
+ CURLFORM_COPYCONTENTS, "postit2.c",
+ CURLFORM_END);
+ if(formrc)
+ curl_mprintf("curl_formadd(3) = %d\n", (int)formrc);
+
+ /* Fill in a submit field too */
+ formrc = curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "submit",
+ CURLFORM_COPYCONTENTS, "send",
+ CURLFORM_CONTENTTYPE, "text/plain",
+ CURLFORM_END);
+
+ if(formrc)
+ curl_mprintf("curl_formadd(4) = %d\n", (int)formrc);
+
+ formrc = curl_formadd(&formpost, &lastptr,
+ CURLFORM_COPYNAME, "somename",
+ CURLFORM_BUFFER, "somefile.txt",
+ CURLFORM_BUFFERPTR, "blah blah",
+ CURLFORM_BUFFERLENGTH, (long)9,
+ CURLFORM_END);
+
+ if(formrc)
+ curl_mprintf("curl_formadd(5) = %d\n", (int)formrc);
+
+ curl = curl_easy_init();
+ if(!curl) {
+ curl_mfprintf(stderr, "curl_easy_init() failed\n");
+ curl_formfree(formpost);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ /* First set the URL that is about to receive our POST. */
+ test_setopt(curl, CURLOPT_URL, URL);
+
+ /* Now specify we want to POST data */
+ test_setopt(curl, CURLOPT_POST, 1L);
+
+ /* Set the expected POST size */
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
+
+ /* we want to use our own read function */
+ test_setopt(curl, CURLOPT_READFUNCTION, t587_read_cb);
+
+ /* send a multi-part formpost */
+ test_setopt(curl, CURLOPT_HTTPPOST, formpost);
+
+ /* get verbose debug output please */
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* include headers in the output */
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+
+test_cleanup:
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* now cleanup the formpost chain */
+ curl_formfree(formpost);
+
+ return res;
+}
+
+CURLcode test(char *URL)
+{
+ CURLcode res;
+
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ curl_mfprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ res = t587_test_once(URL, TRUE); /* old */
+ if(!res)
+ res = t587_test_once(URL, FALSE); /* new */
+
+ curl_global_cleanup();
+
+ return res;
+}
tests/libtest/lib591.c+0 -2
@@ -33,8 +33,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
CURLcode test(char *URL)
{
CURL *easy = NULL;
tests/libtest/lib597.c+0 -2
@@ -29,8 +29,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
-
/*
* Test case for below scenario:
* - Connect to an FTP server using CONNECT_ONLY option
tests/libtest/lib599.c+3 -3
@@ -25,8 +25,8 @@
#include "memdebug.h"
-static int progress_callback(void *clientp, double dltotal,
- double dlnow, double ultotal, double ulnow)
+static int t599_progress_callback(void *clientp, double dltotal,
+ double dlnow, double ultotal, double ulnow)
{
(void)clientp;
(void)ulnow;
@@ -64,7 +64,7 @@ CURLcode test(char *URL)
/* we want to use our own progress function */
test_setopt(curl, CURLOPT_NOPROGRESS, 0L);
- test_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
+ test_setopt(curl, CURLOPT_PROGRESSFUNCTION, t599_progress_callback);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
tests/libtest/lib643.c+16 -25
@@ -25,29 +25,22 @@
#include "memdebug.h"
-static char testdata[]=
- "dummy\n";
-
-struct WriteThis {
- char *readptr;
+struct t643_WriteThis {
+ const char *readptr;
curl_off_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t643_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t643_WriteThis *pooh = (struct t643_WriteThis *)userp;
int eof;
if(size*nmemb < 1)
return 0;
-#ifdef LIB645
- eof = !*pooh->readptr;
-#else
eof = pooh->sizeleft <= 0;
if(!eof)
pooh->sizeleft--;
-#endif
if(!eof) {
*ptr = *pooh->readptr; /* copy one single byte */
@@ -58,21 +51,21 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-static CURLcode test_once(char *URL, bool oldstyle)
+static CURLcode t643_test_once(char *URL, bool oldstyle)
{
+ static const char testdata[] = "dummy\n";
+
CURL *curl;
CURLcode res = CURLE_OK;
curl_mime *mime = NULL;
curl_mimepart *part = NULL;
- struct WriteThis pooh;
- struct WriteThis pooh2;
+ struct t643_WriteThis pooh;
+ struct t643_WriteThis pooh2;
curl_off_t datasize = -1;
pooh.readptr = testdata;
-#ifndef LIB645
datasize = (curl_off_t)strlen(testdata);
-#endif
pooh.sizeleft = datasize;
curl = curl_easy_init();
@@ -103,7 +96,7 @@ static CURLcode test_once(char *URL, bool oldstyle)
if(oldstyle) {
res = curl_mime_name(part, "sendfile");
if(!res)
- res = curl_mime_data_cb(part, datasize, read_callback,
+ res = curl_mime_data_cb(part, datasize, t643_read_cb,
NULL, NULL, &pooh);
if(!res)
res = curl_mime_filename(part, "postit2.c");
@@ -112,7 +105,7 @@ static CURLcode test_once(char *URL, bool oldstyle)
/* new style */
res = curl_mime_name(part, "sendfile alternative");
if(!res)
- res = curl_mime_data_cb(part, datasize, read_callback,
+ res = curl_mime_data_cb(part, datasize, t643_read_cb,
NULL, NULL, &pooh);
if(!res)
res = curl_mime_filename(part, "file name 2");
@@ -125,9 +118,7 @@ static CURLcode test_once(char *URL, bool oldstyle)
a file upload but still using the callback */
pooh2.readptr = testdata;
-#ifndef LIB645
datasize = (curl_off_t)strlen(testdata);
-#endif
pooh2.sizeleft = datasize;
part = curl_mime_addpart(mime);
@@ -141,7 +132,7 @@ static CURLcode test_once(char *URL, bool oldstyle)
/* Fill in the file upload part */
res = curl_mime_name(part, "callbackdata");
if(!res)
- res = curl_mime_data_cb(part, datasize, read_callback,
+ res = curl_mime_data_cb(part, datasize, t643_read_cb,
NULL, NULL, &pooh2);
if(res)
@@ -225,7 +216,7 @@ test_cleanup:
return res;
}
-static CURLcode cyclic_add(void)
+static CURLcode t643_cyclic_add(void)
{
CURL *easy = curl_easy_init();
curl_mime *mime = curl_mime_init(easy);
@@ -258,12 +249,12 @@ CURLcode test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- res = test_once(URL, TRUE); /* old */
+ res = t643_test_once(URL, TRUE); /* old */
if(!res)
- res = test_once(URL, FALSE); /* new */
+ res = t643_test_once(URL, FALSE); /* new */
if(!res)
- res = cyclic_add();
+ res = t643_cyclic_add();
curl_global_cleanup();
tests/libtest/lib645.c+258 -0
@@ -0,0 +1,258 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) Daniel Stenberg, <[email protected]>, 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
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+struct t645_WriteThis {
+ const char *readptr;
+ curl_off_t sizeleft;
+};
+
+static size_t t645_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct t645_WriteThis *pooh = (struct t645_WriteThis *)userp;
+ int eof;
+
+ if(size*nmemb < 1)
+ return 0;
+
+ eof = !*pooh->readptr;
+
+ if(!eof) {
+ *ptr = *pooh->readptr; /* copy one single byte */
+ pooh->readptr++; /* advance pointer */
+ return 1; /* we return 1 byte at a time! */
+ }
+
+ return 0; /* no more data left to deliver */
+}
+
+static CURLcode t645_test_once(char *URL, bool oldstyle)
+{
+ static const char testdata[] = "dummy\n";
+
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl_mime *mime = NULL;
+ curl_mimepart *part = NULL;
+ struct t645_WriteThis pooh;
+ struct t645_WriteThis pooh2;
+ curl_off_t datasize = -1;
+
+ pooh.readptr = testdata;
+ pooh.sizeleft = datasize;
+
+ curl = curl_easy_init();
+ if(!curl) {
+ curl_mfprintf(stderr, "curl_easy_init() failed\n");
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ mime = curl_mime_init(curl);
+ if(!mime) {
+ curl_mfprintf(stderr, "curl_mime_init() failed\n");
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ part = curl_mime_addpart(mime);
+ if(!part) {
+ curl_mfprintf(stderr, "curl_mime_addpart(1) failed\n");
+ curl_mime_free(mime);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ /* Fill in the file upload part */
+ if(oldstyle) {
+ res = curl_mime_name(part, "sendfile");
+ if(!res)
+ res = curl_mime_data_cb(part, datasize, t645_read_cb,
+ NULL, NULL, &pooh);
+ if(!res)
+ res = curl_mime_filename(part, "postit2.c");
+ }
+ else {
+ /* new style */
+ res = curl_mime_name(part, "sendfile alternative");
+ if(!res)
+ res = curl_mime_data_cb(part, datasize, t645_read_cb,
+ NULL, NULL, &pooh);
+ if(!res)
+ res = curl_mime_filename(part, "file name 2");
+ }
+
+ if(res)
+ curl_mprintf("curl_mime_xxx(1) = %s\n", curl_easy_strerror(res));
+
+ /* Now add the same data with another name and make it not look like
+ a file upload but still using the callback */
+
+ pooh2.readptr = testdata;
+ pooh2.sizeleft = datasize;
+
+ part = curl_mime_addpart(mime);
+ if(!part) {
+ curl_mfprintf(stderr, "curl_mime_addpart(2) failed\n");
+ curl_mime_free(mime);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+ /* Fill in the file upload part */
+ res = curl_mime_name(part, "callbackdata");
+ if(!res)
+ res = curl_mime_data_cb(part, datasize, t645_read_cb,
+ NULL, NULL, &pooh2);
+
+ if(res)
+ curl_mprintf("curl_mime_xxx(2) = %s\n", curl_easy_strerror(res));
+
+ part = curl_mime_addpart(mime);
+ if(!part) {
+ curl_mfprintf(stderr, "curl_mime_addpart(3) failed\n");
+ curl_mime_free(mime);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ /* Fill in the filename field */
+ res = curl_mime_name(part, "filename");
+ if(!res)
+ res = curl_mime_data(part, "postit2.c",
+ CURL_ZERO_TERMINATED);
+
+ if(res)
+ curl_mprintf("curl_mime_xxx(3) = %s\n", curl_easy_strerror(res));
+
+ /* Fill in a submit field too */
+ part = curl_mime_addpart(mime);
+ if(!part) {
+ curl_mfprintf(stderr, "curl_mime_addpart(4) failed\n");
+ curl_mime_free(mime);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+ res = curl_mime_name(part, "submit");
+ if(!res)
+ res = curl_mime_data(part, "send",
+ CURL_ZERO_TERMINATED);
+
+ if(res)
+ curl_mprintf("curl_mime_xxx(4) = %s\n", curl_easy_strerror(res));
+
+ part = curl_mime_addpart(mime);
+ if(!part) {
+ curl_mfprintf(stderr, "curl_mime_addpart(5) failed\n");
+ curl_mime_free(mime);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+ res = curl_mime_name(part, "somename");
+ if(!res)
+ res = curl_mime_filename(part, "somefile.txt");
+ if(!res)
+ res = curl_mime_data(part, "blah blah", 9);
+
+ if(res)
+ curl_mprintf("curl_mime_xxx(5) = %s\n", curl_easy_strerror(res));
+
+ /* First set the URL that is about to receive our POST. */
+ test_setopt(curl, CURLOPT_URL, URL);
+
+ /* send a multi-part mimepost */
+ test_setopt(curl, CURLOPT_MIMEPOST, mime);
+
+ /* get verbose debug output please */
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* include headers in the output */
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+
+test_cleanup:
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* now cleanup the mimepost structure */
+ curl_mime_free(mime);
+
+ return res;
+}
+
+static CURLcode t645_cyclic_add(void)
+{
+ CURL *easy = curl_easy_init();
+ curl_mime *mime = curl_mime_init(easy);
+ curl_mimepart *part = curl_mime_addpart(mime);
+ CURLcode a1 = curl_mime_subparts(part, mime);
+
+ if(a1 == CURLE_BAD_FUNCTION_ARGUMENT) {
+ curl_mime *submime = curl_mime_init(easy);
+ curl_mimepart *subpart = curl_mime_addpart(submime);
+
+ curl_mime_subparts(part, submime);
+ a1 = curl_mime_subparts(subpart, mime);
+ }
+
+ curl_mime_free(mime);
+ curl_easy_cleanup(easy);
+ if(a1 != CURLE_BAD_FUNCTION_ARGUMENT)
+ /* that should have failed */
+ return TEST_ERR_FAILURE;
+
+ return CURLE_OK;
+}
+
+CURLcode test(char *URL)
+{
+ CURLcode res;
+
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ curl_mfprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ res = t645_test_once(URL, TRUE); /* old */
+ if(!res)
+ res = t645_test_once(URL, FALSE); /* new */
+
+ if(!res)
+ res = t645_cyclic_add();
+
+ curl_global_cleanup();
+
+ return res;
+}
tests/libtest/lib650.c+4 -7
@@ -25,13 +25,6 @@
#include "memdebug.h"
-
-static char testdata[] =
- "this is what we post to the silly web server";
-
-static const char testname[] = "fieldname";
-
-
/* This test attempts to use all form API features that are not
* used elsewhere.
*/
@@ -60,6 +53,10 @@ CURLcode test(char *URL)
char flbuf[32];
long contentlength = 0;
+ static const char testname[] = "fieldname";
+ static char testdata[] =
+ "this is what we post to the silly web server";
+
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
curl_mfprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
tests/libtest/lib651.c+2 -2
@@ -25,10 +25,10 @@
#include "memdebug.h"
-static char testbuf[17000]; /* more than 16K */
-
CURLcode test(char *URL)
{
+ static char testbuf[17000]; /* more than 16K */
+
CURL *curl;
CURLcode res = CURLE_OK;
CURLFORMcode formrc;
tests/libtest/lib652.c+2 -2
@@ -25,10 +25,10 @@
#include "memdebug.h"
-static char testbuf[17000]; /* more than 16K */
-
CURLcode test(char *URL)
{
+ static char testbuf[17000]; /* more than 16K */
+
CURL *curl = NULL;
CURLcode res = CURLE_OK;
curl_mime *mime = NULL;
tests/libtest/lib654.c+10 -11
@@ -25,25 +25,22 @@
#include "memdebug.h"
-static char testdata[]=
- "dummy\n";
-
-struct WriteThis {
- char *readptr;
+struct t654_WriteThis {
+ const char *readptr;
curl_off_t sizeleft;
int freecount;
};
static void free_callback(void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *) userp;
+ struct t654_WriteThis *pooh = (struct t654_WriteThis *) userp;
pooh->freecount++;
}
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t654_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t654_WriteThis *pooh = (struct t654_WriteThis *)userp;
int eof;
if(size*nmemb < 1)
@@ -64,13 +61,15 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
CURLcode test(char *URL)
{
+ static const char testdata[] = "dummy\n";
+
CURL *easy = NULL;
CURL *easy2 = NULL;
curl_mime *mime = NULL;
curl_mimepart *part;
struct curl_slist *hdrs = NULL;
CURLcode res = TEST_ERR_FAILURE;
- struct WriteThis pooh;
+ struct t654_WriteThis pooh;
/*
* Check proper copy/release of mime post data bound to a duplicated
@@ -110,8 +109,8 @@ CURLcode test(char *URL)
part = curl_mime_addpart(mime);
curl_mime_filedata(part, libtest_arg2);
part = curl_mime_addpart(mime);
- curl_mime_data_cb(part, (curl_off_t) -1, read_callback, NULL, free_callback,
- &pooh);
+ curl_mime_data_cb(part, (curl_off_t) -1, t654_read_cb, NULL,
+ free_callback, &pooh);
/* Bind mime data to its easy handle. */
test_setopt(easy, CURLOPT_MIMEPOST, mime);
tests/libtest/lib655.c+6 -5
@@ -28,8 +28,8 @@
static const char *TEST_DATA_STRING = "Test data";
static int cb_count = 0;
-static int
-resolver_alloc_cb_fail(void *resolver_state, void *reserved, void *userdata)
+static int resolver_alloc_cb_fail(void *resolver_state, void *reserved,
+ void *userdata)
{
(void)resolver_state;
(void)reserved;
@@ -43,8 +43,8 @@ resolver_alloc_cb_fail(void *resolver_state, void *reserved, void *userdata)
return 1;
}
-static int
-resolver_alloc_cb_pass(void *resolver_state, void *reserved, void *userdata)
+static int resolver_alloc_cb_pass(void *resolver_state, void *reserved,
+ void *userdata)
{
(void)resolver_state;
(void)reserved;
@@ -84,7 +84,8 @@ CURLcode test(char *URL)
res = curl_easy_perform(curl);
if(res != CURLE_COULDNT_RESOLVE_HOST) {
curl_mfprintf(stderr, "curl_easy_perform should have returned "
- "CURLE_COULDNT_RESOLVE_HOST but instead returned error %d\n", res);
+ "CURLE_COULDNT_RESOLVE_HOST but instead returned error %d\n",
+ res);
if(res == CURLE_OK)
res = TEST_ERR_FAILURE;
goto test_cleanup;
tests/libtest/lib666.c+2 -2
@@ -25,10 +25,10 @@
#include "memdebug.h"
-static char testbuf[17000]; /* more than 16K */
-
CURLcode test(char *URL)
{
+ static char testbuf[17000]; /* more than 16K */
+
CURL *curl = NULL;
CURLcode res = CURLE_OK;
curl_mime *mime = NULL;
tests/libtest/lib667.c+9 -9
@@ -25,17 +25,14 @@
#include "memdebug.h"
-static char testdata[]=
- "dummy";
-
-struct WriteThis {
- char *readptr;
+struct t667_WriteThis {
+ const char *readptr;
curl_off_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t667_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t667_WriteThis *pooh = (struct t667_WriteThis *)userp;
int eof;
if(size*nmemb < 1)
@@ -56,11 +53,13 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
CURLcode test(char *URL)
{
+ static const char testdata[] = "dummy";
+
CURL *easy = NULL;
curl_mime *mime = NULL;
curl_mimepart *part;
CURLcode res = TEST_ERR_FAILURE;
- struct WriteThis pooh;
+ struct t667_WriteThis pooh;
/*
* Check proper handling of mime encoder feature when the part read callback
@@ -93,7 +92,8 @@ CURLcode test(char *URL)
curl_mime_name(part, "field");
curl_mime_encoder(part, "base64");
/* Using an undefined length forces chunked transfer. */
- curl_mime_data_cb(part, (curl_off_t) -1, read_callback, NULL, NULL, &pooh);
+ curl_mime_data_cb(part, (curl_off_t) -1, t667_read_cb,
+ NULL, NULL, &pooh);
/* Bind mime data to its easy handle. */
test_setopt(easy, CURLOPT_MIMEPOST, mime);
tests/libtest/lib668.c+10 -9
@@ -25,16 +25,14 @@
#include "memdebug.h"
-static char testdata[]= "dummy";
-
-struct WriteThis {
- char *readptr;
+struct t668_WriteThis {
+ const char *readptr;
curl_off_t sizeleft;
};
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t668_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct WriteThis *pooh = (struct WriteThis *)userp;
+ struct t668_WriteThis *pooh = (struct t668_WriteThis *)userp;
size_t len = strlen(pooh->readptr);
(void) size; /* Always 1.*/
@@ -50,11 +48,13 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
CURLcode test(char *URL)
{
+ static const char testdata[] = "dummy";
+
CURL *easy = NULL;
curl_mime *mime = NULL;
curl_mimepart *part;
CURLcode res = TEST_ERR_FAILURE;
- struct WriteThis pooh1, pooh2;
+ struct t668_WriteThis pooh1, pooh2;
/*
* Check early end of part data detection.
@@ -87,12 +87,13 @@ CURLcode test(char *URL)
curl_mime_name(part, "field1");
/* Early end of data detection can be done because the data size is known. */
curl_mime_data_cb(part, (curl_off_t) strlen(testdata),
- read_callback, NULL, NULL, &pooh1);
+ t668_read_cb, NULL, NULL, &pooh1);
part = curl_mime_addpart(mime);
curl_mime_name(part, "field2");
/* Using an undefined length forces chunked transfer and disables early
end of data detection for this part. */
- curl_mime_data_cb(part, (curl_off_t) -1, read_callback, NULL, NULL, &pooh2);
+ curl_mime_data_cb(part, (curl_off_t) -1, t668_read_cb,
+ NULL, NULL, &pooh2);
part = curl_mime_addpart(mime);
curl_mime_name(part, "field3");
/* Regular file part sources early end of data can be detected because
tests/libtest/lib670.c+19 -14
@@ -29,19 +29,17 @@
#define PAUSE_TIME 5
-
-static const char testname[] = "field";
-
-struct ReadThis {
+#ifndef LIB670_C
+#define LIB670_C
+struct t670_ReadThis {
CURL *easy;
time_t origin;
int count;
};
-
-static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+static size_t t670_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
{
- struct ReadThis *pooh = (struct ReadThis *) userp;
+ struct t670_ReadThis *pooh = (struct t670_ReadThis *) userp;
time_t delta;
if(size * nmemb < 1)
@@ -64,12 +62,16 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
curl_mfprintf(stderr, "Read callback called after EOF\n");
exit(1);
}
+#endif
#if !defined(LIB670) && !defined(LIB672)
-static int xferinfo(void *clientp, curl_off_t dltotal, curl_off_t dlnow,
- curl_off_t ultotal, curl_off_t ulnow)
+#ifndef LIB670_XFERINFO_C
+#define LIB670_XFERINFO_C
+static int t670_xferinfo(void *clientp,
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow)
{
- struct ReadThis *pooh = (struct ReadThis *) clientp;
+ struct t670_ReadThis *pooh = (struct t670_ReadThis *) clientp;
(void) dltotal;
(void) dlnow;
@@ -91,9 +93,12 @@ static int xferinfo(void *clientp, curl_off_t dltotal, curl_off_t dlnow,
return 0;
}
#endif
+#endif
CURLcode test(char *URL)
{
+ static const char testname[] = "field";
+
#if defined(LIB670) || defined(LIB671)
curl_mime *mime = NULL;
curl_mimepart *part;
@@ -110,7 +115,7 @@ CURLcode test(char *URL)
int still_running = 0;
#endif
- struct ReadThis pooh;
+ struct t670_ReadThis pooh;
CURLcode res = TEST_ERR_FAILURE;
/*
@@ -147,7 +152,7 @@ CURLcode test(char *URL)
goto test_cleanup;
}
- res = curl_mime_data_cb(part, (curl_off_t) 2, read_callback,
+ res = curl_mime_data_cb(part, (curl_off_t) 2, t670_read_cb,
NULL, NULL, &pooh);
/* Bind mime data to its easy handle. */
@@ -166,7 +171,7 @@ CURLcode test(char *URL)
}
/* We want to use our own read function. */
- test_setopt(pooh.easy, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(pooh.easy, CURLOPT_READFUNCTION, t670_read_cb);
/* Send a multi-part formpost. */
test_setopt(pooh.easy, CURLOPT_HTTPPOST, formpost);
@@ -237,7 +242,7 @@ CURLcode test(char *URL)
#else
/* Use the easy interface. */
test_setopt(pooh.easy, CURLOPT_XFERINFODATA, &pooh);
- test_setopt(pooh.easy, CURLOPT_XFERINFOFUNCTION, xferinfo);
+ test_setopt(pooh.easy, CURLOPT_XFERINFOFUNCTION, t670_xferinfo);
test_setopt(pooh.easy, CURLOPT_NOPROGRESS, 0L);
res = curl_easy_perform(pooh.easy);
#endif
tests/libtest/lib677.c+3 -3
@@ -27,11 +27,11 @@
#include "warnless.h"
#include "memdebug.h"
-static const char testcmd[] = "A1 IDLE\r\n";
-static char testbuf[1024];
-
CURLcode test(char *URL)
{
+ static const char testcmd[] = "A1 IDLE\r\n";
+ static char testbuf[1024];
+
CURLM *mcurl;
CURL *curl = NULL;
int mrun;
tests/libtest/libntlmconnect.c+0 -1
@@ -30,7 +30,6 @@
#include "warnless.h"
#include "memdebug.h"
-#define TEST_HANG_TIMEOUT 60 * 1000
#define MAX_EASY_HANDLES 3
static int ntlm_counter[MAX_EASY_HANDLES];
tests/libtest/mk-lib1521.pl+5 -5
@@ -209,8 +209,8 @@ print $fh <<HEADER
/* This source code is generated by mk-lib1521.pl ! */
-struct testdata {
- char *blaha;
+struct t1521_testdata {
+ char *blaha;
};
#define LO $minlong
@@ -275,7 +275,7 @@ static void errnull(const char *name, CURLcode val, int lineno)
name, val, curl_easy_strerror(val), lineno);
}
-static void geterr(const char *name, CURLcode val, int lineno)
+static void t1521_geterr(const char *name, CURLcode val, int lineno)
{
printf("CURLINFO_%s returned %d, \\"%s\\" on line %d\\n",
name, val, curl_easy_strerror(val), lineno);
@@ -340,7 +340,7 @@ CURLcode test(char *URL)
struct curl_httppost *httppost = NULL;
curl_mime *mimepost = NULL;
FILE *stream = stderr;
- struct testdata object;
+ struct t1521_testdata object;
CURLU *curlu = (CURLU *)&object;
char *charp;
long val;
@@ -556,7 +556,7 @@ MOO
($_ =~ /^CURLINFO_([^ ]*) *= *CURLINFO_([^ ]*)/)) {
my ($info, $type)=($1, $2);
my $c = " res = curl_easy_getinfo(curl, CURLINFO_$info,";
- my $check = " if(res)\n geterr(\"$info\", res, __LINE__);\n";
+ my $check = " if(res)\n t1521_geterr(\"$info\", res, __LINE__);\n";
if($type eq "STRING") {
print $fh "$c &charp);\n$check";
}
tests/libtest/test.h+7 -0
@@ -527,3 +527,10 @@ extern CURLcode test(char *URL); /* the actual test function provided by each
return CURLE_UNSUPPORTED_PROTOCOL; \
}
#endif
+
+/* Set default that each test may override */
+#undef TEST_HANG_TIMEOUT
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+#undef NUM_HANDLES
+#define NUM_HANDLES 4
tests/libtest/testtrace.c+3 -3
@@ -32,9 +32,9 @@ struct libtest_trace_cfg libtest_debug_config;
static time_t epoch_offset; /* for test time tracing */
static int known_offset; /* for test time tracing */
-static
-void libtest_debug_dump(const char *timebuf, const char *text, FILE *stream,
- const unsigned char *ptr, size_t size, int nohex)
+static void libtest_debug_dump(const char *timebuf, const char *text,
+ FILE *stream, const unsigned char *ptr,
+ size_t size, int nohex)
{
size_t i;
size_t c;
tests/libtest/testutil.c+29 -0
@@ -129,3 +129,32 @@ double tutil_tvdiff_secs(struct timeval newer, struct timeval older)
(double)(newer.tv_usec-older.tv_usec)/1000000.0;
return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
}
+
+/* build request url */
+char *tutil_suburl(const char *base, int i)
+{
+ return curl_maprintf("%s%.4d", base, i);
+}
+
+#if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
+void tutil_rlim2str(char *buf, size_t len, rlim_t val)
+{
+#ifdef RLIM_INFINITY
+ if(val == RLIM_INFINITY) {
+ curl_msnprintf(buf, len, "INFINITY");
+ return;
+ }
+#endif
+#ifdef HAVE_LONGLONG
+ if(sizeof(rlim_t) > sizeof(long))
+ curl_msnprintf(buf, len, "%llu", (unsigned long long)val);
+ else
+#endif
+ {
+ if(sizeof(rlim_t) < sizeof(long))
+ curl_msnprintf(buf, len, "%u", (unsigned int)val);
+ else
+ curl_msnprintf(buf, len, "%lu", (unsigned long)val);
+ }
+}
+#endif
tests/libtest/testutil.h+13 -0
@@ -42,4 +42,17 @@ long tutil_tvdiff(struct timeval t1, struct timeval t2);
*/
double tutil_tvdiff_secs(struct timeval t1, struct timeval t2);
+/* build request url */
+char *tutil_suburl(const char *base, int i);
+
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+#include <limits.h>
+
+#if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
+void tutil_rlim2str(char *buf, size_t len, rlim_t val);
+#endif
+
#endif /* HEADER_CURL_LIBTEST_TESTUTIL_H */
tests/mk-bundle-hints.sh+0 -74
@@ -1,74 +0,0 @@
-#!/usr/bin/env bash
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) Viktor Szakats
-#
-# 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
-#
-###########################################################################
-
-detect_in_reused_sources=1
-
-if [ "$detect_in_reused_sources" = '1' ]; then
- # Make symlinks for all re-used sources
- grep -E '^(lib|unit)[0-9]+_SOURCES = ' libtest/Makefile.inc unit/Makefile.inc \
- | sed -E 's@^([a-z]+)/[a-zA-Z.]+:(lib|unit)([0-9]+)_SOURCES = (lib|unit)([0-9]+).+@\1 \2 \3 \5@g' | \
- while read -r l; do
- if [[ "${l}" =~ ([a-z]+)\ ([a-z]+)\ ([0-9]+)\ ([0-9]+) ]]; then
- trg="${BASH_REMATCH[3]}"
- src="${BASH_REMATCH[4]}"
- if [ "${trg}" != "${src}" ]; then
- dir="${BASH_REMATCH[1]}"
- pfx="${BASH_REMATCH[2]}"
- ln -s "${pfx}${src}.c" "${dir}/${pfx}${trg}.c"
- fi
- fi
- done
-fi
-
-# Look for symbols possibly re-used in multiple sources.
-#
-# Falsely picks ups symbols in re-used sources, but guarded for a single use.
-# Misses shadowed variables.
-# shellcheck disable=SC2046
-grep -E '^ *(static|struct) +' $(find libtest unit -maxdepth 1 -name 'lib*.c' -o -name 'unit*.c' -o -name 'mk-*.pl') \
- | grep -E '^(libtest|unit)/' \
- | grep -E '\.(c|pl):(static|struct)( +[a-zA-Z_* ]+)? +[a-zA-Z_][a-zA-Z0-9_]+ *' | sort -u \
- | grep -o -E '[a-zA-Z_][a-zA-Z0-9_]+ *[=;[({]' | tr -d '=;[({ ' \
- | grep -v -E '^(NULL$|sizeof$|CURLE_)' \
- | sort | uniq -c | sort -k 2 | grep -v -E '^ +1 ' \
- | awk '{print " \"" $2 "\","}'
-
-echo '---'
-
-# Extract list of macros that may be re-used by multiple tests.
-#
-# Picks up false-positive when the macro is defined to the same value everywhere.
-# shellcheck disable=SC2046
-grep -E '^ *# *define +' $(find libtest unit -maxdepth 1 -name 'lib*.c' -o -name 'unit*.c' -o -name 'mk-*.pl') \
- | grep -E '^(libtest|unit)/' \
- | grep -o -E '.+\.(c|pl): *# *define +[A-Z_][A-Z0-9_]+' | sort -u \
- | grep -o -E '[A-Z_][A-Z0-9_]+' \
- | sort | uniq -c | sort -k 2 | grep -v -E '^ +1 ' \
- | awk '{print " \"" $2 "\","}'
-
-if [ "$detect_in_reused_sources" = '1' ]; then
- # Delete symlinks for all re-used sources
- find libtest unit -type l -delete
-fi
tests/mk-bundle.pl+1 -82
@@ -47,80 +47,6 @@ print <<HEADER
HEADER
;
-# TODO: Some of these might be subject for de-duplication or sync.
-my @reused_symbols = (
- "ReadThis",
- "ReadWriteSockets",
- "Sockets",
- "Tdata",
- "WriteThis",
- "addFd",
- "checkFdSet",
- "checkForCompletion",
- "close_file_descriptors",
- "curl", # shadow
- "curlSocketCallback",
- "curlTimerCallback",
- "cyclic_add",
- "easy", # unit
- "fopen_works",
- "getMicroSecondTimeout",
- "geterr",
- "hash_static", # unit
- "header_callback",
- "ioctlcallback",
- "msgbuff",
- "mydtor", # unit
- "num_open",
- "progress_callback",
- "read_callback",
- "readcallback",
- "recv_pong",
- "removeFd",
- "rlim2str",
- "run_thread",
- "seek_callback",
- "send_ping",
- "showem",
- "store_errmsg",
- "suburl",
- "test_failure", # shadow
- "test_fire",
- "test_lock",
- "test_once",
- "test_parse", # unit
- "test_rlimit",
- "test_unlock",
- "testbuf",
- "testcase", # unit
- "testdata",
- "testfd",
- "testname",
- "testpost",
- "tests", # unit
- "teststring",
- "trailers_callback",
- "transfer_status",
- "unit_setup", # unit
- "unit_stop", # unit
- "updateFdSet",
- "userdata",
- "websocket",
- "websocket_close",
- "write_callback",
- "write_cb",
- "writecb",
- "xferinfo",
- );
-
-# TODO: Some of these may be #undef-ed manually at the end of each source
-my @reused_macros = (
- "HEADER_REQUEST",
- "NUM_HANDLES",
- "SAFETY_MARGIN",
- "TEST_HANG_TIMEOUT",
- );
-
my $tlist = "";
while(my $line = <$fh>) {
@@ -131,7 +57,7 @@ while(my $line = <$fh>) {
my $src = "$2.c";
# Make common symbols unique across test sources
- foreach my $symb ("test", @reused_symbols) {
+ foreach my $symb ("test", "unit_setup", "unit_stop") {
print "#undef $symb\n";
print "#define $symb ${symb}_$name\n";
}
@@ -139,14 +65,7 @@ while(my $line = <$fh>) {
print "#define $namu\n";
print "#include \"$src\"\n";
print "#undef $namu\n";
-
- # Reset macros re-used by multiple tests
- foreach my $undef ("test", @reused_macros) {
- print "#undef $undef\n";
- }
-
print "\n";
-
$tlist .= " {\"$name\", test_$name},\n";
}
}
tests/server/first.c+1 -1
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
main_func = NULL;
{
size_t tmp;
- for(tmp = 0; s_mains[tmp].ptr; ++tmp) {
+ for(tmp = 0; tmp < CURL_ARRAYSIZE(s_mains); ++tmp) {
if(strcmp(main_name, s_mains[tmp].name) == 0) {
main_func = s_mains[tmp].ptr;
break;
tests/server/mk-bundle.pl+1 -4
@@ -25,8 +25,6 @@
# Bundle up individual tests into a single binary. The resulting binary can run
# individual tests by passing their name (without '.c') as the first argument.
-#
-# Usage: mk-bundle.pl [<server_c>]
use strict;
use warnings;
@@ -82,8 +80,7 @@ foreach my $src (@src) {
print <<FOOTER
static const struct onemain s_mains[] = {
-${tlist} {NULL, NULL}
-};
+$tlist};
#include "first.c"
FOOTER
tests/unit/unit1302.c+4 -4
@@ -28,15 +28,15 @@
#include "curlx/base64.h"
#include "memdebug.h" /* LAST include file */
-static struct Curl_easy *testdata;
+static struct Curl_easy *t1302_easy;
static CURLcode unit_setup(void)
{
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
- testdata = curl_easy_init();
- if(!testdata) {
+ t1302_easy = curl_easy_init();
+ if(!t1302_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
@@ -45,7 +45,7 @@ static CURLcode unit_setup(void)
static void unit_stop(void)
{
- curl_easy_cleanup(testdata);
+ curl_easy_cleanup(t1302_easy);
curl_global_cleanup();
}
tests/unit/unit1303.c+11 -11
@@ -27,15 +27,15 @@
#include "connect.h"
#include "memdebug.h" /* LAST include file */
-static struct Curl_easy *testdata;
+static struct Curl_easy *t1303_easy;
static CURLcode unit_setup(void)
{
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
- testdata = curl_easy_init();
- if(!testdata) {
+ t1303_easy = curl_easy_init();
+ if(!t1303_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
@@ -44,7 +44,7 @@ static CURLcode unit_setup(void)
static void unit_stop(void)
{
- curl_easy_cleanup(testdata);
+ curl_easy_cleanup(t1303_easy);
curl_global_cleanup();
}
@@ -55,8 +55,8 @@ static void unit_stop(void)
/* macro to set the pretended current time */
#define NOW(x,y) now.tv_sec = x; now.tv_usec = y
/* macro to set the millisecond based timeouts to use */
-#define TIMEOUTS(x,y) testdata->set.timeout = x; \
- testdata->set.connecttimeout = y
+#define TIMEOUTS(x,y) t1303_easy->set.timeout = x; \
+ t1303_easy->set.connecttimeout = y
/*
* To test:
@@ -137,16 +137,16 @@ UNITTEST_START
};
/* this is the pretended start time of the transfer */
- testdata->progress.t_startsingle.tv_sec = BASE;
- testdata->progress.t_startsingle.tv_usec = 0;
- testdata->progress.t_startop.tv_sec = BASE;
- testdata->progress.t_startop.tv_usec = 0;
+ t1303_easy->progress.t_startsingle.tv_sec = BASE;
+ t1303_easy->progress.t_startsingle.tv_usec = 0;
+ t1303_easy->progress.t_startop.tv_sec = BASE;
+ t1303_easy->progress.t_startop.tv_usec = 0;
for(i = 0; i < CURL_ARRAYSIZE(run); i++) {
timediff_t timeout;
NOW(run[i].now_s, run[i].now_us);
TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms);
- timeout = Curl_timeleft(testdata, &now, run[i].connecting);
+ timeout = Curl_timeleft(t1303_easy, &now, run[i].connecting);
if(timeout != run[i].result)
fail(run[i].comment);
}
tests/unit/unit1305.c+4 -4
@@ -40,15 +40,15 @@
#include "memdebug.h" /* LAST include file */
-static struct Curl_easy *testdata;
+static struct Curl_easy *t1305_easy;
static struct Curl_dnscache hp;
static char *data_key;
static struct Curl_dns_entry *data_node;
static CURLcode unit_setup(void)
{
- testdata = curl_easy_init();
- if(!testdata) {
+ t1305_easy = curl_easy_init();
+ if(!t1305_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
@@ -66,7 +66,7 @@ static void unit_stop(void)
free(data_key);
Curl_dnscache_destroy(&hp);
- curl_easy_cleanup(testdata);
+ curl_easy_cleanup(t1305_easy);
curl_global_cleanup();
}
tests/unit/unit1307.c+197 -196
@@ -57,202 +57,6 @@ static void unit_stop(void)
#define MAC_NOMATCH ((CURL_FNMATCH_NOMATCH << MAC_SHIFT) | MAC_DIFFER)
#define MAC_FAIL ((CURL_FNMATCH_FAIL << MAC_SHIFT) | MAC_DIFFER)
-struct testcase {
- const char *pattern;
- const char *string;
- int result;
-};
-
-static const struct testcase tests[] = {
- /* brackets syntax */
- {"*[*[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
- "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
- "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\001\177[[[[[[[[[[[[[[[[[[[[[",
- "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
- "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
- "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[",
- NOMATCH|MAC_FAIL},
-
- { "\\[", "[", MATCH },
- { "[", "[", NOMATCH|LINUX_MATCH|MAC_FAIL},
- { "[]", "[]", NOMATCH|LINUX_MATCH|MAC_FAIL},
- { "[][]", "[", MATCH },
- { "[][]", "]", MATCH },
- { "[[]", "[", MATCH },
- { "[[[]", "[", MATCH },
- { "[[[[]", "[", MATCH },
- { "[[[[]", "[", MATCH },
-
- { "[][[]", "]", MATCH },
- { "[][[[]", "[", MATCH },
- { "[[]", "]", NOMATCH },
-
- { "[a@]", "a", MATCH },
-
- { "[a-z]", "a", MATCH },
- { "[a-z]", "A", NOMATCH },
- { "?[a-z]", "?Z", NOMATCH },
- { "[A-Z]", "C", MATCH },
- { "[A-Z]", "c", NOMATCH },
- { "[0-9]", "7", MATCH },
- { "[7-8]", "7", MATCH },
- { "[7-]", "7", MATCH },
- { "[7-]", "-", MATCH },
- { "[7-]", "[", NOMATCH },
- { "[a-bA-F]", "F", MATCH },
- { "[a-bA-B9]", "9", MATCH },
- { "[a-bA-B98]", "8", MATCH },
- { "[a-bA-B98]", "C", NOMATCH },
- { "[a-bA-Z9]", "F", MATCH },
- { "[a-bA-Z9]ero*", "Zero chance.", MATCH },
- { "S[a-][x]opho*", "Saxophone", MATCH },
- { "S[a-][x]opho*", "SaXophone", NOMATCH },
- { "S[a-][x]*.txt", "S-x.txt", MATCH },
- { "[\\a-\\b]", "a", MATCH },
- { "[\\a-\\b]", "b", MATCH },
- { "[?*[][?*[][?*[]", "?*[", MATCH },
- { "[][?*-]", "]", MATCH },
- { "[][?*-]", "[", MATCH },
- { "[][?*-]", "?", MATCH },
- { "[][?*-]", "*", MATCH },
- { "[][?*-]", "-", MATCH },
- { "[]?*-]", "-", MATCH },
- { "[\xFF]", "\xFF", MATCH|LINUX_FAIL|MAC_FAIL},
- { "?/b/c", "a/b/c", MATCH },
- { "^_{}~", "^_{}~", MATCH },
- { "!#%+,-./01234567889", "!#%+,-./01234567889", MATCH },
- { "PQRSTUVWXYZ]abcdefg", "PQRSTUVWXYZ]abcdefg", MATCH },
- { ":;=@ABCDEFGHIJKLMNO", ":;=@ABCDEFGHIJKLMNO", MATCH },
-
- /* negate */
- { "[!a]", "b", MATCH },
- { "[!a]", "a", NOMATCH },
- { "[^a]", "b", MATCH },
- { "[^a]", "a", NOMATCH },
- { "[^a-z0-9A-Z]", "a", NOMATCH },
- { "[^a-z0-9A-Z]", "-", MATCH },
- { "curl[!a-z]lib", "curl lib", MATCH },
- { "curl[! ]lib", "curl lib", NOMATCH },
- { "[! ][ ]", " ", NOMATCH },
- { "[! ][ ]", "a ", MATCH },
- { "*[^a].t?t", "a.txt", NOMATCH },
- { "*[^a].t?t", "ba.txt", NOMATCH },
- { "*[^a].t?t", "ab.txt", MATCH },
- { "*[^a]", "", NOMATCH },
- { "[!\xFF]", "", NOMATCH|LINUX_FAIL},
- { "[!\xFF]", "\xFF", NOMATCH|LINUX_FAIL|MAC_FAIL},
- { "[!\xFF]", "a", MATCH|LINUX_FAIL|MAC_FAIL},
- { "[!?*[]", "?", NOMATCH },
- { "[!!]", "!", NOMATCH },
- { "[!!]", "x", MATCH },
-
- { "[[:alpha:]]", "a", MATCH },
- { "[[:alpha:]]", "9", NOMATCH },
- { "[[:alnum:]]", "a", MATCH },
- { "[[:alnum:]]", "[", NOMATCH },
- { "[[:alnum:]]", "]", NOMATCH },
- { "[[:alnum:]]", "9", MATCH },
- { "[[:digit:]]", "9", MATCH },
- { "[[:xdigit:]]", "9", MATCH },
- { "[[:xdigit:]]", "F", MATCH },
- { "[[:xdigit:]]", "G", NOMATCH },
- { "[[:upper:]]", "U", MATCH },
- { "[[:upper:]]", "u", NOMATCH },
- { "[[:lower:]]", "l", MATCH },
- { "[[:lower:]]", "L", NOMATCH },
- { "[[:print:]]", "L", MATCH },
- { "[[:print:]]", "\10", NOMATCH },
- { "[[:print:]]", "\10", NOMATCH },
- { "[[:space:]]", " ", MATCH },
- { "[[:space:]]", "x", NOMATCH },
- { "[[:graph:]]", " ", NOMATCH },
- { "[[:graph:]]", "x", MATCH },
- { "[[:blank:]]", "\t", MATCH },
- { "[[:blank:]]", " ", MATCH },
- { "[[:blank:]]", "\r", NOMATCH },
- { "[^[:blank:]]", "\t", NOMATCH },
- { "[^[:print:]]", "\10", MATCH },
- { "[[:lower:]][[:lower:]]", "ll", MATCH },
- { "[[:foo:]]", "bar", NOMATCH|MAC_FAIL},
- { "[[:foo:]]", "f]", MATCH|LINUX_NOMATCH|MAC_FAIL},
-
- { "Curl[[:blank:]];-)", "Curl ;-)", MATCH },
- { "*[[:blank:]]*", " ", MATCH },
- { "*[[:blank:]]*", "", NOMATCH },
- { "*[[:blank:]]*", "hi, im_Pavel", MATCH },
-
- /* common using */
- { "filename.dat", "filename.dat", MATCH },
- { "*curl*", "lets use curl!!", MATCH },
- { "filename.txt", "filename.dat", NOMATCH },
- { "*.txt", "text.txt", MATCH },
- { "*.txt", "a.txt", MATCH },
- { "*.txt", ".txt", MATCH },
- { "*.txt", "txt", NOMATCH },
- { "??.txt", "99.txt", MATCH },
- { "??.txt", "a99.txt", NOMATCH },
- { "?.???", "a.txt", MATCH },
- { "*.???", "somefile.dat", MATCH },
- { "*.???", "photo.jpeg", NOMATCH },
- { ".*", ".htaccess", MATCH },
- { ".*", ".", MATCH },
- { ".*", "..", MATCH },
-
- /* many stars => one star */
- { "**.txt", "text.txt", MATCH },
- { "***.txt", "t.txt", MATCH },
- { "****.txt", ".txt", MATCH },
-
- /* empty string or pattern */
- { "", "", MATCH },
- { "", "hello", NOMATCH },
- { "file", "", NOMATCH },
- { "?", "", NOMATCH },
- { "*", "", MATCH },
- { "x", "", NOMATCH },
-
- /* backslash */
- { "\\", "\\", MATCH|LINUX_NOMATCH},
- { "\\\\", "\\", MATCH },
- { "\\\\", "\\\\", NOMATCH },
- { "\\?", "?", MATCH },
- { "\\*", "*", MATCH },
- { "?.txt", "?.txt", MATCH },
- { "*.txt", "*.txt", MATCH },
- { "\\?.txt", "?.txt", MATCH },
- { "\\*.txt", "*.txt", MATCH },
- { "\\?.txt", "x.txt", NOMATCH },
- { "\\*.txt", "x.txt", NOMATCH },
- { "\\*\\\\.txt", "*\\.txt", MATCH },
- { "*\\**\\?*\\\\*", "cc*cc?cccc", NOMATCH },
- { "*\\?*\\**", "cc?cc", NOMATCH },
- { "\\\"\\$\\&\\'\\(\\)", "\"$&'()", MATCH },
- { "\\*\\?\\[\\\\\\`\\|", "*?[\\`|", MATCH },
- { "[\\a\\b]c", "ac", MATCH },
- { "[\\a\\b]c", "bc", MATCH },
- { "[\\a\\b]d", "bc", NOMATCH },
- { "[a-bA-B\\?]", "?", MATCH },
- { "cu[a-ab-b\\r]l", "curl", MATCH },
- { "[\\a-z]", "c", MATCH },
-
- { "?*?*?.*?*", "abc.c", MATCH },
- { "?*?*?.*?*", "abcc", NOMATCH },
- { "?*?*?.*?*", "abc.", NOMATCH },
- { "?*?*?.*?*", "abc.c++", MATCH },
- { "?*?*?.*?*", "abcdef.c++", MATCH },
- { "?*?*?.?", "abcdef.c", MATCH },
- { "?*?*?.?", "abcdef.cd", NOMATCH },
-
- /* https://codepoints.net/U+00E4 Latin Small Letter A with Diaeresis */
- { "Lindm\xc3\xa4tarv", "Lindm\xc3\xa4tarv", MATCH },
-
- { "", "", MATCH},
- {"**]*[*[\x13]**[*\x13)]*]*[**[*\x13~r-]*]**[.*]*[\xe3\xe3\xe3\xe3\xe3\xe3"
- "\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3"
- "\xe3\xe3\xe3\xe3\xe3*[\x13]**[*\x13)]*]*[*[\x13]*[~r]*]*\xba\x13\xa6~b-]*",
- "a", NOMATCH|LINUX_FAIL}
-};
-
static const char *ret2name(int i)
{
switch(i) {
@@ -276,6 +80,203 @@ enum system {
UNITTEST_START
{
+ struct testcase {
+ const char *pattern;
+ const char *string;
+ int result;
+ };
+
+ static const struct testcase tests[] = {
+ /* brackets syntax */
+ {"*[*[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
+ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
+ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\001\177[[[[[[[[[[[[[[[[[[[[[",
+ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
+ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
+ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[",
+ NOMATCH|MAC_FAIL},
+
+ { "\\[", "[", MATCH },
+ { "[", "[", NOMATCH|LINUX_MATCH|MAC_FAIL},
+ { "[]", "[]", NOMATCH|LINUX_MATCH|MAC_FAIL},
+ { "[][]", "[", MATCH },
+ { "[][]", "]", MATCH },
+ { "[[]", "[", MATCH },
+ { "[[[]", "[", MATCH },
+ { "[[[[]", "[", MATCH },
+ { "[[[[]", "[", MATCH },
+
+ { "[][[]", "]", MATCH },
+ { "[][[[]", "[", MATCH },
+ { "[[]", "]", NOMATCH },
+
+ { "[a@]", "a", MATCH },
+
+ { "[a-z]", "a", MATCH },
+ { "[a-z]", "A", NOMATCH },
+ { "?[a-z]", "?Z", NOMATCH },
+ { "[A-Z]", "C", MATCH },
+ { "[A-Z]", "c", NOMATCH },
+ { "[0-9]", "7", MATCH },
+ { "[7-8]", "7", MATCH },
+ { "[7-]", "7", MATCH },
+ { "[7-]", "-", MATCH },
+ { "[7-]", "[", NOMATCH },
+ { "[a-bA-F]", "F", MATCH },
+ { "[a-bA-B9]", "9", MATCH },
+ { "[a-bA-B98]", "8", MATCH },
+ { "[a-bA-B98]", "C", NOMATCH },
+ { "[a-bA-Z9]", "F", MATCH },
+ { "[a-bA-Z9]ero*", "Zero chance.", MATCH },
+ { "S[a-][x]opho*", "Saxophone", MATCH },
+ { "S[a-][x]opho*", "SaXophone", NOMATCH },
+ { "S[a-][x]*.txt", "S-x.txt", MATCH },
+ { "[\\a-\\b]", "a", MATCH },
+ { "[\\a-\\b]", "b", MATCH },
+ { "[?*[][?*[][?*[]", "?*[", MATCH },
+ { "[][?*-]", "]", MATCH },
+ { "[][?*-]", "[", MATCH },
+ { "[][?*-]", "?", MATCH },
+ { "[][?*-]", "*", MATCH },
+ { "[][?*-]", "-", MATCH },
+ { "[]?*-]", "-", MATCH },
+ { "[\xFF]", "\xFF", MATCH|LINUX_FAIL|MAC_FAIL},
+ { "?/b/c", "a/b/c", MATCH },
+ { "^_{}~", "^_{}~", MATCH },
+ { "!#%+,-./01234567889", "!#%+,-./01234567889", MATCH },
+ { "PQRSTUVWXYZ]abcdefg", "PQRSTUVWXYZ]abcdefg", MATCH },
+ { ":;=@ABCDEFGHIJKLMNO", ":;=@ABCDEFGHIJKLMNO", MATCH },
+
+ /* negate */
+ { "[!a]", "b", MATCH },
+ { "[!a]", "a", NOMATCH },
+ { "[^a]", "b", MATCH },
+ { "[^a]", "a", NOMATCH },
+ { "[^a-z0-9A-Z]", "a", NOMATCH },
+ { "[^a-z0-9A-Z]", "-", MATCH },
+ { "curl[!a-z]lib", "curl lib", MATCH },
+ { "curl[! ]lib", "curl lib", NOMATCH },
+ { "[! ][ ]", " ", NOMATCH },
+ { "[! ][ ]", "a ", MATCH },
+ { "*[^a].t?t", "a.txt", NOMATCH },
+ { "*[^a].t?t", "ba.txt", NOMATCH },
+ { "*[^a].t?t", "ab.txt", MATCH },
+ { "*[^a]", "", NOMATCH },
+ { "[!\xFF]", "", NOMATCH|LINUX_FAIL},
+ { "[!\xFF]", "\xFF", NOMATCH|LINUX_FAIL|MAC_FAIL},
+ { "[!\xFF]", "a", MATCH|LINUX_FAIL|MAC_FAIL},
+ { "[!?*[]", "?", NOMATCH },
+ { "[!!]", "!", NOMATCH },
+ { "[!!]", "x", MATCH },
+
+ { "[[:alpha:]]", "a", MATCH },
+ { "[[:alpha:]]", "9", NOMATCH },
+ { "[[:alnum:]]", "a", MATCH },
+ { "[[:alnum:]]", "[", NOMATCH },
+ { "[[:alnum:]]", "]", NOMATCH },
+ { "[[:alnum:]]", "9", MATCH },
+ { "[[:digit:]]", "9", MATCH },
+ { "[[:xdigit:]]", "9", MATCH },
+ { "[[:xdigit:]]", "F", MATCH },
+ { "[[:xdigit:]]", "G", NOMATCH },
+ { "[[:upper:]]", "U", MATCH },
+ { "[[:upper:]]", "u", NOMATCH },
+ { "[[:lower:]]", "l", MATCH },
+ { "[[:lower:]]", "L", NOMATCH },
+ { "[[:print:]]", "L", MATCH },
+ { "[[:print:]]", "\10", NOMATCH },
+ { "[[:print:]]", "\10", NOMATCH },
+ { "[[:space:]]", " ", MATCH },
+ { "[[:space:]]", "x", NOMATCH },
+ { "[[:graph:]]", " ", NOMATCH },
+ { "[[:graph:]]", "x", MATCH },
+ { "[[:blank:]]", "\t", MATCH },
+ { "[[:blank:]]", " ", MATCH },
+ { "[[:blank:]]", "\r", NOMATCH },
+ { "[^[:blank:]]", "\t", NOMATCH },
+ { "[^[:print:]]", "\10", MATCH },
+ { "[[:lower:]][[:lower:]]", "ll", MATCH },
+ { "[[:foo:]]", "bar", NOMATCH|MAC_FAIL},
+ { "[[:foo:]]", "f]", MATCH|LINUX_NOMATCH|MAC_FAIL},
+
+ { "Curl[[:blank:]];-)", "Curl ;-)", MATCH },
+ { "*[[:blank:]]*", " ", MATCH },
+ { "*[[:blank:]]*", "", NOMATCH },
+ { "*[[:blank:]]*", "hi, im_Pavel", MATCH },
+
+ /* common using */
+ { "filename.dat", "filename.dat", MATCH },
+ { "*curl*", "lets use curl!!", MATCH },
+ { "filename.txt", "filename.dat", NOMATCH },
+ { "*.txt", "text.txt", MATCH },
+ { "*.txt", "a.txt", MATCH },
+ { "*.txt", ".txt", MATCH },
+ { "*.txt", "txt", NOMATCH },
+ { "??.txt", "99.txt", MATCH },
+ { "??.txt", "a99.txt", NOMATCH },
+ { "?.???", "a.txt", MATCH },
+ { "*.???", "somefile.dat", MATCH },
+ { "*.???", "photo.jpeg", NOMATCH },
+ { ".*", ".htaccess", MATCH },
+ { ".*", ".", MATCH },
+ { ".*", "..", MATCH },
+
+ /* many stars => one star */
+ { "**.txt", "text.txt", MATCH },
+ { "***.txt", "t.txt", MATCH },
+ { "****.txt", ".txt", MATCH },
+
+ /* empty string or pattern */
+ { "", "", MATCH },
+ { "", "hello", NOMATCH },
+ { "file", "", NOMATCH },
+ { "?", "", NOMATCH },
+ { "*", "", MATCH },
+ { "x", "", NOMATCH },
+
+ /* backslash */
+ { "\\", "\\", MATCH|LINUX_NOMATCH},
+ { "\\\\", "\\", MATCH },
+ { "\\\\", "\\\\", NOMATCH },
+ { "\\?", "?", MATCH },
+ { "\\*", "*", MATCH },
+ { "?.txt", "?.txt", MATCH },
+ { "*.txt", "*.txt", MATCH },
+ { "\\?.txt", "?.txt", MATCH },
+ { "\\*.txt", "*.txt", MATCH },
+ { "\\?.txt", "x.txt", NOMATCH },
+ { "\\*.txt", "x.txt", NOMATCH },
+ { "\\*\\\\.txt", "*\\.txt", MATCH },
+ { "*\\**\\?*\\\\*", "cc*cc?cccc", NOMATCH },
+ { "*\\?*\\**", "cc?cc", NOMATCH },
+ { "\\\"\\$\\&\\'\\(\\)", "\"$&'()", MATCH },
+ { "\\*\\?\\[\\\\\\`\\|", "*?[\\`|", MATCH },
+ { "[\\a\\b]c", "ac", MATCH },
+ { "[\\a\\b]c", "bc", MATCH },
+ { "[\\a\\b]d", "bc", NOMATCH },
+ { "[a-bA-B\\?]", "?", MATCH },
+ { "cu[a-ab-b\\r]l", "curl", MATCH },
+ { "[\\a-z]", "c", MATCH },
+
+ { "?*?*?.*?*", "abc.c", MATCH },
+ { "?*?*?.*?*", "abcc", NOMATCH },
+ { "?*?*?.*?*", "abc.", NOMATCH },
+ { "?*?*?.*?*", "abc.c++", MATCH },
+ { "?*?*?.*?*", "abcdef.c++", MATCH },
+ { "?*?*?.?", "abcdef.c", MATCH },
+ { "?*?*?.?", "abcdef.cd", NOMATCH },
+
+ /* https://codepoints.net/U+00E4 Latin Small Letter A with Diaeresis */
+ { "Lindm\xc3\xa4tarv", "Lindm\xc3\xa4tarv", MATCH },
+
+ { "", "", MATCH},
+ {"**]*[*[\x13]**[*\x13)]*]*[**[*\x13~r-]*]**[.*]*[\xe3\xe3\xe3\xe3\xe3\xe3"
+ "\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3\xe3"
+ "\xe3\xe3\xe3\xe3\xe3*[\x13]**[*\x13)]*]*[*[\x13]*[~r]*]*\xba\x13\xa6~b-]"
+ "*",
+ "a", NOMATCH|LINUX_FAIL}
+ };
+
int i;
enum system machine;
tests/unit/unit1397.c+59 -58
@@ -36,67 +36,68 @@ static void unit_stop(void)
/* only these backends define the tested functions */
#if defined(USE_OPENSSL) || defined(USE_SCHANNEL)
#include "vtls/hostcheck.h"
-struct testcase {
- const char *host;
- const char *pattern;
- bool match;
-};
-
-static struct testcase tests[] = {
- {"", "", FALSE},
- {"a", "", FALSE},
- {"", "b", FALSE},
- {"a", "b", FALSE},
- {"aa", "bb", FALSE},
- {"\xff", "\xff", TRUE},
- {"aa.aa.aa", "aa.aa.bb", FALSE},
- {"aa.aa.aa", "aa.aa.aa", TRUE},
- {"aa.aa.aa", "*.aa.bb", FALSE},
- {"aa.aa.aa", "*.aa.aa", TRUE},
- {"192.168.0.1", "192.168.0.1", TRUE},
- {"192.168.0.1", "*.168.0.1", FALSE},
- {"192.168.0.1", "*.0.1", FALSE},
- {"h.ello", "*.ello", FALSE},
- {"h.ello.", "*.ello", FALSE},
- {"h.ello", "*.ello.", FALSE},
- {"h.e.llo", "*.e.llo", TRUE},
- {"h.e.llo", " *.e.llo", FALSE},
- {" h.e.llo", "*.e.llo", TRUE},
- {"h.e.llo.", "*.e.llo", TRUE},
- {"*.e.llo.", "*.e.llo", TRUE},
- {"************.e.llo.", "*.e.llo", TRUE},
- {"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
- "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
- "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
- "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
- "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
- ".e.llo.", "*.e.llo", TRUE},
- {"\xfe\xfe.e.llo.", "*.e.llo", TRUE},
- {"h.e.llo.", "*.e.llo.", TRUE},
- {"h.e.llo", "*.e.llo.", TRUE},
- {".h.e.llo", "*.e.llo.", FALSE},
- {"h.e.llo", "*.*.llo.", FALSE},
- {"h.e.llo", "h.*.llo", FALSE},
- {"h.e.llo", "h.e.*", FALSE},
- {"hello", "*.ello", FALSE},
- {"hello", "**llo", FALSE},
- {"bar.foo.example.com", "*.example.com", FALSE},
- {"foo.example.com", "*.example.com", TRUE},
- {"baz.example.net", "b*z.example.net", FALSE},
- {"foobaz.example.net", "*baz.example.net", FALSE},
- {"xn--l8j.example.local", "x*.example.local", FALSE},
- {"xn--l8j.example.net", "*.example.net", TRUE},
- {"xn--l8j.example.net", "*j.example.net", FALSE},
- {"xn--l8j.example.net", "xn--l8j.example.net", TRUE},
- {"xn--l8j.example.net", "xn--l8j.*.net", FALSE},
- {"xl8j.example.net", "*.example.net", TRUE},
- {"fe80::3285:a9ff:fe46:b619", "*::3285:a9ff:fe46:b619", FALSE},
- {"fe80::3285:a9ff:fe46:b619", "fe80::3285:a9ff:fe46:b619", TRUE},
- {NULL, NULL, FALSE}
-};
UNITTEST_START
{
+ struct testcase {
+ const char *host;
+ const char *pattern;
+ bool match;
+ };
+
+ static struct testcase tests[] = {
+ {"", "", FALSE},
+ {"a", "", FALSE},
+ {"", "b", FALSE},
+ {"a", "b", FALSE},
+ {"aa", "bb", FALSE},
+ {"\xff", "\xff", TRUE},
+ {"aa.aa.aa", "aa.aa.bb", FALSE},
+ {"aa.aa.aa", "aa.aa.aa", TRUE},
+ {"aa.aa.aa", "*.aa.bb", FALSE},
+ {"aa.aa.aa", "*.aa.aa", TRUE},
+ {"192.168.0.1", "192.168.0.1", TRUE},
+ {"192.168.0.1", "*.168.0.1", FALSE},
+ {"192.168.0.1", "*.0.1", FALSE},
+ {"h.ello", "*.ello", FALSE},
+ {"h.ello.", "*.ello", FALSE},
+ {"h.ello", "*.ello.", FALSE},
+ {"h.e.llo", "*.e.llo", TRUE},
+ {"h.e.llo", " *.e.llo", FALSE},
+ {" h.e.llo", "*.e.llo", TRUE},
+ {"h.e.llo.", "*.e.llo", TRUE},
+ {"*.e.llo.", "*.e.llo", TRUE},
+ {"************.e.llo.", "*.e.llo", TRUE},
+ {"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
+ "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
+ "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
+ "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
+ ".e.llo.", "*.e.llo", TRUE},
+ {"\xfe\xfe.e.llo.", "*.e.llo", TRUE},
+ {"h.e.llo.", "*.e.llo.", TRUE},
+ {"h.e.llo", "*.e.llo.", TRUE},
+ {".h.e.llo", "*.e.llo.", FALSE},
+ {"h.e.llo", "*.*.llo.", FALSE},
+ {"h.e.llo", "h.*.llo", FALSE},
+ {"h.e.llo", "h.e.*", FALSE},
+ {"hello", "*.ello", FALSE},
+ {"hello", "**llo", FALSE},
+ {"bar.foo.example.com", "*.example.com", FALSE},
+ {"foo.example.com", "*.example.com", TRUE},
+ {"baz.example.net", "b*z.example.net", FALSE},
+ {"foobaz.example.net", "*baz.example.net", FALSE},
+ {"xn--l8j.example.local", "x*.example.local", FALSE},
+ {"xn--l8j.example.net", "*.example.net", TRUE},
+ {"xn--l8j.example.net", "*j.example.net", FALSE},
+ {"xn--l8j.example.net", "xn--l8j.example.net", TRUE},
+ {"xn--l8j.example.net", "xn--l8j.*.net", FALSE},
+ {"xl8j.example.net", "*.example.net", TRUE},
+ {"fe80::3285:a9ff:fe46:b619", "*::3285:a9ff:fe46:b619", FALSE},
+ {"fe80::3285:a9ff:fe46:b619", "fe80::3285:a9ff:fe46:b619", TRUE},
+ {NULL, NULL, FALSE}
+ };
+
int i;
for(i = 0; tests[i].host; i++) {
if(tests[i].match != Curl_cert_hostcheck(tests[i].pattern,
tests/unit/unit1398.c+8 -2
@@ -28,8 +28,14 @@
#pragma GCC diagnostic ignored "-Wformat"
#endif
-static CURLcode unit_setup(void) {return CURLE_OK;}
-static void unit_stop(void) {}
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+}
UNITTEST_START
tests/unit/unit1399.c+1 -2
@@ -28,14 +28,13 @@
static int usec_magnitude = 1000000;
-static bool unit_setup(void)
+static CURLcode unit_setup(void)
{
return CURLE_OK;
}
static void unit_stop(void)
{
-
}
/*
tests/unit/unit1600.c+4 -4
@@ -26,15 +26,15 @@
#include "urldata.h"
#include "curl_ntlm_core.h"
-static CURL *easy;
+static CURL *t1600_easy;
static CURLcode unit_setup(void)
{
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
- easy = curl_easy_init();
- if(!easy) {
+ t1600_easy = curl_easy_init();
+ if(!t1600_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
@@ -43,7 +43,7 @@ static CURLcode unit_setup(void)
static void unit_stop(void)
{
- curl_easy_cleanup(easy);
+ curl_easy_cleanup(t1600_easy);
curl_global_cleanup();
}
tests/unit/unit1602.c+8 -8
@@ -29,9 +29,9 @@
#include <memdebug.h> /* LAST include file */
-static struct Curl_hash hash_static;
+static struct Curl_hash t1602_hash_static;
-static void mydtor(void *p)
+static void t1602_mydtor(void *p)
{
int *ptr = (int *)p;
free(ptr);
@@ -39,14 +39,14 @@ static void mydtor(void *p)
static CURLcode unit_setup(void)
{
- Curl_hash_init(&hash_static, 7, Curl_hash_str,
- curlx_str_key_compare, mydtor);
+ Curl_hash_init(&t1602_hash_static, 7, Curl_hash_str,
+ curlx_str_key_compare, t1602_mydtor);
return CURLE_OK;
}
static void unit_stop(void)
{
- Curl_hash_destroy(&hash_static);
+ Curl_hash_destroy(&t1602_hash_static);
}
UNITTEST_START
@@ -62,17 +62,17 @@ UNITTEST_START
value = malloc(sizeof(int));
abort_unless(value != NULL, "Out of memory");
*value = 199;
- nodep = Curl_hash_add(&hash_static, &key, klen, value);
+ nodep = Curl_hash_add(&t1602_hash_static, &key, klen, value);
if(!nodep)
free(value);
abort_unless(nodep, "insertion into hash failed");
- Curl_hash_clean(&hash_static);
+ Curl_hash_clean(&t1602_hash_static);
/* Attempt to add another key/value pair */
value2 = malloc(sizeof(int));
abort_unless(value2 != NULL, "Out of memory");
*value2 = 204;
- nodep = Curl_hash_add(&hash_static, &key2, klen, value2);
+ nodep = Curl_hash_add(&t1602_hash_static, &key2, klen, value2);
if(!nodep)
free(value2);
abort_unless(nodep, "insertion into hash failed");
tests/unit/unit1603.c+37 -37
@@ -27,10 +27,10 @@
#include "hash.h"
#include <memdebug.h> /* LAST include file */
-static struct Curl_hash hash_static;
+static struct Curl_hash t1603_hash_static;
static const size_t slots = 3;
-static void mydtor(void *p)
+static void t1603_mydtor(void *p)
{
/* Data are statically allocated */
(void)p; /* unused */
@@ -48,14 +48,14 @@ static void my_elem_dtor(void *key, size_t key_len, void *p)
static CURLcode unit_setup(void)
{
- Curl_hash_init(&hash_static, slots, Curl_hash_str,
- curlx_str_key_compare, mydtor);
+ Curl_hash_init(&t1603_hash_static, slots, Curl_hash_str,
+ curlx_str_key_compare, t1603_mydtor);
return CURLE_OK;
}
static void unit_stop(void)
{
- Curl_hash_destroy(&hash_static);
+ Curl_hash_destroy(&t1603_hash_static);
}
UNITTEST_START
@@ -78,100 +78,100 @@ UNITTEST_START
"Warning: hashes are not computed as expected on this "
"architecture; test coverage will be less comprehensive\n");
- nodep = Curl_hash_add(&hash_static, &key1, strlen(key1), &key1);
+ nodep = Curl_hash_add(&t1603_hash_static, &key1, strlen(key1), &key1);
fail_unless(nodep, "insertion into hash failed");
- nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1));
fail_unless(nodep == key1, "hash retrieval failed");
- nodep = Curl_hash_add(&hash_static, &key2, strlen(key2), &key2);
+ nodep = Curl_hash_add(&t1603_hash_static, &key2, strlen(key2), &key2);
fail_unless(nodep, "insertion into hash failed");
- nodep = Curl_hash_pick(&hash_static, &key2, strlen(key2));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key2, strlen(key2));
fail_unless(nodep == key2, "hash retrieval failed");
- nodep = Curl_hash_add(&hash_static, &key3, strlen(key3), &key3);
+ nodep = Curl_hash_add(&t1603_hash_static, &key3, strlen(key3), &key3);
fail_unless(nodep, "insertion into hash failed");
- nodep = Curl_hash_pick(&hash_static, &key3, strlen(key3));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key3, strlen(key3));
fail_unless(nodep == key3, "hash retrieval failed");
/* The fourth element exceeds the number of slots & collides */
- nodep = Curl_hash_add(&hash_static, &key4, strlen(key4), &key4);
+ nodep = Curl_hash_add(&t1603_hash_static, &key4, strlen(key4), &key4);
fail_unless(nodep, "insertion into hash failed");
- nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4));
fail_unless(nodep == key4, "hash retrieval failed");
/* Make sure all elements are still accessible */
- nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1));
fail_unless(nodep == key1, "hash retrieval failed");
- nodep = Curl_hash_pick(&hash_static, &key2, strlen(key2));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key2, strlen(key2));
fail_unless(nodep == key2, "hash retrieval failed");
- nodep = Curl_hash_pick(&hash_static, &key3, strlen(key3));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key3, strlen(key3));
fail_unless(nodep == key3, "hash retrieval failed");
- nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4));
fail_unless(nodep == key4, "hash retrieval failed");
/* Delete the second of two entries in a bucket */
- rc = Curl_hash_delete(&hash_static, &key4, strlen(key4));
+ rc = Curl_hash_delete(&t1603_hash_static, &key4, strlen(key4));
fail_unless(rc == 0, "hash delete failed");
- nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1));
fail_unless(nodep == key1, "hash retrieval failed");
- nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4));
fail_unless(!nodep, "hash retrieval should have failed");
/* Insert that deleted node again */
- nodep = Curl_hash_add(&hash_static, &key4, strlen(key4), &key4);
+ nodep = Curl_hash_add(&t1603_hash_static, &key4, strlen(key4), &key4);
fail_unless(nodep, "insertion into hash failed");
- nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4));
fail_unless(nodep == key4, "hash retrieval failed");
/* Delete the first of two entries in a bucket */
- rc = Curl_hash_delete(&hash_static, &key1, strlen(key1));
+ rc = Curl_hash_delete(&t1603_hash_static, &key1, strlen(key1));
fail_unless(rc == 0, "hash delete failed");
- nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1));
fail_unless(!nodep, "hash retrieval should have failed");
- nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4));
fail_unless(nodep == key4, "hash retrieval failed");
/* Delete the remaining one of two entries in a bucket */
- rc = Curl_hash_delete(&hash_static, &key4, strlen(key4));
+ rc = Curl_hash_delete(&t1603_hash_static, &key4, strlen(key4));
fail_unless(rc == 0, "hash delete failed");
- nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1));
fail_unless(!nodep, "hash retrieval should have failed");
- nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4));
fail_unless(!nodep, "hash retrieval should have failed");
/* Delete an already deleted node */
- rc = Curl_hash_delete(&hash_static, &key4, strlen(key4));
+ rc = Curl_hash_delete(&t1603_hash_static, &key4, strlen(key4));
fail_unless(rc, "hash delete should have failed");
/* Replace an existing node */
- nodep = Curl_hash_add(&hash_static, &key1, strlen(key1), &notakey);
+ nodep = Curl_hash_add(&t1603_hash_static, &key1, strlen(key1), &notakey);
fail_unless(nodep, "insertion into hash failed");
- nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1));
fail_unless(nodep == notakey, "hash retrieval failed");
/* Make sure all remaining elements are still accessible */
- nodep = Curl_hash_pick(&hash_static, &key2, strlen(key2));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key2, strlen(key2));
fail_unless(nodep == key2, "hash retrieval failed");
- nodep = Curl_hash_pick(&hash_static, &key3, strlen(key3));
+ nodep = Curl_hash_pick(&t1603_hash_static, &key3, strlen(key3));
fail_unless(nodep == key3, "hash retrieval failed");
/* Add element with own destructor */
- nodep = Curl_hash_add2(&hash_static, &key1, strlen(key1), &key1,
+ nodep = Curl_hash_add2(&t1603_hash_static, &key1, strlen(key1), &key1,
my_elem_dtor);
fail_unless(nodep, "add2 insertion into hash failed");
fail_unless(elem_dtor_calls == 0, "element destructor count should be 0");
/* Add it again, should invoke destructor on first */
- nodep = Curl_hash_add2(&hash_static, &key1, strlen(key1), &key1,
+ nodep = Curl_hash_add2(&t1603_hash_static, &key1, strlen(key1), &key1,
my_elem_dtor);
fail_unless(nodep, "add2 again, insertion into hash failed");
fail_unless(elem_dtor_calls == 1, "element destructor count should be 1");
/* remove, should invoke destructor */
- rc = Curl_hash_delete(&hash_static, &key1, strlen(key1));
+ rc = Curl_hash_delete(&t1603_hash_static, &key1, strlen(key1));
fail_unless(rc == 0, "hash delete failed");
fail_unless(elem_dtor_calls == 2, "element destructor count should be 1");
/* Clean up */
- Curl_hash_clean(&hash_static);
+ Curl_hash_clean(&t1603_hash_static);
UNITTEST_STOP
tests/unit/unit1605.c+6 -6
@@ -25,15 +25,15 @@
#include "llist.h"
-static CURL *easy;
+static CURL *t1605_easy;
static CURLcode unit_setup(void)
{
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
- easy = curl_easy_init();
- if(!easy) {
+ t1605_easy = curl_easy_init();
+ if(!t1605_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
@@ -42,7 +42,7 @@ static CURLcode unit_setup(void)
static void unit_stop(void)
{
- curl_easy_cleanup(easy);
+ curl_easy_cleanup(t1605_easy);
curl_global_cleanup();
}
@@ -50,10 +50,10 @@ UNITTEST_START
int len;
char *esc;
- esc = curl_easy_escape(easy, "", -1);
+ esc = curl_easy_escape(t1605_easy, "", -1);
fail_unless(esc == NULL, "negative string length can't work");
- esc = curl_easy_unescape(easy, "%41%41%41%41", -1, &len);
+ esc = curl_easy_unescape(t1605_easy, "%41%41%41%41", -1, &len);
fail_unless(esc == NULL, "negative string length can't work");
UNITTEST_STOP
tests/unit/unit1606.c+9 -9
@@ -26,15 +26,15 @@
#include "speedcheck.h"
#include "urldata.h"
-static struct Curl_easy *easy;
+static struct Curl_easy *t1606_easy;
static CURLcode unit_setup(void)
{
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
- easy = curl_easy_init();
- if(!easy) {
+ t1606_easy = curl_easy_init();
+ if(!t1606_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
@@ -43,7 +43,7 @@ static CURLcode unit_setup(void)
static void unit_stop(void)
{
- curl_easy_cleanup(easy);
+ curl_easy_cleanup(t1606_easy);
curl_global_cleanup();
}
@@ -57,14 +57,14 @@ static int runawhile(long time_limit,
CURLcode result;
int finaltime;
- curl_easy_setopt(easy, CURLOPT_LOW_SPEED_LIMIT, speed_limit);
- curl_easy_setopt(easy, CURLOPT_LOW_SPEED_TIME, time_limit);
- Curl_speedinit(easy);
+ curl_easy_setopt(t1606_easy, CURLOPT_LOW_SPEED_LIMIT, speed_limit);
+ curl_easy_setopt(t1606_easy, CURLOPT_LOW_SPEED_TIME, time_limit);
+ Curl_speedinit(t1606_easy);
do {
/* fake the current transfer speed */
- easy->progress.current_speed = speed;
- result = Curl_speedcheck(easy, now);
+ t1606_easy->progress.current_speed = speed;
+ result = Curl_speedcheck(t1606_easy, now);
if(result)
break;
/* step the time */
tests/unit/unit1607.c+53 -55
@@ -42,23 +42,6 @@ static CURLcode unit_setup(void)
return res;
}
-
-struct testcase {
- /* host:port:address[,address]... */
- const char *optval;
-
- /* lowercase host and port to retrieve the addresses from hostcache */
- const char *host;
- int port;
-
- /* whether we expect a permanent or non-permanent cache entry */
- bool permanent;
-
- /* 0 to 9 addresses expected from hostcache */
- const char *address[10];
-};
-
-
/* In builds without IPv6 support CURLOPT_RESOLVE should skip over those
addresses, so we have to do that as well. */
static const char skip = 0;
@@ -68,46 +51,61 @@ static const char skip = 0;
#define IPV6ONLY(x) &skip
#endif
-/* CURLOPT_RESOLVE address parsing tests */
-static const struct testcase tests[] = {
- /* spaces aren't allowed, for now */
- { "test.com:80:127.0.0.1, 127.0.0.2",
- "test.com", 80, TRUE, { NULL, }
- },
- { "TEST.com:80:,,127.0.0.1,,,127.0.0.2,,,,::1,,,",
- "test.com", 80, TRUE, { "127.0.0.1", "127.0.0.2", IPV6ONLY("::1"), }
- },
- { "test.com:80:::1,127.0.0.1",
- "test.com", 80, TRUE, { IPV6ONLY("::1"), "127.0.0.1", }
- },
- { "test.com:80:[::1],127.0.0.1",
- "test.com", 80, TRUE, { IPV6ONLY("::1"), "127.0.0.1", }
- },
- { "test.com:80:::1",
- "test.com", 80, TRUE, { IPV6ONLY("::1"), }
- },
- { "test.com:80:[::1]",
- "test.com", 80, TRUE, { IPV6ONLY("::1"), }
- },
- { "test.com:80:127.0.0.1",
- "test.com", 80, TRUE, { "127.0.0.1", }
- },
- { "test.com:80:,127.0.0.1",
- "test.com", 80, TRUE, { "127.0.0.1", }
- },
- { "test.com:80:127.0.0.1,",
- "test.com", 80, TRUE, { "127.0.0.1", }
- },
- { "test.com:0:127.0.0.1",
- "test.com", 0, TRUE, { "127.0.0.1", }
- },
- { "+test.com:80:127.0.0.1,",
- "test.com", 80, FALSE, { "127.0.0.1", }
- },
-};
-
UNITTEST_START
{
+ struct testcase {
+ /* host:port:address[,address]... */
+ const char *optval;
+
+ /* lowercase host and port to retrieve the addresses from hostcache */
+ const char *host;
+ int port;
+
+ /* whether we expect a permanent or non-permanent cache entry */
+ bool permanent;
+
+ /* 0 to 9 addresses expected from hostcache */
+ const char *address[10];
+ };
+
+ /* CURLOPT_RESOLVE address parsing tests */
+ static const struct testcase tests[] = {
+ /* spaces aren't allowed, for now */
+ { "test.com:80:127.0.0.1, 127.0.0.2",
+ "test.com", 80, TRUE, { NULL, }
+ },
+ { "TEST.com:80:,,127.0.0.1,,,127.0.0.2,,,,::1,,,",
+ "test.com", 80, TRUE, { "127.0.0.1", "127.0.0.2", IPV6ONLY("::1"), }
+ },
+ { "test.com:80:::1,127.0.0.1",
+ "test.com", 80, TRUE, { IPV6ONLY("::1"), "127.0.0.1", }
+ },
+ { "test.com:80:[::1],127.0.0.1",
+ "test.com", 80, TRUE, { IPV6ONLY("::1"), "127.0.0.1", }
+ },
+ { "test.com:80:::1",
+ "test.com", 80, TRUE, { IPV6ONLY("::1"), }
+ },
+ { "test.com:80:[::1]",
+ "test.com", 80, TRUE, { IPV6ONLY("::1"), }
+ },
+ { "test.com:80:127.0.0.1",
+ "test.com", 80, TRUE, { "127.0.0.1", }
+ },
+ { "test.com:80:,127.0.0.1",
+ "test.com", 80, TRUE, { "127.0.0.1", }
+ },
+ { "test.com:80:127.0.0.1,",
+ "test.com", 80, TRUE, { "127.0.0.1", }
+ },
+ { "test.com:0:127.0.0.1",
+ "test.com", 0, TRUE, { "127.0.0.1", }
+ },
+ { "+test.com:80:127.0.0.1,",
+ "test.com", 80, FALSE, { "127.0.0.1", }
+ },
+ };
+
int i;
struct Curl_multi *multi = NULL;
struct Curl_easy *easy = NULL;
tests/unit/unit1609.c+22 -23
@@ -43,19 +43,6 @@ static CURLcode unit_setup(void)
return res;
}
-struct testcase {
- /* host:port:address[,address]... */
- const char *optval;
-
- /* lowercase host and port to retrieve the addresses from hostcache */
- const char *host;
- int port;
-
- /* 0 to 9 addresses expected from hostcache */
- const char *address[10];
-};
-
-
/* CURLOPT_RESOLVE address parsing test - to test the following defect fix:
1) if there is already existing host:port pair in the DNS cache and
@@ -88,18 +75,30 @@ Test:
expected result: cached address has zero timestamp and new address
*/
-static const struct testcase tests[] = {
- /* spaces aren't allowed, for now */
- { "test.com:80:127.0.0.1",
- "test.com", 80, { "127.0.0.1", }
- },
- { "test.com:80:127.0.0.2",
- "test.com", 80, { "127.0.0.2", }
- },
-};
-
UNITTEST_START
{
+ struct testcase {
+ /* host:port:address[,address]... */
+ const char *optval;
+
+ /* lowercase host and port to retrieve the addresses from hostcache */
+ const char *host;
+ int port;
+
+ /* 0 to 9 addresses expected from hostcache */
+ const char *address[10];
+ };
+
+ static const struct testcase tests[] = {
+ /* spaces aren't allowed, for now */
+ { "test.com:80:127.0.0.1",
+ "test.com", 80, { "127.0.0.1", }
+ },
+ { "test.com:80:127.0.0.2",
+ "test.com", 80, { "127.0.0.2", }
+ },
+ };
+
int i;
struct Curl_multi *multi = NULL;
struct Curl_easy *easy = NULL;
tests/unit/unit1616.c+11 -11
@@ -27,9 +27,9 @@
#include <uint-hash.h>
#include <memdebug.h> /* LAST include file */
-static struct uint_hash hash_static;
+static struct uint_hash t1616_hash_static;
-static void mydtor(unsigned int id, void *elem)
+static void t1616_mydtor(unsigned int id, void *elem)
{
int *ptr = (int *)elem;
(void)id;
@@ -38,13 +38,13 @@ static void mydtor(unsigned int id, void *elem)
static CURLcode unit_setup(void)
{
- Curl_uint_hash_init(&hash_static, 15, mydtor);
+ Curl_uint_hash_init(&t1616_hash_static, 15, t1616_mydtor);
return CURLE_OK;
}
static void unit_stop(void)
{
- Curl_uint_hash_destroy(&hash_static);
+ Curl_uint_hash_destroy(&t1616_hash_static);
}
UNITTEST_START
@@ -59,27 +59,27 @@ UNITTEST_START
value = malloc(sizeof(int));
abort_unless(value != NULL, "Out of memory");
*value = 199;
- ok = Curl_uint_hash_set(&hash_static, key, value);
+ ok = Curl_uint_hash_set(&t1616_hash_static, key, value);
if(!ok)
free(value);
abort_unless(ok, "insertion into hash failed");
- v = Curl_uint_hash_get(&hash_static, key);
+ v = Curl_uint_hash_get(&t1616_hash_static, key);
abort_unless(v == value, "lookup present entry failed");
- v = Curl_uint_hash_get(&hash_static, key2);
+ v = Curl_uint_hash_get(&t1616_hash_static, key2);
abort_unless(!v, "lookup missing entry failed");
- Curl_uint_hash_clear(&hash_static);
+ Curl_uint_hash_clear(&t1616_hash_static);
/* Attempt to add another key/value pair */
value2 = malloc(sizeof(int));
abort_unless(value2 != NULL, "Out of memory");
*value2 = 204;
- ok = Curl_uint_hash_set(&hash_static, key2, value2);
+ ok = Curl_uint_hash_set(&t1616_hash_static, key2, value2);
if(!ok)
free(value2);
abort_unless(ok, "insertion into hash failed");
- v = Curl_uint_hash_get(&hash_static, key2);
+ v = Curl_uint_hash_get(&t1616_hash_static, key2);
abort_unless(v == value2, "lookup present entry failed");
- v = Curl_uint_hash_get(&hash_static, key);
+ v = Curl_uint_hash_get(&t1616_hash_static, key);
abort_unless(!v, "lookup missing entry failed");
UNITTEST_STOP
tests/unit/unit1620.c+16 -15
@@ -40,7 +40,7 @@ static void unit_stop(void)
curl_global_cleanup();
}
-static void test_parse(
+static void t1620_parse(
const char *input,
const char *exp_username,
const char *exp_password,
@@ -106,20 +106,21 @@ UNITTEST_START
rc = Curl_init_do(empty, empty->conn);
fail_unless(rc == CURLE_OK, "Curl_init_do() failed");
- test_parse("hostname", "hostname", NULL, NULL);
- test_parse("user:password", "user", "password", NULL);
- test_parse("user:password;options", "user", "password", "options");
- test_parse("user:password;options;more", "user", "password", "options;more");
- test_parse("", "", NULL, NULL);
- test_parse(":", "", "", NULL);
- test_parse(":;", "", "", NULL);
- test_parse(":password", "", "password", NULL);
- test_parse(":password;", "", "password", NULL);
- test_parse(";options", "", NULL, "options");
- test_parse("user;options", "user", NULL, "options");
- test_parse("user:;options", "user", "", "options");
- test_parse("user;options:password", "user", "password", "options");
- test_parse("user;options:", "user", "", "options");
+ t1620_parse("hostname", "hostname", NULL, NULL);
+ t1620_parse("user:password", "user", "password", NULL);
+ t1620_parse("user:password;options", "user", "password", "options");
+ t1620_parse("user:password;options;more", "user", "password",
+ "options;more");
+ t1620_parse("", "", NULL, NULL);
+ t1620_parse(":", "", "", NULL);
+ t1620_parse(":;", "", "", NULL);
+ t1620_parse(":password", "", "password", NULL);
+ t1620_parse(":password;", "", "password", NULL);
+ t1620_parse(";options", "", NULL, "options");
+ t1620_parse("user;options", "user", NULL, "options");
+ t1620_parse("user:;options", "user", "", "options");
+ t1620_parse("user;options:password", "user", "password", "options");
+ t1620_parse("user;options:", "user", "", "options");
Curl_freeset(empty);
for(i = (enum dupstring)0; i < STRING_LAST; i++) {
tests/unit/unit1652.c+69 -69
@@ -32,7 +32,7 @@
* updated to still be valid.
*/
-static struct Curl_easy *testdata;
+static struct Curl_easy *t1652_easy;
static char input[4096];
static char output[4096];
@@ -45,9 +45,8 @@ int debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size,
* for the unit test to inspect. Since we know that we're only dealing with
* text we can afford the luxury of skipping the type check here.
*/
-int
-debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size,
- void *userptr)
+int debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size,
+ void *userptr)
{
(void)handle;
(void)type;
@@ -58,26 +57,24 @@ debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size,
return 0;
}
-static CURLcode
-unit_setup(void)
+static CURLcode unit_setup(void)
{
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
- testdata = curl_easy_init();
- if(!testdata) {
+ t1652_easy = curl_easy_init();
+ if(!t1652_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
- curl_easy_setopt(testdata, CURLOPT_DEBUGFUNCTION, debugf_cb);
- curl_easy_setopt(testdata, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(t1652_easy, CURLOPT_DEBUGFUNCTION, debugf_cb);
+ curl_easy_setopt(t1652_easy, CURLOPT_VERBOSE, 1L);
return res;
}
-static void
-unit_stop(void)
+static void unit_stop(void)
{
- curl_easy_cleanup(testdata);
+ curl_easy_cleanup(t1652_easy);
curl_global_cleanup();
}
@@ -101,62 +98,65 @@ UNITTEST_START
#endif
#endif
-/* Injecting a simple short string via a format */
-curl_msnprintf(input, sizeof(input), "Simple Test");
-Curl_infof(testdata, "%s", input);
-fail_unless(verify(output, input) == 0, "Simple string test");
-
-/* Injecting a few different variables with a format */
-Curl_infof(testdata, "%s %u testing %lu", input, 42, 43L);
-fail_unless(verify(output, "Simple Test 42 testing 43\n") == 0,
- "Format string");
-
-/* Variations of empty strings */
-Curl_infof(testdata, "");
-fail_unless(strlen(output) == 1, "Empty string");
-Curl_infof(testdata, "%s", (char *)NULL);
-fail_unless(verify(output, "(nil)") == 0, "Passing NULL as string");
-
-/* Note: libcurl's tracebuffer hold 2048 bytes, so the max strlen() we
- * get out of it is 2047, since we need a \0 at the end.
- * Curl_infof() in addition adds a \n at the end, making the effective
- * output 2046 characters.
- * Any input that long or longer will truncated, ending in '...\n'.
- */
-
-/* A string just long enough to not be truncated */
-memset(input, '\0', sizeof(input));
-memset(input, 'A', 2045);
-Curl_infof(testdata, "%s", input);
-fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
-/* output is input + \n */
-fail_unless(strlen(output) == 2046, "No truncation of infof input");
-fail_unless(verify(output, input) == 0, "No truncation of infof input");
-fail_unless(output[sizeof(output) - 1] == '\0',
- "No truncation of infof input");
-
-/* Just over the limit without newline for truncation via '...' */
-memset(input + 2045, 'A', 4);
-Curl_infof(testdata, "%s", input);
-fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
-fail_unless(strlen(output) == 2047, "Truncation of infof input 1");
-fail_unless(output[sizeof(output) - 1] == '\0', "Truncation of infof input 1");
-
-/* Just over the limit with newline for truncation via '...' */
-memset(input + 2045, 'A', 4);
-memset(input + 2045 + 4, '\n', 1);
-Curl_infof(testdata, "%s", input);
-fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
-fail_unless(strlen(output) == 2047, "Truncation of infof input 2");
-fail_unless(output[sizeof(output) - 1] == '\0', "Truncation of infof input 2");
-
-/* Way over the limit for truncation via '...' */
-memset(input, '\0', sizeof(input));
-memset(input, 'A', sizeof(input) - 1);
-Curl_infof(testdata, "%s", input);
-fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
-fail_unless(strlen(output) == 2047, "Truncation of infof input 3");
-fail_unless(output[sizeof(output) - 1] == '\0', "Truncation of infof input 3");
+ /* Injecting a simple short string via a format */
+ curl_msnprintf(input, sizeof(input), "Simple Test");
+ Curl_infof(t1652_easy, "%s", input);
+ fail_unless(verify(output, input) == 0, "Simple string test");
+
+ /* Injecting a few different variables with a format */
+ Curl_infof(t1652_easy, "%s %u testing %lu", input, 42, 43L);
+ fail_unless(verify(output, "Simple Test 42 testing 43\n") == 0,
+ "Format string");
+
+ /* Variations of empty strings */
+ Curl_infof(t1652_easy, "");
+ fail_unless(strlen(output) == 1, "Empty string");
+ Curl_infof(t1652_easy, "%s", (char *)NULL);
+ fail_unless(verify(output, "(nil)") == 0, "Passing NULL as string");
+
+ /* Note: libcurl's tracebuffer hold 2048 bytes, so the max strlen() we
+ * get out of it is 2047, since we need a \0 at the end.
+ * Curl_infof() in addition adds a \n at the end, making the effective
+ * output 2046 characters.
+ * Any input that long or longer will truncated, ending in '...\n'.
+ */
+
+ /* A string just long enough to not be truncated */
+ memset(input, '\0', sizeof(input));
+ memset(input, 'A', 2045);
+ Curl_infof(t1652_easy, "%s", input);
+ fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
+ /* output is input + \n */
+ fail_unless(strlen(output) == 2046, "No truncation of infof input");
+ fail_unless(verify(output, input) == 0, "No truncation of infof input");
+ fail_unless(output[sizeof(output) - 1] == '\0',
+ "No truncation of infof input");
+
+ /* Just over the limit without newline for truncation via '...' */
+ memset(input + 2045, 'A', 4);
+ Curl_infof(t1652_easy, "%s", input);
+ fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
+ fail_unless(strlen(output) == 2047, "Truncation of infof input 1");
+ fail_unless(output[sizeof(output) - 1] == '\0',
+ "Truncation of infof input 1");
+
+ /* Just over the limit with newline for truncation via '...' */
+ memset(input + 2045, 'A', 4);
+ memset(input + 2045 + 4, '\n', 1);
+ Curl_infof(t1652_easy, "%s", input);
+ fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
+ fail_unless(strlen(output) == 2047, "Truncation of infof input 2");
+ fail_unless(output[sizeof(output) - 1] == '\0',
+ "Truncation of infof input 2");
+
+ /* Way over the limit for truncation via '...' */
+ memset(input, '\0', sizeof(input));
+ memset(input, 'A', sizeof(input) - 1);
+ Curl_infof(t1652_easy, "%s", input);
+ fprintf(stderr, "output len %d: %s", (int)strlen(output), output);
+ fail_unless(strlen(output) == 2047, "Truncation of infof input 3");
+ fail_unless(output[sizeof(output) - 1] == '\0',
+ "Truncation of infof input 3");
#if defined(CURL_GNUC_DIAG) && !defined(__clang__)
#pragma GCC diagnostic pop
tests/unit/unit1653.c+2 -4
@@ -30,14 +30,12 @@
static CURLU *u;
-static CURLcode
-unit_setup(void)
+static CURLcode unit_setup(void)
{
return CURLE_OK;
}
-static void
-unit_stop(void)
+static void unit_stop(void)
{
curl_global_cleanup();
}
tests/unit/unit1654.c+2 -4
@@ -26,14 +26,12 @@
#include "urldata.h"
#include "altsvc.h"
-static CURLcode
-unit_setup(void)
+static CURLcode unit_setup(void)
{
return CURLE_OK;
}
-static void
-unit_stop(void)
+static void unit_stop(void)
{
curl_global_cleanup();
}
tests/unit/unit1660.c+2 -4
@@ -26,14 +26,12 @@
#include "urldata.h"
#include "hsts.h"
-static CURLcode
-unit_setup(void)
+static CURLcode unit_setup(void)
{
return CURLE_OK;
}
-static void
-unit_stop(void)
+static void unit_stop(void)
{
curl_global_cleanup();
}
tests/unit/unit1663.c+13 -13
@@ -48,7 +48,7 @@ static void unit_stop(void)
curl_global_cleanup();
}
-static void test_parse(
+static void t1663_parse(
const char *input_data,
const char *exp_dev,
const char *exp_iface,
@@ -81,17 +81,17 @@ static void test_parse(
UNITTEST_START
{
- test_parse("dev", "dev", NULL, NULL, CURLE_OK);
- test_parse("if!eth0", NULL, "eth0", NULL, CURLE_OK);
- test_parse("host!myname", NULL, NULL, "myname", CURLE_OK);
- test_parse("ifhost!eth0!myname", NULL, "eth0", "myname", CURLE_OK);
- test_parse("", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
- test_parse("!", "!", NULL, NULL, CURLE_OK);
- test_parse("if!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
- test_parse("if!eth0!blubb", NULL, "eth0!blubb", NULL, CURLE_OK);
- test_parse("host!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
- test_parse("ifhost!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
- test_parse("ifhost!eth0", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
- test_parse("ifhost!eth0!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
+ t1663_parse("dev", "dev", NULL, NULL, CURLE_OK);
+ t1663_parse("if!eth0", NULL, "eth0", NULL, CURLE_OK);
+ t1663_parse("host!myname", NULL, NULL, "myname", CURLE_OK);
+ t1663_parse("ifhost!eth0!myname", NULL, "eth0", "myname", CURLE_OK);
+ t1663_parse("", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
+ t1663_parse("!", "!", NULL, NULL, CURLE_OK);
+ t1663_parse("if!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
+ t1663_parse("if!eth0!blubb", NULL, "eth0!blubb", NULL, CURLE_OK);
+ t1663_parse("host!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
+ t1663_parse("ifhost!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
+ t1663_parse("ifhost!eth0", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
+ t1663_parse("ifhost!eth0!", NULL, NULL, NULL, CURLE_BAD_FUNCTION_ARGUMENT);
}
UNITTEST_STOP
tests/unit/unit2600.c+12 -12
@@ -48,26 +48,26 @@
#include "curl_trc.h"
#include "memdebug.h"
-static CURL *easy;
+static CURL *t2600_easy;
static CURLcode unit_setup(void)
{
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
- easy = curl_easy_init();
- if(!easy) {
+ t2600_easy = curl_easy_init();
+ if(!t2600_easy) {
curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
}
curl_global_trace("all");
- curl_easy_setopt(easy, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(t2600_easy, CURLOPT_VERBOSE, 1L);
return res;
}
static void unit_stop(void)
{
- curl_easy_cleanup(easy);
+ curl_easy_cleanup(t2600_easy);
curl_global_cleanup();
}
@@ -312,23 +312,23 @@ static void test_connect(struct test_case *tc)
list = curl_slist_append(NULL, tc->resolve_info);
fail_unless(list, "error allocating resolve list entry");
- curl_easy_setopt(easy, CURLOPT_RESOLVE, list);
- curl_easy_setopt(easy, CURLOPT_IPRESOLVE, (long)tc->ip_version);
- curl_easy_setopt(easy, CURLOPT_CONNECTTIMEOUT_MS,
+ curl_easy_setopt(t2600_easy, CURLOPT_RESOLVE, list);
+ curl_easy_setopt(t2600_easy, CURLOPT_IPRESOLVE, (long)tc->ip_version);
+ curl_easy_setopt(t2600_easy, CURLOPT_CONNECTTIMEOUT_MS,
(long)tc->connect_timeout_ms);
- curl_easy_setopt(easy, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS,
+ curl_easy_setopt(t2600_easy, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS,
(long)tc->he_timeout_ms);
- curl_easy_setopt(easy, CURLOPT_URL, tc->url);
+ curl_easy_setopt(t2600_easy, CURLOPT_URL, tc->url);
memset(&tr, 0, sizeof(tr));
tr.cf6.family = "v6";
tr.cf4.family = "v4";
tr.started = curlx_now();
- tr.result = curl_easy_perform(easy);
+ tr.result = curl_easy_perform(t2600_easy);
tr.ended = curlx_now();
- curl_easy_setopt(easy, CURLOPT_RESOLVE, NULL);
+ curl_easy_setopt(t2600_easy, CURLOPT_RESOLVE, NULL);
curl_slist_free_all(list);
list = NULL;
current_tc = NULL;
tests/unit/unit3200.c+1 -2
@@ -42,9 +42,8 @@ static CURLcode unit_setup(void)
return CURLE_OK;
}
-static CURLcode unit_stop(void)
+static void unit_stop(void)
{
- return CURLE_OK;
}
#if defined(CURL_GNUC_DIAG) || defined(__clang__)