tests: always make bundles, adapt build and tests
—
$ git checkout -f 2c27a67daa1b76859c18d63e4e1f528db05b5e13
Previous HEAD position was 49a0c27bbc cmake: make docs depend on support files
HEAD is now at 2c27a67daa tests: always make bundles, adapt build and tests
$ 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-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-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-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-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:418: installing './config.guess'
configure.ac:418: 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.15.0-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 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 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/select.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... 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.15.0-DEV
SSL: no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,amissl,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-amigaos.lo
CC libcurl_la-asyn-ares.lo
CC libcurl_la-altsvc.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_threads.lo
CC libcurl_la-curl_trc.lo
CC libcurl_la-cw-out.lo
CC libcurl_la-cw-pause.lo
CC libcurl_la-dict.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-rtsp.lo
CC libcurl_la-select.lo
CC libcurl_la-sendf.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-strdup.lo
CC libcurl_la-strequal.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_aws_sigv4.lo
CC libcurlu_la-http_chunks.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-md5.lo
CC libcurlu_la-memdebug.lo
CC libcurlu_la-mime.lo
CC libcurlu_la-mprintf.lo
CC libcurlu_la-mqtt.lo
CC libcurlu_la-multi.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-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-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-cipher_suite.lo
CC vtls/libcurl_la-gtls.lo
CC vtls/libcurl_la-hostcheck.lo
CC vtls/libcurl_la-mbedtls.lo
CC vtls/libcurl_la-keylog.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_verify.lo
CC vtls/libcurl_la-schannel.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-terminal.o
CC curl-slist_wc.o
CC curl-tool_bname.o
CC curl-tool_cb_dbg.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_easysrc.o
CC curl-tool_doswin.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
CC libcurltool_la-config2setopts.lo
CC curlinfo.o
echo 'extern const void *curl_ca_embed; const void *curl_ca_embed;' >> tool_ca_embed.c
CC libcurltool_la-slist_wc.lo
CC libcurltool_la-terminal.lo
CC libcurltool_la-tool_bname.lo
CC libcurltool_la-tool_cb_hdr.lo
CC libcurltool_la-tool_cb_dbg.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_sleep.lo
CC libcurltool_la-tool_ssls.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'
| @@ -468,10 +468,10 @@ jobs: | |
| if [ "${MATRIX_BUILD}" = 'cmake' ]; then | |
| cmake -B bld -G Ninja \ | |
| -DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \ |
| ${MATRIX_GENERATE} | |
| else | |
| - | mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ |
| --disable-dependency-tracking \ | |
| ${MATRIX_CONFIGURE} | |
| fi | |
| @@ -82,7 +82,7 @@ jobs: | |
| run: | | |
| mkdir bld-1 | |
| cd bld-1 | |
| - | cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ |
| + | cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ |
| -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON | |
| make install | |
| src/curl --disable --version | |
| @@ -98,7 +98,7 @@ jobs: | |
| run: | | |
| mkdir bld-cares | |
| cd bld-cares | |
| - | cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ |
| + | cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ |
| -DENABLE_ARES=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON \ | |
| -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON | |
| @@ -128,7 +128,7 @@ jobs: | |
| run: | | |
| mkdir bld-am | |
| cd bld-am | |
| - | ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | ../configure --disable-dependency-tracking --enable-unity --enable-warnings --enable-werror \ |
| --with-openssl --enable-ares --with-libssh2 --with-zstd --with-gssapi --with-librtmp \ | |
| --prefix="$PWD"/../curl-install-am | |
| @@ -573,12 +573,12 @@ jobs: | |
| cmake -B bld -G Ninja \ | |
| -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ | |
| -DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \ |
| ${MATRIX_GENERATE} | |
| else | |
| mkdir bld && cd bld && \ | |
| ${MATRIX_CONFIGURE_PREFIX} \ | |
| - | ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | ../configure --enable-unity --enable-warnings --enable-werror \ |
| --disable-dependency-tracking \ | |
| ${MATRIX_CONFIGURE} | |
| fi | |
| @@ -236,7 +236,7 @@ jobs: | |
| [ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF' | |
| cmake -B "bld${_chkprefill}" -G Ninja -D_CURL_PREFILL=ON \ | |
| -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \ |
| -DCMAKE_OSX_SYSROOT="${sysroot}" \ | |
| -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \ | |
| ${MATRIX_GENERATE} ${options} | |
| @@ -256,7 +256,7 @@ jobs: | |
| fi | |
| [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}" | |
| [[ "${MATRIX_INSTALL_STEPS}" = *'pytest'* ]] && options+=' --with-test-vsftpd=no' # Skip ~20 tests that stretch run time by 7x on macOS | |
| - | mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ |
| --disable-dependency-tracking \ | |
| --with-libpsl=/opt/homebrew/opt/libpsl \ | |
| ${MATRIX_CONFIGURE} ${options} | |
| @@ -458,7 +458,7 @@ jobs: | |
| [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && options+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MATRIX_MACOS_VERSION_MIN}" | |
| # would pick up nghttp2, libidn2, and libssh2 | |
| cmake -B bld -G Ninja -D_CURL_PREFILL=ON \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \ |
| -DCMAKE_OSX_SYSROOT="${sysroot}" \ | |
| -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \ | |
| -DCMAKE_IGNORE_PREFIX_PATH="$(brew --prefix)" \ | |
| @@ -478,7 +478,7 @@ jobs: | |
| fi | |
| [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}" | |
| # would pick up nghttp2, libidn2, but libssh2 is disabled by default | |
| - | mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ |
| --disable-dependency-tracking \ | |
| --disable-docs --disable-manual \ | |
| --with-openssl="$(brew --prefix openssl)" \ | |
| @@ -64,7 +64,7 @@ jobs: | |
| time sudo pkgin -y install cmake ninja-build pkg-config perl brotli heimdal openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket | |
| time cmake -B bld -G Ninja \ | |
| -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON \ |
| -DCURL_WERROR=ON \ | |
| -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCURL_USE_OPENSSL=ON \ | |
| @@ -110,7 +110,7 @@ jobs: | |
| time sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 py3-six py3-impacket | |
| time cmake -B bld -G Ninja \ | |
| -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON \ |
| -DCURL_WERROR=ON \ | |
| -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCURL_USE_OPENSSL=ON \ | |
| @@ -137,7 +137,7 @@ jobs: | |
| matrix: | |
| include: | |
| - { build: 'autotools', arch: 'x86_64', compiler: 'clang' } | |
| - | - { build: 'cmake' , arch: 'x86_64', compiler: 'clang', options: '-DCMAKE_UNITY_BUILD=OFF -DCURL_TEST_BUNDLES=OFF', desc: ' !unity !bundle !runtests !examples' } |
| + | - { build: 'cmake' , arch: 'x86_64', compiler: 'clang', options: '-DCMAKE_UNITY_BUILD=OFF', desc: ' !unity !runtests !examples' } |
| - { build: 'autotools', arch: 'arm64', compiler: 'clang' } | |
| - { build: 'cmake' , arch: 'arm64', compiler: 'clang' } | |
| fail-fast: false | |
| @@ -175,7 +175,7 @@ jobs: | |
| time cmake -B bld -G Ninja \ | |
| -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ | |
| -DCMAKE_C_COMPILER="${CC}" \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON \ |
| -DCURL_WERROR=ON \ | |
| -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCURL_USE_OPENSSL=ON \ | |
| @@ -188,7 +188,7 @@ jobs: | |
| options='--disable-manual --disable-docs' # Slow with autotools, skip on emulated CPU | |
| fi | |
| mkdir bld && cd bld | |
| - | time ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ |
| + | time ../configure --enable-unity --enable-debug --enable-warnings --enable-werror \ |
| --prefix="$HOME"/curl-install \ | |
| --with-openssl \ | |
| --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \ | |
| @@ -258,7 +258,7 @@ jobs: | |
| export CURL_CI=github | |
| time autoreconf -fi | |
| mkdir bld && cd bld | |
| - | time ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ |
| + | time ../configure --enable-unity --enable-debug --enable-warnings --enable-werror \ |
| --prefix="$HOME"/curl-install \ | |
| --with-openssl \ | |
| --disable-dependency-tracking \ | |
| @@ -378,12 +378,12 @@ jobs: | |
| # https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos | |
| [ -n "${MATRIX_GENERATOR}" ] && options="-G ${MATRIX_GENERATOR}" | |
| cmake -B bld -G Ninja -D_CURL_PREFILL=ON \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \ |
| -DCMAKE_SYSTEM_NAME=iOS \ | |
| -DUSE_APPLE_IDN=ON \ | |
| ${MATRIX_GENERATE} ${options} | |
| else | |
| - | mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ |
| --disable-dependency-tracking \ | |
| CFLAGS="-isysroot $(xcrun --sdk iphoneos --show-sdk-path 2>/dev/null)" \ | |
| --host=aarch64-apple-darwin \ | |
| @@ -469,12 +469,12 @@ jobs: | |
| -DANDROID_ABI=arm64-v8a \ | |
| -DANDROID_PLATFORM="android-${MATRIX_PLATFORM}" \ | |
| -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" -DCMAKE_WARN_DEPRECATED=OFF \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON \ |
| -DCURL_WERROR=ON \ | |
| ${MATRIX_OPTIONS} | |
| else | |
| TOOLCHAIN="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64" | |
| - | mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-warnings --enable-werror \ |
| CC="$TOOLCHAIN/bin/aarch64-linux-android${MATRIX_PLATFORM}-clang" \ | |
| AR="$TOOLCHAIN/bin/llvm-ar" \ | |
| RANLIB="$TOOLCHAIN/bin/llvm-ranlib" \ | |
| @@ -569,7 +569,7 @@ jobs: | |
| -DCMAKE_SYSTEM_PROCESSOR=x86 \ | |
| -DCMAKE_C_COMPILER_TARGET=i586-pc-msdosdjgpp \ | |
| -DCMAKE_C_COMPILER="$HOME/djgpp/bin/i586-pc-msdosdjgpp-gcc" \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON \ |
| -DCURL_WERROR=ON \ | |
| -DCURL_USE_LIBPSL=OFF \ | |
| -DOPENSSL_INCLUDE_DIR="$HOME/djgpp/include" \ | |
| @@ -580,7 +580,7 @@ jobs: | |
| -DWATT_ROOT="$HOME/djgpp/net/watt" | |
| else | |
| autoreconf -fi | |
| - | mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-warnings --enable-werror \ |
| CC="$HOME/djgpp/bin/i586-pc-msdosdjgpp-gcc" \ | |
| AR="$HOME/djgpp/bin/i586-pc-msdosdjgpp-ar" \ | |
| RANLIB="$HOME/djgpp/bin/i586-pc-msdosdjgpp-ranlib" \ | |
| @@ -96,11 +96,11 @@ jobs: | |
| if [ "${MATRIX_BUILD}" = 'cmake' ]; then | |
| cmake -B bld -G Ninja -D_CURL_PREFILL=ON ${options} \ | |
| -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 \ |
| -DCURL_WERROR=ON \ | |
| ${MATRIX_CONFIG} | |
| else | |
| - | mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ |
| --prefix="$HOME"/curl-install \ | |
| --with-libssh2 \ | |
| --disable-dependency-tracking \ | |
| @@ -290,7 +290,7 @@ jobs: | |
| -DCMAKE_INSTALL_PREFIX="${HOME}"/curl-install \ | |
| -DCMAKE_C_FLAGS="${CFLAGS_CMAKE} ${CPPFLAGS}" \ | |
| -DCMAKE_BUILD_TYPE="${MATRIX_TYPE}" \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 \ |
| -DCURL_WERROR=ON \ | |
| ${MATRIX_CONFIG} | |
| done | |
| @@ -300,7 +300,7 @@ jobs: | |
| fi | |
| else | |
| export CFLAGS CPPFLAGS | |
| - | mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ |
| --prefix="$HOME"/curl-install \ | |
| --with-libssh2 \ | |
| --disable-dependency-tracking \ | |
| @@ -512,7 +512,7 @@ jobs: | |
| cmake -B "bld${_chkprefill}" -G Ninja ${options} \ | |
| -DCMAKE_C_COMPILER=gcc \ | |
| -DCMAKE_BUILD_TYPE="${MATRIX_TYPE}" \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 \ |
| -DCURL_WERROR=ON \ | |
| -DUSE_LIBIDN2=OFF \ | |
| ${MATRIX_CONFIG} | |
| @@ -636,13 +636,13 @@ jobs: | |
| cmake -B bld -G Ninja \ | |
| -DCMAKE_SYSTEM_NAME=Windows \ | |
| -DCMAKE_C_COMPILER_TARGET="${TRIPLET}" \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON \ |
| -DCURL_WERROR=ON \ | |
| -DCURL_USE_SCHANNEL=ON -DUSE_WIN32_IDN=ON \ | |
| -DCURL_USE_LIBPSL=OFF \ | |
| ${options} | |
| else | |
| - | mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ |
| --host="${TRIPLET}" \ | |
| --with-schannel --with-winidn \ | |
| --without-libpsl \ | |
| @@ -741,14 +741,14 @@ jobs: | |
| -DCMAKE_RC_COMPILER=arm-mingw32ce-windres \ | |
| -DMINGW32CE_LIBRARY_DIR="$HOME/opt/mingw32ce/arm-mingw32ce/lib" \ | |
| -DCMAKE_IGNORE_PREFIX_PATH=/opt/homebrew \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=50 -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=50 \ |
| -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_STATIC_CURL=OFF \ | |
| -DCURL_WERROR=ON \ | |
| -DCURL_USE_SCHANNEL=ON \ | |
| -DCURL_USE_LIBPSL=OFF | |
| else | |
| autoreconf -fi | |
| - | mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ |
| + | mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-warnings --enable-werror \ |
| --host=arm-mingw32ce \ | |
| --with-schannel \ | |
| --without-libpsl \ | |
| @@ -936,7 +936,7 @@ jobs: | |
| -DCMAKE_EXE_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \ | |
| -DCMAKE_SHARED_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \ | |
| -DCMAKE_VS_GLOBALS="TrackFileAccess=false${vsglobals}" \ | |
| - | -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ |
| + | -DCMAKE_UNITY_BUILD=ON \ |
| -DCURL_WERROR=ON \ | |
| -DLIBPSL_INCLUDE_DIR="${MINGW_PREFIX}/include" \ | |
| -DLIBPSL_LIBRARY="${MINGW_PREFIX}/lib/libpsl.dll.a" \ | |
| @@ -287,14 +287,12 @@ if(ENABLE_CURLDEBUG) | |
| list(APPEND CURL_DEBUG_MACROS "CURLDEBUG") | |
| endif() | |
| - | option(CURL_TEST_BUNDLES "Build tests into single-binary bundles" OFF) |
| - | |
| option(CURL_CLANG_TIDY "Run the build through clang-tidy" OFF) | |
| if(CURL_CLANG_TIDY) | |
| # clang-tidy is not looking into #included sources, thus not compatible with | |
| # unity builds and test bundles. | |
| set(CMAKE_UNITY_BUILD OFF) | |
| - | set(CURL_TEST_BUNDLES OFF) |
| + | set(CURL_MK_UNITY_OPTION "--embed") |
| set(_tidy_checks "") | |
| list(APPEND _tidy_checks "-clang-analyzer-security.insecureAPI.strcpy") | |
| list(APPEND _tidy_checks "-clang-analyzer-optin.performance.Padding") | |
| @@ -68,7 +68,6 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then | |
| fi | |
| # shellcheck disable=SC2086 | |
| time cmake -G "${PRJ_GEN}" ${TARGET} \ | |
| - | -DCURL_TEST_BUNDLES=ON \ |
| -DCURL_WERROR=ON \ | |
| -DBUILD_SHARED_LIBS="${SHARED}" \ | |
| -DCURL_STATIC_CRT=ON \ | |
| @@ -651,29 +651,6 @@ AS_HELP_STRING([--disable-unity],[Disable unity (default)]), | |
| AM_CONDITIONAL([USE_UNITY], [test "$want_unity" = 'yes']) | |
| - | dnl ----------------------- |
| - | dnl whether to bundle tests |
| - | dnl ----------------------- |
| - | |
| - | want_test_bundles='no' |
| - | AC_MSG_CHECKING([whether to build tests into single-binary bundles]) |
| - | AC_ARG_ENABLE(test-bundles, |
| - | AS_HELP_STRING([--enable-test-bundles],[Enable test bundles]) |
| - | AS_HELP_STRING([--disable-test-bundles],[Disable test bundles (default)]), |
| - | [ case "$enableval" in |
| - | yes) |
| - | want_test_bundles='yes' |
| - | AC_MSG_RESULT([yes]) |
| - | ;; |
| - | *) |
| - | AC_MSG_RESULT([no]) |
| - | ;; |
| - | esac ], |
| - | AC_MSG_RESULT([no]) |
| - | ) |
| - | |
| - | AM_CONDITIONAL([USE_TEST_BUNDLES], [test "$want_test_bundles" = 'yes']) |
| - | |
| dnl ************************************************************ | |
| dnl switch off particular protocols | |
| dnl | |
| @@ -244,7 +244,6 @@ target_link_libraries(my_target PRIVATE CURL::libcurl) | |
| - `CURL_LTO`: Enable compiler Link Time Optimizations. Default: `OFF` | |
| - `CURL_STATIC_CRT`: Build libcurl with static CRT with MSVC (`/MT`) (requires UCRT, static libcurl or no curl executable). Default: `OFF` | |
| - `CURL_TARGET_WINDOWS_VERSION`: Minimum target Windows version as hex string. | |
| - | - `CURL_TEST_BUNDLES`: Build tests into single-binary bundles. Default: `OFF` |
| - `CURL_WERROR`: Turn compiler warnings into errors. Default: `OFF` | |
| - `ENABLE_CURLDEBUG`: Enable TrackMemory debug feature. Default: =`ENABLE_DEBUG` | |
| - `ENABLE_CURL_MANUAL`: Build the man page for curl and enable its `-M`/`--manual` option. Default: `ON` | |
| @@ -21,7 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # Get 'DPAGES' variable |
| + | # Get SUPPORT, DPAGES variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -27,6 +27,7 @@ AUTOMAKE_OPTIONS = foreign no-dependencies | |
| MANPAGE = curl.1 | |
| ASCIIPAGE = curl.txt | |
| + | # Get SUPPORT, DPAGES variables |
| include Makefile.inc | |
| EXTRA_DIST = $(DPAGES) MANPAGE.md $(SUPPORT) CMakeLists.txt mainpage.idx | |
| @@ -21,7 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # Shared between Makefile.am and CMakeLists.txt |
| + | # Shared between CMakeLists.txt and Makefile.am |
| SUPPORT = \ | |
| _AUTHORS.md \ | |
| @@ -24,7 +24,7 @@ | |
| add_custom_target(curl-examples) | |
| - | # Get 'check_PROGRAMS' variable |
| + | # Get check_PROGRAMS variable |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -37,7 +37,6 @@ foreach(_target IN LISTS check_PROGRAMS) | |
| if(LIB_SELECTED STREQUAL LIB_STATIC AND WIN32) | |
| set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB") | |
| endif() | |
| - | set_target_properties(${_target_name} PROPERTIES |
| - | OUTPUT_NAME "${_target}" UNITY_BUILD OFF |
| - | PROJECT_LABEL "Example ${_target}") |
| + | set_target_properties(${_target_name} PROPERTIES OUTPUT_NAME "${_target}" PROJECT_LABEL "Example ${_target}" |
| + | UNITY_BUILD OFF) |
| endforeach() | |
| @@ -57,7 +57,7 @@ LDADD = $(LIBDIR)/libcurl.la @LIBCURL_PC_LIBS_PRIVATE@ | |
| # This might hold -Werror | |
| CFLAGS += @CURL_CFLAG_EXTRAS@ | |
| - | # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines |
| + | # Get check_PROGRAMS variable |
| include Makefile.inc | |
| all: $(check_PROGRAMS) | |
| @@ -21,6 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| + | # Shared between CMakeLists.txt and Makefile.am |
| # These are all libcurl example programs to be test compiled | |
| check_PROGRAMS = \ | |
| @@ -21,7 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # Get 'man_MANS' variable |
| + | # Get man_MANS variable |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -27,6 +27,7 @@ AUTOMAKE_OPTIONS = foreign no-dependencies | |
| SUBDIRS = opts | |
| if BUILD_DOCS | |
| + | # Get man_MANS variable |
| include Makefile.inc | |
| CURLPAGES = $(man_MANS:.3=.md) | |
| @@ -21,8 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | |
| - | # Shared between Makefile.am and CMakeLists.txt |
| + | # Shared between CMakeLists.txt and Makefile.am |
| man_MANS = \ | |
| curl_easy_cleanup.3 \ | |
| @@ -21,7 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # Get 'man_MANS' variable |
| + | # Get man_MANS variable |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -25,6 +25,7 @@ | |
| AUTOMAKE_OPTIONS = foreign no-dependencies | |
| if BUILD_DOCS | |
| + | # Get man_MANS variable |
| include Makefile.inc | |
| CURLPAGES = $(man_MANS:.3=.md) | |
| @@ -21,7 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # Shared between Makefile.am and CMakeLists.txt |
| + | # Shared between CMakeLists.txt and Makefile.am |
| man_MANS = \ | |
| CURLINFO_ACTIVESOCKET.3 \ | |
| @@ -312,11 +312,9 @@ SPDX-License-Identifier: curl | |
| ### test bundles | |
| - | The `--enable-test-bundles` (autotools) and `-DCURL_TEST_BUNDLES=ON` (cmake) |
| - | build options allow to build tests bundled into single executables, one for |
| - | libtests, one for unit tests and one for servers. |
| - | The executables' first argument is the name of libtest, unit test or server |
| - | respectively. |
| + | Individual tests are bundled into single executables, one for libtests, one |
| + | for unit tests and one for servers. The executables' first argument is |
| + | the name of libtest, unit test or server respectively. |
| In these executables, the build process automatically renames the entry point | |
| to a unique symbol. `test` becomes `test_<tool>`, e.g. `test_lib1598` or | |
| `test_unit1305`. For servers `main` becomes `main_sws` for the `sws` server, | |
| @@ -29,7 +29,7 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS} | |
| configure_file("curl_config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/curl_config.h") | |
| - | # Get 'CSOURCES', 'HHEADERS' variables |
| + | # Get CSOURCES, HHEADERS variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -231,7 +231,7 @@ if(BUILD_SHARED_LIBS) | |
| option(CURL_LIBCURL_VERSIONED_SYMBOLS "Enable libcurl versioned symbols" OFF) | |
| if(CURL_LIBCURL_SOVERSION OR CURL_LIBCURL_VERSIONED_SYMBOLS) | |
| - | # Get 'VERSIONCHANGE', 'VERSIONADD', 'VERSIONDEL', 'VERSIONINFO' variables |
| + | # Get VERSIONCHANGE, VERSIONADD, VERSIONDEL, VERSIONINFO variables |
| curl_transform_makefile_inc("Makefile.soname" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake") | |
| @@ -57,8 +57,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \ | |
| # Prevent LIBS from being used for all link targets | |
| LIBS = $(BLANK_AT_MAKETIME) | |
| - | include Makefile.soname |
| - | |
| AM_CPPFLAGS += -DBUILDING_LIBCURL | |
| AM_LDFLAGS = | |
| AM_CFLAGS = | |
| @@ -69,7 +67,7 @@ if CURLDEBUG | |
| AM_CPPFLAGS += -DCURLDEBUG | |
| endif | |
| - | # Makefile.inc provides the CSOURCES and HHEADERS defines |
| + | # Get CSOURCES, HHEADERS variables |
| include Makefile.inc | |
| if DOING_NATIVE_WINDOWS | |
| @@ -86,7 +84,7 @@ if CURLDEBUG | |
| curl_EXCLUDE += memdebug.c | |
| endif | |
| libcurl_unity.c: $(top_srcdir)/scripts/mk-unity.pl $(CSOURCES) | |
| - | @PERL@ $(top_srcdir)/scripts/mk-unity.pl $(srcdir) $(CSOURCES) --exclude $(curl_EXCLUDE) > libcurl_unity.c |
| + | @PERL@ $(top_srcdir)/scripts/mk-unity.pl --srcdir $(srcdir) --include $(CSOURCES) --exclude $(curl_EXCLUDE) > libcurl_unity.c |
| nodist_libcurl_la_SOURCES = libcurl_unity.c | |
| libcurl_la_SOURCES = $(curl_EXCLUDE) | |
| @@ -103,6 +101,8 @@ libcurl_la_LDFLAGS_EXTRA = | |
| libcurl_la_CFLAGS_EXTRA = | |
| if CURL_LT_SHLIB_USE_VERSION_INFO | |
| + | # Get VERSIONCHANGE, VERSIONADD, VERSIONDEL, VERSIONINFO variables |
| + | include Makefile.soname |
| libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) | |
| endif | |
| @@ -21,6 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| + | # Shared between CMakeLists.txt and Makefile.am |
| LIB_CURLX_CFILES = \ | |
| curlx/base64.c \ | |
| @@ -21,6 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| + | # Shared between CMakeLists.txt and Makefile.am |
| # Keep in sync with CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME in configure.ac | |
| VERSIONCHANGE=12 | |
| @@ -23,48 +23,91 @@ | |
| # | |
| ########################################################################### | |
| - | # Helper script for "unity"-like support in autotools, to generate the umbrella |
| - | # C source that includes the individual source files. Reads Makefile.inc and |
| - | # accepts the variable name containing all the source files to include. Also |
| - | # allow a list of exceptions that are to be excluded from the generated file. |
| + | # Helper script for "unity"-like support in autotools and to bundle up tests |
| + | # for both autotools and cmake. It generates the umbrella C source that |
| + | # includes the individual source files and tests. |
| use strict; | |
| use warnings; | |
| if(!@ARGV) { | |
| - | die "Usage: $0 [<c-sources>] [--exclude <exclude-c-sources>]\n"; |
| + | die "Usage: $0 [--test <tests>] [--include <include-c-sources>] [--exclude <exclude-c-sources>] [--srcdir <srcdir>] [--embed]\n"; |
| } | |
| - | my $srcdir = shift @ARGV; |
| - | |
| # Specific sources to exclude or add as an extra source file | |
| my @src; | |
| my %exclude; | |
| + | my %include; |
| my $in_exclude = 0; | |
| + | my $in_include = 0; |
| + | my $srcdir = ""; |
| + | my $in_srcdir = 0; |
| + | my $any_test = 0; |
| + | my $embed = 0; |
| foreach my $src (@ARGV) { | |
| - | if($in_exclude) { |
| - | $exclude{$src} = 1; |
| + | if($src eq "--test") { |
| + | $in_exclude = 0; |
| + | $in_include = 0; |
| } | |
| elsif($src eq "--exclude") { | |
| $in_exclude = 1; | |
| + | $in_include = 0; |
| + | } |
| + | elsif($src eq "--include") { |
| + | $in_exclude = 0; |
| + | $in_include = 1; |
| + | } |
| + | elsif($src eq "--embed") { |
| + | $embed = 1; |
| + | } |
| + | elsif($src eq "--srcdir") { |
| + | $in_srcdir = 1; |
| + | } |
| + | elsif($in_srcdir) { |
| + | $srcdir = $src; |
| + | $in_srcdir = 0; |
| + | } |
| + | elsif($in_exclude) { |
| + | $exclude{$src} = 1; |
| + | } |
| + | elsif($in_include) { |
| + | $include{$src} = 1; |
| + | push @src, $src; |
| } | |
| else { | |
| push @src, $src; | |
| + | $any_test = 1; |
| } | |
| } | |
| - | print <<HEADER |
| - | /* !checksrc! disable COPYRIGHT all */ |
| - | HEADER |
| - | ; |
| + | print "/* !checksrc! disable COPYRIGHT all */\n\n"; |
| + | if($any_test) { |
| + | print "#include \"first.h\"\n\n"; |
| + | } |
| + | |
| + | my $tlist = ""; |
| foreach my $src (@src) { | |
| - | if($src =~ /\.c$/g && !exists $exclude{$src}) { |
| - | if(-e "$srcdir/$src") { |
| - | print "#include \"$srcdir/$src\"\n"; |
| + | if($src =~ /([a-z0-9]+)\.c$/ && !exists $exclude{$src}) { |
| + | my $name = $1; |
| + | my $fn = $src; |
| + | if($srcdir ne "" && (exists $include{$src} || $embed) && -e "$srcdir/$fn") { |
| + | $fn = $srcdir . "/" . $fn; |
| + | } |
| + | if($embed) { |
| + | my $content = do { local $/; open my $fh, '<', $fn or die $!; <$fh> }; |
| + | print $content; |
| } | |
| else { | |
| - | print "#include \"$src\"\n"; |
| + | print "#include \"$fn\"\n"; |
| + | } |
| + | if(not exists $include{$src}) { # register test entry function |
| + | $tlist .= " {\"$name\", test_$name},\n"; |
| } | |
| } | |
| } | |
| + | |
| + | if($any_test) { |
| + | print "\nstatic const struct entry_s s_entries[] = {\n$tlist};\n"; |
| + | print "\n#include \"first.c\"\n"; |
| + | } |
| @@ -68,7 +68,7 @@ if(CURL_CA_EMBED_SET) | |
| endif() | |
| endif() | |
| - | # Get 'CURL_CFILES', 'CURLX_CFILES', 'CURL_HFILES' variables |
| + | # Get CURL_CFILES, CURLX_CFILES, CURL_HFILES variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -67,6 +67,7 @@ if USE_UNICODE | |
| UNICODEFLAG = -municode | |
| endif | |
| + | # Get CURL_CFILES, CURLX_CFILES, CURL_HFILES variables |
| include Makefile.inc | |
| curl_cfiles_gen = | |
| @@ -80,7 +81,7 @@ else | |
| curl_CURLX = $(CURLX_CFILES) | |
| endif | |
| curltool_unity.c: $(top_srcdir)/scripts/mk-unity.pl $(CURL_CFILES) $(curl_cfiles_gen) $(curl_CURLX) | |
| - | @PERL@ $(top_srcdir)/scripts/mk-unity.pl $(srcdir) $(CURL_CFILES) $(curl_cfiles_gen) $(curl_CURLX) > curltool_unity.c |
| + | @PERL@ $(top_srcdir)/scripts/mk-unity.pl --srcdir $(srcdir) --include $(CURL_CFILES) $(curl_cfiles_gen) $(curl_CURLX) > curltool_unity.c |
| nodist_curl_SOURCES = curltool_unity.c | |
| curl_SOURCES = | |
| @@ -112,7 +113,7 @@ libcurltool_la_CFLAGS = | |
| libcurltool_la_LDFLAGS = -static $(LINKFLAGS) | |
| if USE_UNITY | |
| libcurltool_unity.c: $(top_srcdir)/scripts/mk-unity.pl $(CURL_CFILES) $(curl_CURLX) | |
| - | @PERL@ $(top_srcdir)/scripts/mk-unity.pl $(srcdir) $(CURL_CFILES) $(curl_CURLX) > libcurltool_unity.c |
| + | @PERL@ $(top_srcdir)/scripts/mk-unity.pl --srcdir $(srcdir) --include $(CURL_CFILES) $(curl_CURLX) > libcurltool_unity.c |
| nodist_libcurltool_la_SOURCES = libcurltool_unity.c | |
| libcurltool_la_SOURCES = | |
| @@ -21,7 +21,8 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # ./src/Makefile.inc |
| + | # Shared between CMakeLists.txt and Makefile.am |
| + | |
| # Using the backslash as line continuation character might be problematic with | |
| # some make flavours. If we ever want to change this in a portable manner then | |
| # we should consider this idea : | |
| @@ -24,7 +24,9 @@ | |
| * | |
| ***************************************************************************/ | |
| + | #ifndef CURL_NO_OLDIES |
| #define CURL_NO_OLDIES | |
| + | #endif |
| /* | |
| * curl_setup.h may define preprocessor macros such as _FILE_OFFSET_BITS and | |
| @@ -43,12 +43,7 @@ static const struct xattr_mapping { | |
| /* returns a new URL that needs to be freed */ | |
| /* @unittest: 1621 */ | |
| - | #ifdef UNITTESTS |
| - | char *stripcredentials(const char *url); |
| - | #else |
| - | static |
| - | #endif |
| - | char *stripcredentials(const char *url) |
| + | UNITTEST char *stripcredentials(const char *url) |
| { | |
| CURLU *u; | |
| CURLUcode uc; | |
| @@ -38,6 +38,10 @@ | |
| #ifdef USE_XATTR | |
| int fwrite_xattr(CURL *curl, const char *url, int fd); | |
| + | #ifdef UNITTESTS |
| + | UNITTEST char *stripcredentials(const char *url); |
| + | #endif |
| + | |
| #else | |
| #define fwrite_xattr(a,b,c) 0 | |
| #endif | |
| @@ -62,7 +62,6 @@ EXTRA_DIST = \ | |
| http2-server.pl \ | |
| http3-server.pl \ | |
| memanalyze.pl \ | |
| - | mk-bundle.pl \ |
| negtelnetserver.py \ | |
| nghttpx.conf \ | |
| pathhelp.pm \ | |
| @@ -21,7 +21,7 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # Get 'CERTCONFIG_CA', 'CERTCONFIGS', 'GENERATEDCERTS', 'SRPFILES' variables |
| + | # Get CERTCONFIG_CA, CERTCONFIGS, GENERATEDCERTS, SRPFILES variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -23,6 +23,7 @@ | |
| ########################################################################### | |
| AUTOMAKE_OPTIONS = foreign | |
| + | # Get CERTCONFIG_CA, CERTCONFIGS, GENERATEDCERTS, SRPFILES variables |
| include Makefile.inc | |
| EXTRA_DIST = $(CERTCONFIG_CA) $(CERTCONFIGS) $(SRPFILES) CMakeLists.txt \ | |
| @@ -21,6 +21,8 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| + | # Shared between CMakeLists.txt and Makefile.am |
| + | |
| CERTCONFIG_CA = \ | |
| test-ca.cnf \ | |
| test-ca.prm | |
| @@ -22,9 +22,6 @@ internal hash create/add/destroy testing | |
| <tool> | |
| unit1305 | |
| </tool> | |
| - | <command> |
| - | %TESTNUMBER |
| - | </command> |
| </client> | |
| </testcase> | |
| @@ -14,8 +14,6 @@ none | |
| </server> | |
| <features> | |
| unittest | |
| - | https |
| - | pop3s |
| </features> | |
| <name> | |
| unit tests for stripcredentials from URL | |
| @@ -106,7 +106,7 @@ Finally, this is the real page! | |
| http | |
| </server> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -120,7 +120,7 @@ http | |
| crypto | |
| </features> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -203,7 +203,7 @@ SSL | |
| http | |
| </server> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -156,7 +156,7 @@ http | |
| crypto | |
| </features> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -179,7 +179,7 @@ http | |
| crypto | |
| </features> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -239,7 +239,7 @@ SSL | |
| http | |
| </server> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -176,7 +176,7 @@ SSL | |
| http | |
| </server> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -228,7 +228,7 @@ SSL | |
| http | |
| </server> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -242,7 +242,7 @@ SSL | |
| http | |
| </server> | |
| <tool> | |
| - | libauthretry |
| + | lib2023 |
| </tool> | |
| <name> | |
| @@ -75,7 +75,7 @@ SSL | |
| http | |
| </server> | |
| <tool> | |
| - | libntlmconnect |
| + | lib2032 |
| </tool> | |
| <name> | |
| @@ -27,7 +27,7 @@ http | |
| Pre-request callback for HTTP | |
| </name> | |
| <tool> | |
| - | libprereq |
| + | lib2082 |
| </tool> | |
| <command> | |
| @@ -21,7 +21,7 @@ ftp | |
| Pre-request callback for FTP | |
| </name> | |
| <tool> | |
| - | libprereq |
| + | lib2082 |
| </tool> | |
| <command> | |
| @@ -27,7 +27,7 @@ http | |
| Pre-request callback for HTTP with callback terminating transfer | |
| </name> | |
| <tool> | |
| - | libprereq |
| + | lib2082 |
| </tool> | |
| <command> | |
| @@ -35,7 +35,7 @@ http | |
| Pre-request callback for HTTP with location following | |
| </name> | |
| <tool> | |
| - | libprereq |
| + | lib2082 |
| </tool> | |
| <command> | |
| @@ -32,7 +32,7 @@ http-ipv6 | |
| Pre-request callback for HTTP IPv6 | |
| </name> | |
| <tool> | |
| - | libprereq |
| + | lib2082 |
| </tool> | |
| <command> | |
| @@ -71,7 +71,6 @@ BEGIN { | |
| %feature | |
| %keywords | |
| @protocols | |
| - | $bundle |
| $dev_null | |
| ); | |
| } | |
| @@ -141,6 +140,5 @@ our @protocols; # array of lowercase supported protocol servers | |
| our %feature; # hash of enabled features | |
| our %keywords; # hash of keywords from the test spec | |
| our $has_shared; # built as a shared library | |
| - | our $bundle = 0; # use bundled server, libtest, unit binaries |
| 1; | |
| @@ -24,7 +24,7 @@ | |
| add_custom_target(test-http-clients) | |
| - | # Get 'check_PROGRAMS' variable |
| + | # Get check_PROGRAMS variable |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -42,7 +42,6 @@ foreach(_target IN LISTS check_PROGRAMS) | |
| if(LIB_SELECTED STREQUAL LIB_STATIC AND WIN32) | |
| set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB") | |
| endif() | |
| - | set_target_properties(${_target_name} PROPERTIES |
| - | OUTPUT_NAME "${_target}" UNITY_BUILD OFF |
| - | PROJECT_LABEL "Test client ${_target}") |
| + | set_target_properties(${_target_name} PROPERTIES OUTPUT_NAME "${_target}" ROJECT_LABEL "Test client ${_target}" |
| + | UNITY_BUILD OFFP) |
| endforeach() | |
| @@ -58,7 +58,7 @@ LDADD = $(LIBDIR)/libcurl.la @LIBCURL_PC_LIBS_PRIVATE@ | |
| # This might hold -Werror | |
| CFLAGS += @CURL_CFLAG_EXTRAS@ | |
| - | # Makefile.inc provides the check_PROGRAMS define |
| + | # Get check_PROGRAMS variable |
| include Makefile.inc | |
| all: $(check_PROGRAMS) | |
| @@ -21,8 +21,8 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| + | # Shared between CMakeLists.txt and Makefile.am |
| - | # These are all libcurl example programs to be test compiled |
| check_PROGRAMS = \ | |
| h2-pausing \ | |
| h2-serverpush \ | |
| @@ -2,11 +2,6 @@ | |
| # | |
| # SPDX-License-Identifier: curl | |
| - | lib[1-4][0-9][0-9][0-9] |
| - | lib[5-9][0-9][0-9] |
| - | lib1521.c |
| - | libtest_bundle.c |
| libtests | |
| - | libauthretry |
| - | libntlmconnect |
| - | libprereq |
| + | libtests.c |
| + | lib1521.c |
| @@ -22,8 +22,7 @@ | |
| # | |
| ########################################################################### | |
| - | # Get 'LIBTESTPROGS', '*_SOURCES', 'TESTUTIL', 'TSTTRACE', 'WARNLESS', 'MULTIBYTE', 'INET_PTON', 'TIMEDIFF', 'THREADS', 'MEMPTR' |
| - | # 'FIRSTFILES' variables |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, MEMPTR, CURLX_SRCS, TESTFILES variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| @@ -35,54 +34,29 @@ add_custom_command( | |
| "${PROJECT_SOURCE_DIR}/include/curl/curl.h" | |
| VERBATIM) | |
| - | if(CURL_TEST_BUNDLES) |
| - | add_custom_command( |
| - | OUTPUT "libtest_bundle.c" |
| - | COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tests/mk-bundle.pl" "${CMAKE_CURRENT_SOURCE_DIR}" > "libtest_bundle.c" |
| - | DEPENDS |
| - | "${PROJECT_SOURCE_DIR}/tests/mk-bundle.pl" ${FIRSTFILES} "lib1521.c" |
| - | "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" |
| - | VERBATIM) |
| + | add_custom_command( |
| + | OUTPUT "${BUNDLE_SRC}" |
| + | COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --test ${TESTFILES} "lib1521.c" |
| + | ${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}" |
| + | DEPENDS |
| + | "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" ${FIRSTFILES} ${TESTFILES} "lib1521.c" |
| + | VERBATIM) |
| - | set(LIBTESTPROGS "libtests") |
| - | set(libtests_SOURCES "libtest_bundle.c") |
| - | list(APPEND libtests_SOURCES ${TESTUTIL} ${TSTTRACE}) |
| - | if(LIB_SELECTED STREQUAL LIB_SHARED) |
| - | # These are part of the libcurl static lib. Add them here when linking shared. |
| - | list(APPEND libtests_SOURCES ${WARNLESS} ${MULTIBYTE} ${INET_PTON} ${TIMEDIFF} ${THREADS} ${MEMPTR}) |
| - | endif() |
| + | set(_sources "") |
| + | if(LIB_SELECTED STREQUAL LIB_SHARED) |
| + | list(APPEND _sources ${MEMPTR} ${CURLX_SRCS}) # These are part of the libcurl static lib. Add them here when linking shared. |
| endif() | |
| - | foreach(_target IN LISTS LIBTESTPROGS) |
| - | if(DEFINED ${_target}_SOURCES) |
| - | set(_sources ${${_target}_SOURCES}) |
| - | else() |
| - | set(_sources ${nodist_${_target}_SOURCES}) |
| - | endif() |
| - | |
| - | if(LIB_SELECTED STREQUAL LIB_STATIC) |
| - | # These are part of the libcurl static lib. Do not compile/link them again. |
| - | list(REMOVE_ITEM _sources ${WARNLESS} ${MULTIBYTE} ${INET_PTON} ${TIMEDIFF} ${THREADS}) |
| - | endif() |
| - | |
| - | string(TOUPPER ${_target} _upper_target) |
| - | set(_target_name "${_target}") |
| - | add_executable(${_target_name} EXCLUDE_FROM_ALL ${_sources}) |
| - | add_dependencies(testdeps ${_target_name}) |
| - | target_link_libraries(${_target_name} ${LIB_SELECTED} ${CURL_LIBS}) |
| - | target_include_directories(${_target_name} PRIVATE |
| - | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| - | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| - | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| - | "${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h" |
| - | "${PROJECT_SOURCE_DIR}/tests/libtest" # to be able to build generated tests |
| - | "${PROJECT_SOURCE_DIR}/tests/unit" # for curlcheck.h |
| - | ) |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}") |
| - | if(NOT CURL_TEST_BUNDLES) |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS ${_upper_target}) |
| - | endif() |
| - | set_target_properties(${_target_name} PROPERTIES |
| - | OUTPUT_NAME "${_target}" |
| - | PROJECT_LABEL "Test libtest ${_target}") |
| - | endforeach() |
| + | add_executable(libtests EXCLUDE_FROM_ALL ${_sources} ${UTILS} "${BUNDLE_SRC}") |
| + | add_dependencies(testdeps libtests) |
| + | target_link_libraries(libtests ${LIB_SELECTED} ${CURL_LIBS}) |
| + | target_include_directories(libtests PRIVATE |
| + | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| + | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| + | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| + | "${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h" |
| + | "${PROJECT_SOURCE_DIR}/tests/libtest" # to be able to build generated tests |
| + | "${PROJECT_SOURCE_DIR}/tests/unit" # for curlcheck.h |
| + | ) |
| + | set_property(TARGET libtests APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}" "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION") |
| + | set_target_properties(libtests PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}") |
| @@ -40,27 +40,21 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \ | |
| -I$(top_srcdir)/tests/libtest \ | |
| -I$(top_srcdir)/tests/unit | |
| - | EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl \ |
| - | CMakeLists.txt mk-lib1521.pl .checksrc |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, MEMPTR, CURLX_SRCS, TESTFILES variables |
| + | include Makefile.inc |
| + | |
| + | EXTRA_DIST = CMakeLists.txt .checksrc $(FIRSTFILES) $(UTILS) $(MEMPTR) $(TESTFILES) \ |
| + | test307.pl test610.pl test613.pl test1013.pl test1022.pl mk-lib1521.pl |
| CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ | |
| CFLAGS += @CURL_CFLAG_EXTRAS@ | |
| - | CLEANFILES = lib1521.c |
| - | |
| # Prevent LIBS from being used for all link targets | |
| LIBS = $(BLANK_AT_MAKETIME) | |
| - | SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_PC_LIBS_PRIVATE@ |
| - | TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_PC_LIBS_PRIVATE@ |
| - | |
| # Dependencies (may need to be overridden) | |
| - | LDADD = $(SUPPORTFILES_LIBS) |
| - | |
| - | # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, |
| - | # LIBTESTPROGS, lib*_SOURCES, and lib*_CFLAGS) |
| - | include Makefile.inc |
| + | LDADD = $(top_builddir)/lib/libcurl.la @LIBCURL_PC_LIBS_PRIVATE@ |
| noinst_LTLIBRARIES = | |
| @@ -74,49 +68,38 @@ if CURLDEBUG | |
| AM_CPPFLAGS += -DCURLDEBUG | |
| endif | |
| + | AM_CPPFLAGS += -DCURL_NO_OLDIES -DCURL_DISABLE_DEPRECATION |
| + | |
| AM_LDFLAGS = | |
| AM_CFLAGS = | |
| - | libstubgss_la_LDFLAGS_EXTRA = |
| - | |
| - | if CURL_LT_SHLIB_USE_NO_UNDEFINED |
| - | libstubgss_la_LDFLAGS_EXTRA += -no-undefined |
| - | endif |
| - | |
| # Build a stub gssapi implementation for testing | |
| if BUILD_STUB_GSS | |
| noinst_LTLIBRARIES += libstubgss.la | |
| libstubgss_la_CPPFLAGS = $(AM_CPPFLAGS) | |
| - | libstubgss_la_LDFLAGS = $(AM_LDFLAGS) $(libstubgss_la_LDFLAGS_EXTRA) -avoid-version -rpath /nowhere |
| + | libstubgss_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -rpath /nowhere |
| + | if CURL_LT_SHLIB_USE_NO_UNDEFINED |
| + | libstubgss_la_LDFLAGS += -no-undefined |
| + | endif |
| libstubgss_la_CFLAGS = $(AM_CFLAGS) -g | |
| - | |
| libstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h | |
| - | |
| libstubgss_la_LIBADD = | |
| libstubgss_la_DEPENDENCIES = | |
| endif | |
| - | BUNDLE=libtests |
| - | |
| - | if USE_TEST_BUNDLES |
| - | libtest_bundle.c: $(top_srcdir)/tests/mk-bundle.pl Makefile.inc $(FIRSTFILES) lib1521.c |
| - | @PERL@ $(top_srcdir)/tests/mk-bundle.pl $(srcdir) > libtest_bundle.c |
| - | |
| - | noinst_PROGRAMS = $(BUNDLE) |
| - | nodist_libtests_SOURCES = libtest_bundle.c |
| - | libtests_SOURCES = $(TESTUTIL) $(TSTTRACE) |
| - | libtests_LDADD = $(TESTUTIL_LIBS) |
| - | CLEANFILES += libtest_bundle.c |
| - | |
| + | bundle_EXCLUDE = |
| if USE_CPPFLAG_CURL_STATICLIB | |
| - | else |
| # These are part of the libcurl static lib. Add them here when linking shared. | |
| - | libtests_SOURCES += $(WARNLESS) $(MULTIBYTE) $(INET_PTON) $(TIMEDIFF) $(THREADS) $(MEMPTR) |
| - | endif |
| - | else |
| - | noinst_PROGRAMS = $(LIBTESTPROGS) |
| + | bundle_EXCLUDE += $(MEMPTR) $(CURLX_SRCS) |
| endif | |
| + | $(BUNDLE_SRC): $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRSTFILES) $(UTILS) $(MEMPTR) $(CURLX_SRCS) $(TESTFILES) lib1521.c |
| + | @PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(UTILS) $(MEMPTR) $(CURLX_SRCS) --test $(TESTFILES) lib1521.c --exclude $(bundle_EXCLUDE) > $(BUNDLE_SRC) |
| + | |
| + | noinst_PROGRAMS = $(BUNDLE) |
| + | nodist_libtests_SOURCES = $(BUNDLE_SRC) |
| + | libtests_SOURCES = $(bundle_EXCLUDE) |
| + | CLEANFILES = $(BUNDLE_SRC) lib1521.c |
| lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/curl.h | |
| @PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < $(top_srcdir)/include/curl/curl.h lib1521.c | |
| @@ -129,7 +112,7 @@ CS_ = $(CS_0) | |
| # ignore generated C files since they play by slightly different rules! | |
| checksrc: lib1521.c | |
| $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ | |
| - | -W$(srcdir)/libtest_bundle.c \ |
| + | -W$(srcdir)/$(BUNDLE_SRC) \ |
| $(srcdir)/*.[ch]) | |
| if NOT_CURL_CI | |
| @@ -21,292 +21,73 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | # files used only in some libcurl test programs |
| - | TESTUTIL = testutil.c testutil.h |
| - | TSTTRACE = testtrace.c testtrace.h |
| - | WARNLESS = ../../lib/curlx/warnless.c ../../lib/curlx/warnless.h |
| - | MULTIBYTE = ../../lib/curlx/multibyte.c ../../lib/curlx/multibyte.h |
| - | THREADS = ../../lib/curl_threads.c ../../lib/curl_threads.h |
| - | MEMPTR = memptr.c |
| + | # Shared between CMakeLists.txt and Makefile.am |
| - | # these files are used in every single test program below |
| - | TIMEDIFF = ../../lib/curlx/timediff.c ../../lib/curlx/timediff.h |
| - | FIRSTFILES = first.c first.h |
| - | SUPPORTFILES = $(TIMEDIFF) $(FIRSTFILES) test.h |
| + | BUNDLE = libtests |
| + | BUNDLE_SRC = libtests.c |
| - | # These are all libcurl test programs |
| - | LIBTESTPROGS = libauthretry libntlmconnect libprereq \ |
| - | lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 lib508 lib509 \ |
| - | lib510 lib511 lib512 lib513 lib514 lib515 lib516 lib517 lib518 lib519 \ |
| - | lib520 lib521 lib523 lib524 lib525 lib526 lib530 \ |
| - | lib533 lib536 lib537 lib539 lib540 lib541 lib542 lib543 \ |
| - | lib544 \ |
| - | lib547 lib549 lib552 lib553 lib554 lib555 lib556 lib557 lib558 \ |
| - | lib559 lib560 lib562 lib564 lib566 lib567 lib568 lib569 lib570 \ |
| - | lib571 lib572 lib573 lib574 lib575 lib576 lib578 lib579 lib582 \ |
| - | lib583 lib586 lib589 lib590 lib591 lib597 lib598 \ |
| - | lib599 \ |
| - | lib643 lib650 lib651 lib652 lib653 lib654 lib655 lib658 \ |
| - | lib659 lib661 lib666 lib667 lib668 \ |
| - | lib670 lib674 lib676 lib677 lib678 lib694 lib695 \ |
| - | lib751 \ |
| - | lib1156 \ |
| - | lib1301 \ |
| - | lib1308 \ |
| - | lib1485 \ |
| - | lib1500 lib1501 lib1502 lib1506 lib1507 lib1508 \ |
| - | lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 lib1517 \ |
| - | lib1518 lib1520 lib1521 lib1522 lib1523 \ |
| - | lib1525 lib1526 lib1527 lib1528 lib1529 lib1530 lib1531 lib1532 lib1533 \ |
| - | lib1534 lib1535 lib1536 lib1537 lib1538 \ |
| - | lib1540 lib1541 lib1542 lib1545 \ |
| - | lib1550 lib1551 lib1552 lib1553 lib1554 lib1555 lib1556 lib1557 \ |
| - | lib1558 lib1559 lib1560 lib1564 lib1565 lib1567 lib1568 lib1569 lib1571 \ |
| - | lib1576 \ |
| - | lib1591 lib1592 lib1593 lib1594 lib1597 lib1598 \ |
| - | \ |
| - | lib1662 \ |
| - | \ |
| - | lib1900 lib1901 \ |
| - | lib1903 lib1905 lib1906 lib1907 lib1908 lib1910 lib1911 lib1912 lib1913 \ |
| - | lib1915 lib1916 lib1918 lib1919 \ |
| - | lib1933 lib1934 lib1935 lib1936 lib1937 lib1938 lib1939 lib1940 \ |
| - | lib1945 lib1947 lib1948 lib1955 lib1956 lib1957 lib1958 lib1959 \ |
| - | lib1960 lib1964 \ |
| - | lib1970 lib1971 lib1972 lib1973 lib1974 lib1975 lib1977 lib1978 \ |
| - | lib2301 lib2302 lib2304 lib2306 lib2308 lib2309 \ |
| - | lib2402 lib2404 lib2405 \ |
| - | lib2502 \ |
| - | lib2700 \ |
| - | lib3010 lib3025 lib3026 lib3027 \ |
| - | lib3100 lib3101 lib3102 lib3103 lib3104 lib3105 lib3207 lib3208 |
| + | # Files referenced from the bundle source |
| + | FIRSTFILES = first.c first.h |
| - | libntlmconnect_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| + | # Common files used by test programs |
| + | UTILS = testutil.c testutil.h testtrace.c testtrace.h test.h ../unit/curlcheck.h |
| - | libauthretry_SOURCES = libauthretry.c $(SUPPORTFILES) |
| + | MEMPTR = memptr.c |
| - | libprereq_SOURCES = libprereq.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| + | CURLX_SRCS = \ |
| + | ../../lib/curlx/warnless.c \ |
| + | ../../lib/curlx/warnless.h \ |
| + | ../../lib/curlx/multibyte.c \ |
| + | ../../lib/curlx/multibyte.h \ |
| + | ../../lib/curlx/timediff.c \ |
| + | ../../lib/curlx/timediff.h \ |
| + | ../../lib/curl_threads.c \ |
| + | ../../lib/curl_threads.h |
| - | lib500_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(MULTIBYTE) |
| - | lib501_SOURCES = lib501.c $(SUPPORTFILES) |
| - | lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib505_SOURCES = lib505.c $(SUPPORTFILES) $(MULTIBYTE) |
| - | lib506_SOURCES = lib506.c $(SUPPORTFILES) $(TESTUTIL) |
| - | lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib508_SOURCES = lib508.c $(SUPPORTFILES) |
| - | lib509_SOURCES = lib509.c $(SUPPORTFILES) |
| - | lib510_SOURCES = lib510.c $(SUPPORTFILES) |
| - | lib511_SOURCES = lib511.c $(SUPPORTFILES) |
| - | lib512_SOURCES = lib512.c $(SUPPORTFILES) |
| - | lib513_SOURCES = lib513.c $(SUPPORTFILES) |
| - | lib514_SOURCES = lib514.c $(SUPPORTFILES) |
| - | lib515_SOURCES = lib515.c $(SUPPORTFILES) |
| - | lib516_SOURCES = lib516.c $(SUPPORTFILES) |
| - | lib517_SOURCES = lib517.c $(SUPPORTFILES) |
| - | lib518_SOURCES = lib518.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib519_SOURCES = lib519.c $(SUPPORTFILES) |
| - | lib520_SOURCES = lib520.c $(SUPPORTFILES) |
| - | lib521_SOURCES = lib521.c $(SUPPORTFILES) |
| - | lib523_SOURCES = lib523.c $(SUPPORTFILES) |
| - | lib524_SOURCES = lib524.c $(SUPPORTFILES) |
| - | lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib536_SOURCES = lib536.c $(SUPPORTFILES) |
| - | lib537_SOURCES = lib537.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib539_SOURCES = lib539.c $(SUPPORTFILES) |
| - | lib540_SOURCES = lib540.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib541_SOURCES = lib541.c $(SUPPORTFILES) $(MULTIBYTE) |
| - | lib542_SOURCES = lib542.c $(SUPPORTFILES) |
| - | lib543_SOURCES = lib543.c $(SUPPORTFILES) |
| - | lib544_SOURCES = lib544.c $(SUPPORTFILES) |
| - | lib547_SOURCES = lib547.c $(SUPPORTFILES) |
| - | lib549_SOURCES = lib549.c $(SUPPORTFILES) |
| - | lib552_SOURCES = lib552.c $(SUPPORTFILES) $(WARNLESS) |
| - | lib553_SOURCES = lib553.c $(SUPPORTFILES) |
| - | lib554_SOURCES = lib554.c $(SUPPORTFILES) |
| - | lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib556_SOURCES = lib556.c $(SUPPORTFILES) $(WARNLESS) |
| - | lib557_SOURCES = lib557.c $(SUPPORTFILES) |
| - | lib558_SOURCES = lib558.c $(SUPPORTFILES) |
| - | lib559_SOURCES = lib559.c $(SUPPORTFILES) |
| - | lib560_SOURCES = lib560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib562_SOURCES = lib562.c $(SUPPORTFILES) |
| - | lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib566_SOURCES = lib566.c $(SUPPORTFILES) $(MULTIBYTE) |
| - | lib567_SOURCES = lib567.c $(SUPPORTFILES) |
| - | lib568_SOURCES = lib568.c $(SUPPORTFILES) $(TESTUTIL) $(MULTIBYTE) |
| - | lib569_SOURCES = lib569.c $(SUPPORTFILES) $(TESTUTIL) $(MULTIBYTE) |
| - | lib570_SOURCES = lib570.c $(SUPPORTFILES) $(TESTUTIL) |
| - | lib571_SOURCES = lib571.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib572_SOURCES = lib572.c $(SUPPORTFILES) $(TESTUTIL) $(MULTIBYTE) |
| - | lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(TSTTRACE) |
| - | lib574_SOURCES = lib574.c $(SUPPORTFILES) |
| - | lib575_SOURCES = lib575.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib576_SOURCES = lib576.c $(SUPPORTFILES) |
| - | lib578_SOURCES = lib578.c $(SUPPORTFILES) $(MULTIBYTE) |
| - | lib579_SOURCES = lib579.c $(SUPPORTFILES) $(MULTIBYTE) |
| - | lib582_SOURCES = lib582.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib583_SOURCES = lib583.c $(SUPPORTFILES) |
| - | lib586_SOURCES = lib586.c $(SUPPORTFILES) |
| - | lib589_SOURCES = lib589.c $(SUPPORTFILES) |
| - | lib590_SOURCES = lib590.c $(SUPPORTFILES) |
| - | lib591_SOURCES = lib591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib597_SOURCES = lib597.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib598_SOURCES = lib598.c $(SUPPORTFILES) |
| - | lib599_SOURCES = lib599.c $(SUPPORTFILES) $(MULTIBYTE) |
| - | lib643_SOURCES = lib643.c $(SUPPORTFILES) |
| - | lib650_SOURCES = lib650.c $(SUPPORTFILES) |
| - | lib651_SOURCES = lib651.c $(SUPPORTFILES) |
| - | lib652_SOURCES = lib652.c $(SUPPORTFILES) |
| - | lib653_SOURCES = lib653.c $(SUPPORTFILES) |
| - | lib654_SOURCES = lib654.c $(SUPPORTFILES) |
| - | lib655_SOURCES = lib655.c $(SUPPORTFILES) |
| - | lib658_SOURCES = lib658.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib659_SOURCES = lib659.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib661_SOURCES = lib661.c $(SUPPORTFILES) |
| - | lib666_SOURCES = lib666.c $(SUPPORTFILES) |
| - | lib667_SOURCES = lib667.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib668_SOURCES = lib668.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib670_SOURCES = lib670.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib674_SOURCES = lib674.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib676_SOURCES = lib676.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib677_SOURCES = lib677.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib678_SOURCES = lib678.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE) |
| - | lib694_SOURCES = lib694.c $(SUPPORTFILES) |
| - | lib695_SOURCES = lib695.c $(SUPPORTFILES) |
| - | lib751_SOURCES = lib751.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1301_SOURCES = lib1301.c $(SUPPORTFILES) $(TESTUTIL) |
| - | lib1308_SOURCES = lib1308.c $(SUPPORTFILES) |
| - | lib1485_SOURCES = lib1485.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL) |
| - | lib1501_SOURCES = lib1501.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1502_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1156_SOURCES = lib1156.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1507_SOURCES = lib1507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1509_SOURCES = lib1509.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1510_SOURCES = lib1510.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1511_SOURCES = lib1511.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1512_SOURCES = lib1512.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1513_SOURCES = lib1513.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1514_SOURCES = lib1514.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1515_SOURCES = lib1515.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(WARNLESS) |
| - | lib1517_SOURCES = lib1517.c $(SUPPORTFILES) |
| - | lib1518_SOURCES = lib1518.c $(SUPPORTFILES) |
| - | lib1520_SOURCES = lib1520.c $(SUPPORTFILES) |
| - | nodist_lib1521_SOURCES = lib1521.c $(SUPPORTFILES) |
| - | lib1521_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir) |
| - | lib1522_SOURCES = lib1522.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) |
| - | lib1523_SOURCES = lib1523.c $(SUPPORTFILES) |
| - | lib1525_SOURCES = lib1525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1526_SOURCES = lib1526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1527_SOURCES = lib1527.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1528_SOURCES = lib1528.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1529_SOURCES = lib1529.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1530_SOURCES = lib1530.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1531_SOURCES = lib1531.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1532_SOURCES = lib1532.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1533_SOURCES = lib1533.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1534_SOURCES = lib1534.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1535_SOURCES = lib1535.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1536_SOURCES = lib1536.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1537_SOURCES = lib1537.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1538_SOURCES = lib1538.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1540_SOURCES = lib1540.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(WARNLESS) |
| - | lib1541_SOURCES = lib1541.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1542_SOURCES = lib1542.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(WARNLESS) |
| - | lib1545_SOURCES = lib1545.c $(SUPPORTFILES) |
| - | lib1550_SOURCES = lib1550.c $(SUPPORTFILES) |
| - | lib1551_SOURCES = lib1551.c $(SUPPORTFILES) |
| - | lib1552_SOURCES = lib1552.c $(SUPPORTFILES) $(TESTUTIL) |
| - | lib1553_SOURCES = lib1553.c $(SUPPORTFILES) $(TSTTRACE) $(TESTUTIL) |
| - | lib1554_SOURCES = lib1554.c $(SUPPORTFILES) |
| - | lib1555_SOURCES = lib1555.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1556_SOURCES = lib1556.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1557_SOURCES = lib1557.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1558_SOURCES = lib1558.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1559_SOURCES = lib1559.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1560_SOURCES = lib1560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1564_SOURCES = lib1564.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1565_SOURCES = lib1565.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1567_SOURCES = lib1567.c $(SUPPORTFILES) |
| - | lib1568_SOURCES = lib1568.c $(SUPPORTFILES) |
| - | lib1569_SOURCES = lib1569.c $(SUPPORTFILES) |
| - | lib1571_SOURCES = lib1571.c $(SUPPORTFILES) |
| - | lib1576_SOURCES = lib1576.c $(SUPPORTFILES) |
| - | lib1591_SOURCES = lib1591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1592_SOURCES = lib1592.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1593_SOURCES = lib1593.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1594_SOURCES = lib1594.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1597_SOURCES = lib1597.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1598_SOURCES = lib1598.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1662_SOURCES = lib1662.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1900_SOURCES = lib1900.c $(SUPPORTFILES) |
| - | lib1901_SOURCES = lib1901.c $(SUPPORTFILES) |
| - | lib1903_SOURCES = lib1903.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1905_SOURCES = lib1905.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1906_SOURCES = lib1906.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1907_SOURCES = lib1907.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1908_SOURCES = lib1908.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1910_SOURCES = lib1910.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1911_SOURCES = lib1911.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1912_SOURCES = lib1912.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1913_SOURCES = lib1913.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1915_SOURCES = lib1915.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(WARNLESS) |
| - | lib1916_SOURCES = lib1916.c $(SUPPORTFILES) $(WARNLESS) |
| - | lib1918_SOURCES = lib1918.c $(SUPPORTFILES) $(WARNLESS) |
| - | lib1919_SOURCES = lib1919.c $(SUPPORTFILES) $(WARNLESS) |
| - | lib1933_SOURCES = lib1933.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1934_SOURCES = lib1934.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1935_SOURCES = lib1935.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1936_SOURCES = lib1936.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1937_SOURCES = lib1937.c $(SUPPORTFILES) |
| - | lib1938_SOURCES = lib1938.c $(SUPPORTFILES) |
| - | lib1939_SOURCES = lib1939.c $(SUPPORTFILES) |
| - | lib1940_SOURCES = lib1940.c $(SUPPORTFILES) |
| - | lib1945_SOURCES = lib1945.c $(SUPPORTFILES) |
| - | lib1947_SOURCES = lib1947.c $(SUPPORTFILES) |
| - | lib1948_SOURCES = lib1948.c $(SUPPORTFILES) |
| - | lib1955_SOURCES = lib1955.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1956_SOURCES = lib1956.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1957_SOURCES = lib1957.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1958_SOURCES = lib1958.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1959_SOURCES = lib1959.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1960_SOURCES = lib1960.c $(SUPPORTFILES) |
| - | lib1964_SOURCES = lib1964.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1970_SOURCES = lib1970.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1971_SOURCES = lib1971.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1972_SOURCES = lib1972.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1973_SOURCES = lib1973.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1974_SOURCES = lib1974.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1975_SOURCES = lib1975.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1977_SOURCES = lib1977.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib1978_SOURCES = lib1978.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib2301_SOURCES = lib2301.c $(SUPPORTFILES) |
| - | lib2302_SOURCES = lib2302.c $(SUPPORTFILES) |
| - | lib2304_SOURCES = lib2304.c $(SUPPORTFILES) |
| - | lib2306_SOURCES = lib2306.c $(SUPPORTFILES) |
| - | lib2308_SOURCES = lib2308.c $(SUPPORTFILES) |
| - | lib2309_SOURCES = lib2309.c $(SUPPORTFILES) |
| - | lib2402_SOURCES = lib2402.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib2404_SOURCES = lib2404.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib2405_SOURCES = lib2405.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib2502_SOURCES = lib2502.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(WARNLESS) |
| - | lib2700_SOURCES = lib2700.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(MULTIBYTE) |
| - | lib3010_SOURCES = lib3010.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib3025_SOURCES = lib3025.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib3026_SOURCES = lib3026.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib3027_SOURCES = lib3027.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib3100_SOURCES = lib3100.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib3101_SOURCES = lib3101.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib3102_SOURCES = lib3102.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
| - | lib3103_SOURCES = lib3103.c $(SUPPORTFILES) |
| - | lib3104_SOURCES = lib3104.c $(SUPPORTFILES) |
| - | lib3105_SOURCES = lib3105.c $(SUPPORTFILES) |
| - | lib3207_SOURCES = lib3207.c $(SUPPORTFILES) $(TESTUTIL) $(THREADS) $(WARNLESS) $(MULTIBYTE) $(MEMPTR) |
| - | lib3208_SOURCES = lib3208.c $(SUPPORTFILES) $(TESTUTIL) |
| + | # All libtest programs |
| + | TESTFILES = \ |
| + | lib500.c lib501.c lib502.c lib503.c lib504.c lib505.c lib506.c lib507.c lib508.c lib509.c \ |
| + | lib510.c lib511.c lib512.c lib513.c lib514.c lib515.c lib516.c lib517.c lib518.c lib519.c \ |
| + | lib520.c lib521.c lib523.c lib524.c lib525.c lib526.c lib530.c \ |
| + | lib533.c lib536.c lib537.c lib539.c lib540.c lib541.c lib542.c lib543.c \ |
| + | lib544.c \ |
| + | lib547.c lib549.c lib552.c lib553.c lib554.c lib555.c lib556.c lib557.c lib558.c \ |
| + | lib559.c lib560.c lib562.c lib564.c lib566.c lib567.c lib568.c lib569.c lib570.c \ |
| + | lib571.c lib572.c lib573.c lib574.c lib575.c lib576.c lib578.c lib579.c lib582.c \ |
| + | lib583.c lib586.c lib589.c lib590.c lib591.c lib597.c lib598.c \ |
| + | lib599.c \ |
| + | lib643.c lib650.c lib651.c lib652.c lib653.c lib654.c lib655.c lib658.c \ |
| + | lib659.c lib661.c lib666.c lib667.c lib668.c \ |
| + | lib670.c lib674.c lib676.c lib677.c lib678.c lib694.c lib695.c \ |
| + | lib751.c \ |
| + | lib1156.c \ |
| + | lib1301.c \ |
| + | lib1308.c \ |
| + | lib1485.c \ |
| + | lib1500.c lib1501.c lib1502.c lib1506.c lib1507.c lib1508.c \ |
| + | lib1509.c lib1510.c lib1511.c lib1512.c lib1513.c lib1514.c lib1515.c lib1517.c \ |
| + | lib1518.c lib1520.c lib1522.c lib1523.c \ |
| + | lib1525.c lib1526.c lib1527.c lib1528.c lib1529.c lib1530.c lib1531.c lib1532.c lib1533.c \ |
| + | lib1534.c lib1535.c lib1536.c lib1537.c lib1538.c \ |
| + | lib1540.c lib1541.c lib1542.c lib1545.c \ |
| + | lib1550.c lib1551.c lib1552.c lib1553.c lib1554.c lib1555.c lib1556.c lib1557.c \ |
| + | lib1558.c lib1559.c lib1560.c lib1564.c lib1565.c lib1567.c lib1568.c lib1569.c lib1571.c \ |
| + | lib1576.c \ |
| + | lib1591.c lib1592.c lib1593.c lib1594.c lib1597.c lib1598.c \ |
| + | \ |
| + | lib1662.c \ |
| + | \ |
| + | lib1900.c lib1901.c \ |
| + | lib1903.c lib1905.c lib1906.c lib1907.c lib1908.c lib1910.c lib1911.c lib1912.c lib1913.c \ |
| + | lib1915.c lib1916.c lib1918.c lib1919.c \ |
| + | lib1933.c lib1934.c lib1935.c lib1936.c lib1937.c lib1938.c lib1939.c lib1940.c \ |
| + | lib1945.c lib1947.c lib1948.c lib1955.c lib1956.c lib1957.c lib1958.c lib1959.c \ |
| + | lib1960.c lib1964.c \ |
| + | lib1970.c lib1971.c lib1972.c lib1973.c lib1974.c lib1975.c lib1977.c lib1978.c \ |
| + | lib2023.c lib2032.c lib2082.c \ |
| + | lib2301.c lib2302.c lib2304.c lib2306.c lib2308.c lib2309.c \ |
| + | lib2402.c lib2404.c lib2405.c \ |
| + | lib2502.c \ |
| + | lib2700.c \ |
| + | lib3010.c lib3025.c lib3026.c lib3027.c \ |
| + | lib3100.c lib3101.c lib3102.c lib3103.c lib3104.c lib3105.c lib3207.c lib3208.c |
| @@ -21,9 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "test.h" |
| - | #include "first.h" |
| - | |
| #ifdef HAVE_LOCALE_H | |
| # include <locale.h> /* for setlocale() */ | |
| #endif | |
| @@ -120,9 +117,10 @@ int main(int argc, char **argv) | |
| { | |
| char *URL; | |
| CURLcode result; | |
| - | int basearg; |
| - | test_func_t test_func; |
| + | entry_func_t entry_func; |
| + | char *entry_name; |
| char *env; | |
| + | size_t tmp; |
| CURL_SET_BINMODE(stdout); | |
| @@ -137,61 +135,38 @@ int main(int argc, char **argv) | |
| setlocale(LC_ALL, ""); | |
| #endif | |
| - | test_argc = argc; |
| - | test_argv = argv; |
| - | |
| - | #ifdef CURLTESTS_BUNDLED |
| - | { |
| - | char *test_name; |
| - | |
| - | --test_argc; |
| - | ++test_argv; |
| - | |
| - | basearg = 2; |
| - | |
| - | if(argc < (basearg + 1)) { |
| - | curl_mfprintf(stderr, "Pass testname and URL as arguments please\n"); |
| - | return 1; |
| - | } |
| + | test_argc = argc - 1; |
| + | test_argv = argv + 1; |
| - | test_name = argv[basearg - 1]; |
| - | test_func = NULL; |
| - | { |
| - | size_t tmp; |
| - | for(tmp = 0; tmp < CURL_ARRAYSIZE(s_tests); ++tmp) { |
| - | if(strcmp(test_name, s_tests[tmp].name) == 0) { |
| - | test_func = s_tests[tmp].ptr; |
| - | break; |
| - | } |
| - | } |
| - | } |
| + | if(argc < 3) { |
| + | curl_mfprintf(stderr, "Pass testname and URL as arguments please\n"); |
| + | return 1; |
| + | } |
| - | if(!test_func) { |
| - | curl_mfprintf(stderr, "Test '%s' not found.\n", test_name); |
| - | return 1; |
| + | entry_name = argv[1]; |
| + | entry_func = NULL; |
| + | for(tmp = 0; tmp < CURL_ARRAYSIZE(s_entries); ++tmp) { |
| + | if(strcmp(entry_name, s_entries[tmp].name) == 0) { |
| + | entry_func = s_entries[tmp].ptr; |
| + | break; |
| } | |
| } | |
| - | #else |
| - | basearg = 1; |
| - | if(argc < (basearg + 1)) { |
| - | curl_mfprintf(stderr, "Pass URL as argument please\n"); |
| + | if(!entry_func) { |
| + | curl_mfprintf(stderr, "Test '%s' not found.\n", entry_name); |
| return 1; | |
| } | |
| - | test_func = test; |
| - | #endif |
| - | |
| - | if(argc > (basearg + 1)) |
| - | libtest_arg2 = argv[basearg + 1]; |
| + | if(argc > 3) |
| + | libtest_arg2 = argv[3]; |
| - | if(argc > (basearg + 2)) |
| - | libtest_arg3 = argv[basearg + 2]; |
| + | if(argc > 4) |
| + | libtest_arg3 = argv[4]; |
| - | if(argc > (basearg + 2)) |
| - | libtest_arg4 = argv[basearg + 3]; |
| + | if(argc > 5) |
| + | libtest_arg4 = argv[5]; |
| - | URL = argv[basearg]; /* provide this to the rest */ |
| + | URL = argv[2]; /* provide this to the rest */ |
| env = getenv("CURL_TESTNUM"); | |
| if(env) | |
| @@ -201,7 +176,7 @@ int main(int argc, char **argv) | |
| curl_mfprintf(stderr, "URL: %s\n", URL); | |
| - | result = test_func(URL); |
| + | result = entry_func(URL); |
| curl_mfprintf(stderr, "Test ended with result %d\n", result); | |
| #ifdef _WIN32 | |
| @@ -23,17 +23,13 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #define CURL_DISABLE_DEPRECATION 1 |
| - | #include "curl_setup.h" |
| - | #include <curl/curl.h> |
| + | #include "test.h" |
| - | typedef CURLcode (*test_func_t)(char *); |
| + | typedef CURLcode (*entry_func_t)(char *); |
| - | #ifdef CURLTESTS_BUNDLED |
| - | struct onetest { |
| + | struct entry_s { |
| const char *name; | |
| - | test_func_t ptr; |
| + | entry_func_t ptr; |
| }; | |
| - | #endif |
| #endif /* HEADER_LIBTEST_FIRST_H */ | |
| @@ -131,7 +131,7 @@ test_cleanup: | |
| /* for debugging: */ | |
| /* #define SINGLETEST 9 */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1156(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -23,7 +23,7 @@ | |
| ***************************************************************************/ | |
| #include "curlcheck.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1301(char *URL) |
| { | |
| int rc; | |
| (void)URL; | |
| @@ -23,8 +23,6 @@ | |
| ***************************************************************************/ | |
| #include "curlcheck.h" | |
| - | #include <curl/curl.h> |
| - | |
| static size_t print_httppost_callback(void *arg, const char *buf, size_t len) | |
| { | |
| fwrite(buf, len, 1, stdout); | |
| @@ -32,7 +30,7 @@ static size_t print_httppost_callback(void *arg, const char *buf, size_t len) | |
| return len; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1308(char *URL) |
| { | |
| CURLFORMcode rc; | |
| int res; | |
| @@ -87,7 +87,7 @@ static size_t t1485_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return len; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1485(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1500(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLM *multi = NULL; | |
| @@ -32,12 +32,12 @@ | |
| #undef TEST_HANG_TIMEOUT | |
| #define TEST_HANG_TIMEOUT 30 * 1000 | |
| - | /* 500 milliseconds allowed. An extreme number but lets be really conservative |
| - | to allow old and slow machines to run this test too */ |
| - | #define MAX_BLOCKED_TIME_MS 500 |
| - | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1501(char *URL) |
| { | |
| + | /* 500 milliseconds allowed. An extreme number but lets be really |
| + | conservative to allow old and slow machines to run this test too */ |
| + | static const int MAX_BLOCKED_TIME_MS = 500; |
| + | |
| CURL *handle = NULL; | |
| CURLM *mhandle = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -37,7 +37,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1502(char *URL) |
| { | |
| CURL *easy = NULL; | |
| CURL *dup; | |
| @@ -27,13 +27,13 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1506(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl[NUM_HANDLES] = {0}; | |
| int running; | |
| CURLM *m = NULL; | |
| - | int i; |
| + | size_t i; |
| char target_url[256]; | |
| char dnsentry[256]; | |
| struct curl_slist *slist = NULL, *slist2; | |
| @@ -43,9 +43,9 @@ CURLcode test(char *URL) | |
| (void)URL; | |
| /* Create fake DNS entries for serverX.example.com for all handles */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| curl_msnprintf(dnsentry, sizeof(dnsentry), "server%d.example.com:%s:%s", | |
| - | i + 1, port, address); |
| + | (int)i + 1, port, address); |
| curl_mprintf("%s\n", dnsentry); | |
| slist2 = curl_slist_append(slist, dnsentry); | |
| if(!slist2) { | |
| @@ -63,14 +63,14 @@ CURLcode test(char *URL) | |
| multi_setopt(m, CURLMOPT_MAXCONNECTS, 3L); | |
| - | /* get NUM_HANDLES easy handles */ |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | /* get each easy handle */ |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* get an easy handle */ | |
| easy_init(curl[i]); | |
| /* specify target */ | |
| curl_msnprintf(target_url, sizeof(target_url), | |
| "http://server%d.example.com:%s/path/1506%04i", | |
| - | i + 1, port, i + 1); |
| + | (int)i + 1, port, (int)i + 1); |
| target_url[sizeof(target_url) - 1] = '\0'; | |
| easy_setopt(curl[i], CURLOPT_URL, target_url); | |
| /* go verbose */ | |
| @@ -83,7 +83,7 @@ CURLcode test(char *URL) | |
| curl_mfprintf(stderr, "Start at URL 0\n"); | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* add handle to multi */ | |
| multi_add_handle(m, curl[i]); | |
| @@ -121,7 +121,7 @@ test_cleanup: | |
| /* proper cleanup sequence - type PB */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| curl_multi_remove_handle(m, curl[i]); | |
| curl_easy_cleanup(curl[i]); | |
| } | |
| @@ -36,8 +36,6 @@ | |
| #define RECIPIENT "<[email protected]>" | |
| #define MAILFROM "<[email protected]>" | |
| - | #define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000 |
| - | |
| static size_t t1507_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| { | |
| (void)ptr; | |
| @@ -47,8 +45,10 @@ static size_t t1507_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return CURL_READFUNC_ABORT; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1507(char *URL) |
| { | |
| + | static const int MULTI_PERFORM_HANG_TIMEOUT = 60 * 1000; |
| + | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| CURLM *mcurl = NULL; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1508(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURLM *m = NULL; | |
| @@ -32,7 +32,7 @@ size_t WriteHeader(char *ptr, size_t size, size_t nmemb, void *stream); | |
| static unsigned long realHeaderSize = 0; | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1509(char *URL) |
| { | |
| long headerSize; | |
| CURLcode code; | |
| @@ -27,10 +27,10 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | #define NUM_URLS 4 |
| - | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1510(char *URL) |
| { | |
| + | static const int NUM_URLS = 4; |
| + | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| int i; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1511(char *URL) |
| { | |
| long unmet; | |
| CURL *curl = NULL; | |
| @@ -32,18 +32,15 @@ | |
| #include "memdebug.h" | |
| - | #undef NUM_HANDLES |
| - | #define NUM_HANDLES 2 |
| - | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1512(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| - | CURL *curl[NUM_HANDLES] = {NULL, NULL}; |
| + | CURL *curl[2] = {NULL, NULL}; |
| char *port = libtest_arg3; | |
| char *address = libtest_arg2; | |
| char dnsentry[256]; | |
| struct curl_slist *slist = NULL; | |
| - | int i; |
| + | size_t i; |
| char target_url[256]; | |
| (void)URL; /* URL is setup in the code */ | |
| @@ -57,14 +54,14 @@ CURLcode test(char *URL) | |
| curl_mprintf("%s\n", dnsentry); | |
| slist = curl_slist_append(slist, dnsentry); | |
| - | /* get NUM_HANDLES easy handles */ |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | /* get each easy handle */ |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* get an easy handle */ | |
| easy_init(curl[i]); | |
| /* specify target */ | |
| curl_msnprintf(target_url, sizeof(target_url), | |
| "http://server.example.curl:%s/path/1512%04i", | |
| - | port, i + 1); |
| + | port, (int)i + 1); |
| target_url[sizeof(target_url) - 1] = '\0'; | |
| easy_setopt(curl[i], CURLOPT_URL, target_url); | |
| /* go verbose */ | |
| @@ -78,8 +75,8 @@ CURLcode test(char *URL) | |
| /* make the first one populate the GLOBAL cache */ | |
| easy_setopt(curl[0], CURLOPT_RESOLVE, slist); | |
| - | /* run NUM_HANDLES transfers */ |
| - | for(i = 0; (i < NUM_HANDLES) && !res; i++) { |
| + | /* run each transfer */ |
| + | for(i = 0; (i < CURL_ARRAYSIZE(curl)) && !res; i++) { |
| res = curl_easy_perform(curl[i]); | |
| if(res) | |
| goto test_cleanup; | |
| @@ -47,7 +47,7 @@ static int progressKiller(void *arg, | |
| return 1; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1513(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -52,7 +52,7 @@ static size_t t1514_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; /* no more data left to deliver */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1514(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode result = CURLE_OK; | |
| @@ -101,7 +101,7 @@ test_cleanup: | |
| return res; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1515(char *URL) |
| { | |
| CURLM *multi = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -51,7 +51,7 @@ static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return tocopy; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1517(char *URL) |
| { | |
| static const char testdata[] = | |
| "this is what we post to the silly web server\n"; | |
| @@ -37,7 +37,7 @@ static size_t t1518_write_cb(char *buffer, size_t size, size_t nitems, | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1518(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -71,7 +71,7 @@ static size_t t1520_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1520(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -47,7 +47,7 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd, | |
| return CURL_SOCKOPT_OK; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1522(char *URL) |
| { | |
| static char g_Data[40 * 1024]; /* POST 40KB */ | |
| @@ -55,7 +55,7 @@ static CURLcode run(CURL *hnd, long limit, long time) | |
| return curl_easy_perform(hnd); | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1523(char *URL) |
| { | |
| CURLcode ret; | |
| CURL *hnd; | |
| @@ -45,7 +45,7 @@ static size_t t1525_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| return strlen(t1525_testdata); | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1525(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_FAILED_INIT; | |
| @@ -44,7 +44,7 @@ static size_t t1526_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| return strlen(t1526_testdata); | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1526(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_FAILED_INIT; | |
| @@ -44,7 +44,7 @@ static size_t t1527_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| return strlen(t1527_testdata); | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1527(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_FAILED_INIT; | |
| @@ -21,12 +21,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1528(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_FAILED_INIT; | |
| @@ -21,12 +21,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1529(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_FAILED_INIT; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| @@ -37,7 +36,7 @@ static curl_socket_t opensocket(void *clientp, | |
| return CURL_SOCKET_BAD; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1530(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_FAILED_INIT; | |
| @@ -28,7 +28,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1531(char *URL) |
| { | |
| static char const testData[] = ".abc\0xyz"; | |
| static curl_off_t const testDataSize = sizeof(testData) - 1; | |
| @@ -27,7 +27,7 @@ | |
| /* Test CURLINFO_RESPONSE_CODE */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1532(char *URL) |
| { | |
| CURL *curl; | |
| long httpcode; | |
| @@ -123,7 +123,7 @@ static CURLcode perform_and_check_connections(CURL *curl, | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1533(char *URL) |
| { | |
| struct cb_data data; | |
| CURL *curl = NULL; | |
| @@ -27,7 +27,7 @@ | |
| /* Test CURLINFO_FILETIME */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1534(char *URL) |
| { | |
| CURL *curl, *dupe = NULL; | |
| long filetime; | |
| @@ -110,7 +110,6 @@ CURLcode test(char *URL) | |
| goto test_cleanup; | |
| } | |
| - | |
| /* Test that a filetime is properly initialized on curl_easy_reset. | |
| */ | |
| @@ -27,7 +27,7 @@ | |
| /* Test CURLINFO_PROTOCOL */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1535(char *URL) |
| { | |
| CURL *curl, *dupe = NULL; | |
| long protocol; | |
| @@ -113,7 +113,6 @@ CURLcode test(char *URL) | |
| goto test_cleanup; | |
| } | |
| - | |
| /* Test that a protocol is properly initialized on curl_easy_reset. | |
| */ | |
| @@ -27,7 +27,7 @@ | |
| /* Test CURLINFO_SCHEME */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1536(char *URL) |
| { | |
| CURL *curl, *dupe = NULL; | |
| char *scheme; | |
| @@ -109,7 +109,6 @@ CURLcode test(char *URL) | |
| goto test_cleanup; | |
| } | |
| - | |
| /* Test that a scheme is properly initialized on curl_easy_reset. | |
| */ | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1537(char *URL) |
| { | |
| const unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | |
| 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7}; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1538(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURLcode easyret; | |
| @@ -83,7 +83,7 @@ static size_t t1540_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return CURL_WRITEFUNC_PAUSE; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1540(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -110,7 +110,7 @@ static size_t t1541_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return size * nmemb; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1541(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -36,7 +36,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1542(char *URL) |
| { | |
| CURL *easy = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -23,7 +23,7 @@ | |
| ***************************************************************************/ | |
| #include "test.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1545(char *URL) |
| { | |
| CURL *eh = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -27,7 +27,7 @@ | |
| #include <curl/multi.h> | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1550(char *URL) |
| { | |
| CURLM *handle; | |
| CURLcode res = CURLE_OK; | |
| @@ -27,7 +27,7 @@ | |
| #include <curl/multi.h> | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1551(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1552(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLM *multi = NULL; | |
| @@ -41,7 +41,7 @@ static int t1553_xferinfo(void *p, | |
| return 1; /* fail as fast as we can */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1553(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLM *multi = NULL; | |
| @@ -55,7 +55,7 @@ static void t1554_test_unlock(CURL *handle, curl_lock_data data, void *useptr) | |
| } | |
| /* test function */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1554(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURLSH *share = NULL; | |
| @@ -53,7 +53,7 @@ static int progressCallback(void *arg, | |
| return 1; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1555(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| @@ -44,7 +44,7 @@ static size_t header(char *ptr, size_t size, size_t nmemb, void *stream) | |
| return nmemb * size; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1556(char *URL) |
| { | |
| CURLcode code; | |
| CURL *curl = NULL; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1557(char *URL) |
| { | |
| CURLM *curlm = NULL; | |
| CURL *curl1 = NULL; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1558(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| @@ -27,9 +27,10 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | #define EXCESSIVE 10*1000*1000 |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1559(char *URL) |
| { | |
| + | static const int EXCESSIVE = 10*1000*1000; |
| + | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| char *longurl = NULL; | |
| @@ -39,12 +39,6 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" /* LAST include file */ | |
| - | struct part { |
| - | CURLUPart part; |
| - | const char *name; |
| - | }; |
| - | |
| - | |
| static int checkparts(CURLU *u, const char *in, const char *wanted, | |
| unsigned int getflags) | |
| { | |
| @@ -53,6 +47,12 @@ static int checkparts(CURLU *u, const char *in, const char *wanted, | |
| char buf[256]; | |
| char *bufp = &buf[0]; | |
| size_t len = sizeof(buf); | |
| + | |
| + | struct part { |
| + | CURLUPart part; |
| + | const char *name; |
| + | }; |
| + | |
| struct part parts[] = { | |
| {CURLUPART_SCHEME, "scheme"}, | |
| {CURLUPART_USER, "user"}, | |
| @@ -1839,7 +1839,7 @@ static int get_nothing(void) | |
| rc = curl_url_get(u, CURLUPART_ZONEID, &p, 0); | |
| if(rc != CURLUE_NO_ZONEID) | |
| curl_mfprintf(stderr, "unexpected return code %u on line %u\n", (int)rc, | |
| - | __LINE__); |
| + | __LINE__); |
| curl_url_cleanup(u); | |
| } | |
| @@ -2018,7 +2018,7 @@ err: | |
| return 1; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1560(char *URL) |
| { | |
| (void)URL; /* not used */ | |
| @@ -29,7 +29,7 @@ | |
| #define WAKEUP_NUM 10 | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1564(char *URL) |
| { | |
| CURLM *multi = NULL; | |
| int numfds; | |
| @@ -40,7 +40,7 @@ static int pending_num = 0; | |
| static CURLcode t1565_test_failure = CURLE_OK; | |
| static CURLM *testmulti = NULL; | |
| - | static const char *url; |
| + | static const char *t1565_url; |
| static void *t1565_run_thread(void *ptr) | |
| { | |
| @@ -55,7 +55,7 @@ static void *t1565_run_thread(void *ptr) | |
| easy_init(easy); | |
| - | easy_setopt(easy, CURLOPT_URL, url); |
| + | easy_setopt(easy, CURLOPT_URL, t1565_url); |
| easy_setopt(easy, CURLOPT_VERBOSE, 0L); | |
| pthread_mutex_lock(&lock); | |
| @@ -88,7 +88,7 @@ test_cleanup: | |
| return NULL; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1565(char *URL) |
| { | |
| int still_running; | |
| int num; | |
| @@ -108,7 +108,7 @@ CURLcode test(char *URL) | |
| multi_init(testmulti); | |
| - | url = URL; |
| + | t1565_url = URL; |
| result = pthread_create(&tid, NULL, t1565_run_thread, NULL); | |
| if(!result) | |
| @@ -202,7 +202,7 @@ test_cleanup: | |
| } | |
| #else /* without pthread, this test doesn't work */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1565(char *URL) |
| { | |
| (void)URL; | |
| return CURLE_OK; | |
| @@ -27,7 +27,7 @@ | |
| #include <curl/multi.h> | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1567(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -26,7 +26,7 @@ | |
| #include "testtrace.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1568(char *URL) |
| { | |
| CURLcode ret; | |
| CURL *hnd; | |
| @@ -26,7 +26,7 @@ | |
| #include "testtrace.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1569(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *hnd; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1571(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -47,7 +47,7 @@ static int t1576_seek_callback(void *ptr, curl_off_t offset, int origin) | |
| return CURL_SEEKFUNC_OK; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1576(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -74,7 +74,7 @@ static int t1591_trailers_callback(struct curl_slist **list, void *userdata) | |
| } | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1591(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_FAILED_INIT; | |
| @@ -86,7 +86,6 @@ CURLcode test(char *URL) | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| @@ -41,7 +41,7 @@ | |
| #include <sys/stat.h> | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1592(char *URL) |
| { | |
| int stillRunning; | |
| CURLM *multiHandle = NULL; | |
| @@ -28,7 +28,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1593(char *URL) |
| { | |
| struct curl_slist *header = NULL; | |
| long unmet; | |
| @@ -28,7 +28,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1594(char *URL) |
| { | |
| struct curl_slist *header = NULL; | |
| curl_off_t retry; | |
| @@ -33,7 +33,7 @@ struct pair { | |
| CURLcode *exp; | |
| }; | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1597(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -52,7 +52,7 @@ static int t1598_trailers_callback(struct curl_slist **list, void *userdata) | |
| } | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1598(char *URL) |
| { | |
| static const char *post_data = "xxx=yyy&aaa=bbbbb"; | |
| @@ -66,7 +66,6 @@ CURLcode test(char *URL) | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | |
| curl = curl_easy_init(); | |
| if(!curl) { | |
| curl_mfprintf(stderr, "curl_easy_init() failed\n"); | |
| @@ -46,7 +46,7 @@ static size_t t1662_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; /* no more data left to deliver */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1662(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *hnd; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1900(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *hnd = NULL; | |
| @@ -49,7 +49,7 @@ static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1901(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -28,7 +28,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1903(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *ch = NULL; | |
| @@ -28,7 +28,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1905(char *URL) |
| { | |
| CURLSH *sh = NULL; | |
| CURL *ch = NULL; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1906(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| char *url_after = NULL; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1907(char *URL) |
| { | |
| char *url_after; | |
| CURL *curl; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1908(char *URL) |
| { | |
| CURLcode ret = CURLE_OK; | |
| CURL *hnd; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1910(char *URL) |
| { | |
| CURLcode ret = CURLE_OK; | |
| CURL *hnd; | |
| @@ -31,7 +31,7 @@ | |
| define not publicly exposed so we set our own */ | |
| #define MAX_INPUT_LENGTH 8000000 | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1911(char *URL) |
| { | |
| static char testbuf[MAX_INPUT_LENGTH + 2]; | |
| @@ -31,7 +31,7 @@ | |
| curl_mfprintf(stderr, "Type mismatch for CURLOPT_%s (expected %s)\n", \ | |
| name, exp); | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1912(char *URL) |
| { | |
| /* Only test if GCC typechecking is available */ | |
| int error = 0; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1913(char *URL) |
| { | |
| CURLcode ret = CURLE_OK; | |
| CURL *hnd; | |
| @@ -97,7 +97,7 @@ static CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *e, | |
| * Read/write HSTS cache entries via callback. | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1915(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *hnd; | |
| @@ -26,7 +26,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1916(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1918(char *URL) |
| { | |
| const struct curl_easyoption *o; | |
| (void)URL; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1919(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1933(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1934(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1935(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1936(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -21,12 +21,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1937(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -21,12 +21,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1938(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -21,12 +21,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1939(char *URL) |
| { | |
| CURLM *multi; | |
| CURL *easy; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| @@ -78,7 +77,7 @@ static void t1940_showem(CURL *easy, int header_request, unsigned int type) | |
| } | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1940(char *URL) |
| { | |
| CURL *easy = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| @@ -46,7 +45,8 @@ static size_t t1945_write_cb(char *data, size_t n, size_t l, void *userp) | |
| (void)userp; | |
| return n*l; | |
| } | |
| - | CURLcode test(char *URL) |
| + | |
| + | static CURLcode test_lib1945(char *URL) |
| { | |
| CURL *easy; | |
| CURLcode res = CURLE_OK; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "memdebug.h" | |
| @@ -33,7 +32,8 @@ static size_t t1947_write_cb(char *data, size_t n, size_t l, void *userp) | |
| (void)userp; | |
| return n*l; | |
| } | |
| - | CURLcode test(char *URL) |
| + | |
| + | static CURLcode test_lib1947(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| typedef struct | |
| @@ -41,7 +40,7 @@ static size_t put_callback(char *ptr, size_t size, size_t nmemb, void *stream) | |
| return tocopy; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1948(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1955(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1956(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1957(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1958(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1959(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -75,7 +75,7 @@ static int sockopt_cb(void *clientp, | |
| /* Expected args: URL IP PORT */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1960(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -147,7 +147,7 @@ test_cleanup: | |
| return res; | |
| } | |
| #else | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1960(char *URL) |
| { | |
| (void)URL; | |
| curl_mprintf("lacks inet_pton\n"); | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1964(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1970(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -34,7 +34,7 @@ static size_t t1971_read_cb(char *ptr, size_t size, size_t nitems, void *userp) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1971(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1972(char *URL) |
| { | |
| CURL *curl; | |
| curl_mime *mime = NULL; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1973(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1974(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -34,7 +34,7 @@ static size_t t1975_read_cb(char *ptr, size_t size, size_t nitems, void *userp) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1975(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1977(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURLU *curlu = curl_url(); | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1978(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -42,7 +42,7 @@ static CURLcode send_request(CURL *curl, const char *url, int seq, | |
| curl_msnprintf(full_url, len, "%s%04d", url, seq); | |
| curl_mfprintf(stderr, "Sending new request %d to %s with credential %s " | |
| - | "(auth %ld)\n", seq, full_url, userpwd, auth_scheme); |
| + | "(auth %ld)\n", seq, full_url, userpwd, auth_scheme); |
| test_setopt(curl, CURLOPT_URL, full_url); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| test_setopt(curl, CURLOPT_HEADER, 1L); | |
| @@ -82,7 +82,7 @@ static long parse_auth_name(const char *arg) | |
| return CURLAUTH_NONE; | |
| } | |
| - | CURLcode test(char *url) |
| + | static CURLcode test_lib2023(char *URL) /* libauthretry */ |
| { | |
| CURLcode res; | |
| CURL *curl = NULL; | |
| @@ -110,11 +110,11 @@ CURLcode test(char *url) | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = send_wrong_password(curl, url, 100, main_auth_scheme); |
| + | res = send_wrong_password(curl, URL, 100, main_auth_scheme); |
| if(res != CURLE_OK) | |
| goto test_cleanup; | |
| - | res = send_right_password(curl, url, 200, fallback_auth_scheme); |
| + | res = send_right_password(curl, URL, 200, fallback_auth_scheme); |
| if(res != CURLE_OK) | |
| goto test_cleanup; | |
| @@ -128,15 +128,15 @@ CURLcode test(char *url) | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | res = send_wrong_password(curl, url, 300, main_auth_scheme); |
| + | res = send_wrong_password(curl, URL, 300, main_auth_scheme); |
| if(res != CURLE_OK) | |
| goto test_cleanup; | |
| - | res = send_wrong_password(curl, url, 400, fallback_auth_scheme); |
| + | res = send_wrong_password(curl, URL, 400, fallback_auth_scheme); |
| if(res != CURLE_OK) | |
| goto test_cleanup; | |
| - | res = send_right_password(curl, url, 500, fallback_auth_scheme); |
| + | res = send_right_password(curl, URL, 500, fallback_auth_scheme); |
| if(res != CURLE_OK) | |
| goto test_cleanup; | |
| @@ -53,8 +53,8 @@ static size_t callback(char *ptr, size_t size, size_t nmemb, void *data) | |
| if(CURLE_OK != code) { | |
| curl_mfprintf(stderr, "%s:%d curl_easy_getinfo() failed, " | |
| - | "with code %d (%s)\n", |
| - | __FILE__, __LINE__, (int)code, curl_easy_strerror(code)); |
| + | "with code %d (%s)\n", |
| + | __FILE__, __LINE__, (int)code, curl_easy_strerror(code)); |
| ntlmcb_res = TEST_ERR_MAJOR_BAD; | |
| return failure; | |
| } | |
| @@ -73,7 +73,7 @@ static size_t callback(char *ptr, size_t size, size_t nmemb, void *data) | |
| /* An easy handle with a socket different to previously | |
| tracked one, log and fail right away. Known bug #37. */ | |
| curl_mfprintf(stderr, "Handle %d started on socket %d and moved to %d\n", | |
| - | curlx_sztosi(idx), (int)ntlm_sockets[idx], (int)sock); |
| + | curlx_sztosi(idx), (int)ntlm_sockets[idx], (int)sock); |
| ntlmcb_res = TEST_ERR_MAJOR_BAD; | |
| return failure; | |
| } | |
| @@ -81,21 +81,21 @@ static size_t callback(char *ptr, size_t size, size_t nmemb, void *data) | |
| return size * nmemb; | |
| } | |
| - | enum HandleState { |
| - | ReadyForNewHandle, |
| - | NeedSocketForNewHandle, |
| - | NoMoreHandles |
| - | }; |
| - | |
| - | CURLcode test(char *url) |
| + | static CURLcode test_lib2032(char *URL) /* libntlmconnect */ |
| { | |
| + | enum HandleState { |
| + | ReadyForNewHandle, |
| + | NeedSocketForNewHandle, |
| + | NoMoreHandles |
| + | }; |
| + | |
| CURLcode res = CURLE_OK; | |
| CURLM *multi = NULL; | |
| int running; | |
| int i; | |
| int num_handles = 0; | |
| enum HandleState state = ReadyForNewHandle; | |
| - | size_t urllen = strlen(url) + 4 + 1; |
| + | size_t urllen = strlen(URL) + 4 + 1; |
| char *full_url = malloc(urllen); | |
| start_test_timing(); | |
| @@ -132,11 +132,11 @@ CURLcode test(char *url) | |
| easy_init(ntlm_easy[num_handles]); | |
| if(num_handles % 3 == 2) { | |
| - | curl_msnprintf(full_url, urllen, "%s0200", url); |
| + | curl_msnprintf(full_url, urllen, "%s0200", URL); |
| easy_setopt(ntlm_easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_NTLM); | |
| } | |
| else { | |
| - | curl_msnprintf(full_url, urllen, "%s0100", url); |
| + | curl_msnprintf(full_url, urllen, "%s0100", URL); |
| easy_setopt(ntlm_easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_BASIC); | |
| } | |
| easy_setopt(ntlm_easy[num_handles], CURLOPT_FRESH_CONNECT, 1L); | |
| @@ -159,7 +159,7 @@ CURLcode test(char *url) | |
| multi_perform(multi, &running); | |
| curl_mfprintf(stderr, "%s:%d running %d state %d\n", | |
| - | __FILE__, __LINE__, running, state); |
| + | __FILE__, __LINE__, running, state); |
| abort_on_test_timeout(); | |
| @@ -51,7 +51,7 @@ static int prereq_callback(void *clientp, | |
| return prereq_cb->prereq_retcode; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2082(char *URL) /* libprereq */ |
| { | |
| PRCS prereq_cb; | |
| CURLcode ret = CURLE_OK; | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| @@ -119,9 +118,11 @@ static size_t t2301_write_cb(char *b, size_t size, size_t nitems, void *p) | |
| curl_mfprintf(stderr, "returns error from callback\n"); | |
| return nitems; | |
| } | |
| + | #endif |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2301(char *URL) |
| { | |
| + | #ifndef CURL_DISABLE_WEBSOCKETS |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -148,8 +149,7 @@ CURLcode test(char *URL) | |
| } | |
| curl_global_cleanup(); | |
| return res; | |
| - | } |
| - | |
| - | #else /* no WebSockets */ |
| - | NO_SUPPORT_BUILT_IN |
| + | #else |
| + | NO_SUPPORT_BUILT_IN |
| #endif | |
| + | } |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| @@ -77,7 +76,6 @@ static size_t add_data(struct ws_data *wd, const char *buf, size_t blen, | |
| return blen; | |
| } | |
| - | |
| static size_t t2302_write_cb(char *buffer, size_t size, size_t nitems, void *p) | |
| { | |
| struct ws_data *ws_data = p; | |
| @@ -92,9 +90,11 @@ static size_t t2302_write_cb(char *buffer, size_t size, size_t nitems, void *p) | |
| curl_mfprintf(stderr, "returns error from callback\n"); | |
| return nitems; | |
| } | |
| + | #endif |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2302(char *URL) |
| { | |
| + | #ifndef CURL_DISABLE_WEBSOCKETS |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| struct ws_data ws_data; | |
| @@ -124,8 +124,7 @@ CURLcode test(char *URL) | |
| } | |
| curl_global_cleanup(); | |
| return res; | |
| - | } |
| - | |
| #else | |
| - | NO_SUPPORT_BUILT_IN |
| + | NO_SUPPORT_BUILT_IN |
| #endif | |
| + | } |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #ifndef CURL_DISABLE_WEBSOCKETS | |
| @@ -109,9 +108,11 @@ static void t2304_websocket(CURL *curl) | |
| } while(i++ < 10); | |
| t2304_websocket_close(curl); | |
| } | |
| + | #endif |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2304(char *URL) |
| { | |
| + | #ifndef CURL_DISABLE_WEBSOCKETS |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -135,8 +136,7 @@ CURLcode test(char *URL) | |
| } | |
| curl_global_cleanup(); | |
| return res; | |
| - | } |
| - | |
| #else | |
| - | NO_SUPPORT_BUILT_IN |
| + | NO_SUPPORT_BUILT_IN |
| #endif | |
| + | } |
| @@ -21,15 +21,10 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "testtrace.h" | |
| - | #include <curl/curl.h> |
| - | |
| - | #define URL2 libtest_arg2 |
| - | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2306(char *URL) |
| { | |
| /* first a fine GET response, then a bad one */ | |
| CURL *cl; | |
| @@ -45,7 +40,7 @@ CURLcode test(char *URL) | |
| goto test_cleanup; | |
| /* reuse handle, do a second transfer */ | |
| - | easy_setopt(cl, CURLOPT_URL, URL2); |
| + | easy_setopt(cl, CURLOPT_URL, libtest_arg2); |
| res = curl_easy_perform(cl); | |
| test_cleanup: | |
| @@ -21,12 +21,9 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "testtrace.h" | |
| - | #include <curl/curl.h> |
| - | |
| static size_t cb_curl(char *buffer, size_t size, size_t nmemb, void *userp) | |
| { | |
| (void)buffer; | |
| @@ -36,7 +33,7 @@ static size_t cb_curl(char *buffer, size_t size, size_t nmemb, void *userp) | |
| return CURL_WRITEFUNC_ERROR; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2308(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -21,12 +21,9 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "testtrace.h" | |
| - | #include <curl/curl.h> |
| - | |
| static size_t cb_ignore(char *buffer, size_t size, size_t nmemb, void *userp) | |
| { | |
| (void)buffer; | |
| @@ -36,7 +33,7 @@ static size_t cb_ignore(char *buffer, size_t size, size_t nmemb, void *userp) | |
| return CURL_WRITEFUNC_ERROR; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2309(char *URL) |
| { | |
| CURL *curl; | |
| CURL *curldupe; | |
| @@ -27,13 +27,13 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2402(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl[NUM_HANDLES] = {0}; | |
| int running; | |
| CURLM *m = NULL; | |
| - | int i; |
| + | size_t i; |
| char target_url[256]; | |
| char dnsentry[256]; | |
| struct curl_slist *slist = NULL; | |
| @@ -59,14 +59,14 @@ CURLcode test(char *URL) | |
| multi_setopt(m, CURLMOPT_MAXCONNECTS, 1L); | |
| - | /* get NUM_HANDLES easy handles */ |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | /* get each easy handle */ |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* get an easy handle */ | |
| easy_init(curl[i]); | |
| /* specify target */ | |
| curl_msnprintf(target_url, sizeof(target_url), | |
| "https://localhost:%s/path/2402%04i", | |
| - | port, i + 1); |
| + | port, (int)i + 1); |
| target_url[sizeof(target_url) - 1] = '\0'; | |
| easy_setopt(curl[i], CURLOPT_URL, target_url); | |
| /* go http2 */ | |
| @@ -86,7 +86,7 @@ CURLcode test(char *URL) | |
| curl_mfprintf(stderr, "Start at URL 0\n"); | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* add handle to multi */ | |
| multi_add_handle(m, curl[i]); | |
| @@ -124,7 +124,7 @@ test_cleanup: | |
| /* proper cleanup sequence - type PB */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| curl_multi_remove_handle(m, curl[i]); | |
| curl_easy_cleanup(curl[i]); | |
| } | |
| @@ -27,13 +27,13 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2404(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl[NUM_HANDLES] = {0}; | |
| int running; | |
| CURLM *m = NULL; | |
| - | int i; |
| + | size_t i; |
| char target_url[256]; | |
| char dnsentry[256]; | |
| struct curl_slist *slist = NULL; | |
| @@ -59,14 +59,14 @@ CURLcode test(char *URL) | |
| multi_setopt(m, CURLMOPT_MAXCONNECTS, 1L); | |
| - | /* get NUM_HANDLES easy handles */ |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | /* get each easy handle */ |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* get an easy handle */ | |
| easy_init(curl[i]); | |
| /* specify target */ | |
| curl_msnprintf(target_url, sizeof(target_url), | |
| "https://localhost:%s/path/2404%04i", | |
| - | port, i + 1); |
| + | port, (int)i + 1); |
| target_url[sizeof(target_url) - 1] = '\0'; | |
| easy_setopt(curl[i], CURLOPT_URL, target_url); | |
| /* go http2 */ | |
| @@ -83,12 +83,12 @@ CURLcode test(char *URL) | |
| easy_setopt(curl[i], CURLOPT_RESOLVE, slist); | |
| - | easy_setopt(curl[i], CURLOPT_STREAM_WEIGHT, (long)128 + i); |
| + | easy_setopt(curl[i], CURLOPT_STREAM_WEIGHT, (long)i + 128); |
| } | |
| curl_mfprintf(stderr, "Start at URL 0\n"); | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* add handle to multi */ | |
| multi_add_handle(m, curl[i]); | |
| @@ -126,7 +126,7 @@ test_cleanup: | |
| /* proper cleanup sequence - type PB */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| curl_multi_remove_handle(m, curl[i]); | |
| curl_easy_cleanup(curl[i]); | |
| } | |
| @@ -43,8 +43,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | |
| - | /* ---------------------------------------------------------------- */ |
| + | /* ---------------------------------------------------------------- */ |
| #define test_check(expected_fds) \ | |
| if(res != CURLE_OK) { \ | |
| @@ -63,7 +62,7 @@ | |
| test_check(expected_fds); \ | |
| } while(0) | |
| - | /* ---------------------------------------------------------------- */ |
| + | /* ---------------------------------------------------------------- */ |
| enum { | |
| TEST_USE_HTTP1 = 0, | |
| @@ -370,7 +369,7 @@ test_cleanup: | |
| return res; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2405(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| unsigned int fd_count = 0; | |
| @@ -28,13 +28,13 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2502(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl[NUM_HANDLES] = {0}; | |
| int running; | |
| CURLM *m = NULL; | |
| - | int i; |
| + | size_t i; |
| char target_url[256]; | |
| char dnsentry[256]; | |
| struct curl_slist *slist = NULL; | |
| @@ -60,14 +60,14 @@ CURLcode test(char *URL) | |
| multi_setopt(m, CURLMOPT_MAXCONNECTS, 1L); | |
| - | /* get NUM_HANDLES easy handles */ |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | /* get each easy handle */ |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* get an easy handle */ | |
| easy_init(curl[i]); | |
| /* specify target */ | |
| curl_msnprintf(target_url, sizeof(target_url), | |
| "https://localhost:%s/path/2502%04i", | |
| - | port, i + 1); |
| + | port, (int)i + 1); |
| target_url[sizeof(target_url) - 1] = '\0'; | |
| easy_setopt(curl[i], CURLOPT_URL, target_url); | |
| /* go http2 */ | |
| @@ -90,7 +90,7 @@ CURLcode test(char *URL) | |
| curl_mfprintf(stderr, "Start at URL 0\n"); | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| /* add handle to multi */ | |
| multi_add_handle(m, curl[i]); | |
| @@ -128,7 +128,7 @@ test_cleanup: | |
| /* proper cleanup sequence - type PB */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| curl_multi_remove_handle(m, curl[i]); | |
| curl_easy_cleanup(curl[i]); | |
| } | |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "testtrace.h" | |
| #include "memdebug.h" | |
| @@ -207,9 +206,11 @@ static CURLcode recv_frame(CURL *curl, bool *stop) | |
| return res; | |
| } | |
| + | #endif |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib2700(char *URL) |
| { | |
| + | #ifndef CURL_DISABLE_WEBSOCKETS |
| CURLcode res = CURLE_OK; | |
| bool stop = false; | |
| CURL *curl; | |
| @@ -247,8 +248,7 @@ test_cleanup: | |
| curl_easy_cleanup(curl); | |
| curl_global_cleanup(); | |
| return res; | |
| - | } |
| - | |
| #else | |
| - | NO_SUPPORT_BUILT_IN |
| + | NO_SUPPORT_BUILT_IN |
| #endif | |
| + | } |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3010(char *URL) |
| { | |
| CURLcode ret = CURLE_OK; | |
| CURL *curl = NULL; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3025(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -45,7 +45,7 @@ static unsigned int WINAPI t3026_run_thread(void *ptr) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3026(char *URL) |
| { | |
| #if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE) | |
| typedef HANDLE curl_win_thread_handle_t; | |
| @@ -115,7 +115,7 @@ static void *t3026_run_thread(void *ptr) | |
| return NULL; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3026(char *URL) |
| { | |
| CURLcode results[NUM_THREADS]; | |
| pthread_t tids[NUM_THREADS]; | |
| @@ -160,7 +160,7 @@ cleanup: | |
| } | |
| #else /* without pthread or Windows, this test doesn't work */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3026(char *URL) |
| { | |
| curl_version_info_data *ver; | |
| (void)URL; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3027(char *URL) |
| { | |
| CURLcode ret = CURLE_OK; | |
| CURL *hnd; | |
| @@ -24,7 +24,7 @@ | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3100(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -24,7 +24,7 @@ | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3101(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -89,7 +89,7 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream) | |
| return size * nmemb; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3102(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3103(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURLSH *share; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3104(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURLSH *share; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3105(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLM *multi = NULL; | |
| @@ -42,7 +42,7 @@ struct Ctx { | |
| const char *URL; | |
| CURLSH *share; | |
| CURLcode result; | |
| - | int thread_id; |
| + | size_t thread_id; |
| struct curl_slist *contents; | |
| }; | |
| @@ -144,10 +144,10 @@ static void t3207_test_unlock(CURL *handle, curl_lock_data data, void *useptr) | |
| static void execute(CURLSH *share, struct Ctx *ctx) | |
| { | |
| - | int i; |
| + | size_t i; |
| curl_mutex_t mutexes[CURL_LOCK_DATA_LAST - 1]; | |
| curl_thread_t thread[THREAD_SIZE]; | |
| - | for(i = 0; i < CURL_LOCK_DATA_LAST - 1; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(mutexes); i++) { |
| Curl_mutex_init(&mutexes[i]); | |
| } | |
| curl_share_setopt(share, CURLSHOPT_LOCKFUNC, t3207_test_lock); | |
| @@ -155,10 +155,10 @@ static void execute(CURLSH *share, struct Ctx *ctx) | |
| curl_share_setopt(share, CURLSHOPT_USERDATA, (void *)mutexes); | |
| curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION); | |
| - | for(i = 0; i < THREAD_SIZE; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(thread); i++) { |
| thread[i] = Curl_thread_create(test_thread, (void *)&ctx[i]); | |
| } | |
| - | for(i = 0; i < THREAD_SIZE; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(thread); i++) { |
| if(thread[i]) { | |
| Curl_thread_join(&thread[i]); | |
| Curl_thread_destroy(&thread[i]); | |
| @@ -166,7 +166,7 @@ static void execute(CURLSH *share, struct Ctx *ctx) | |
| } | |
| curl_share_setopt(share, CURLSHOPT_LOCKFUNC, NULL); | |
| curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, NULL); | |
| - | for(i = 0; i < CURL_LOCK_DATA_LAST - 1; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(mutexes); i++) { |
| Curl_mutex_destroy(&mutexes[i]); | |
| } | |
| } | |
| @@ -175,7 +175,7 @@ static void execute(CURLSH *share, struct Ctx *ctx) | |
| static void execute(CURLSH *share, struct Ctx *ctx) | |
| { | |
| - | int i; |
| + | size_t i; |
| (void) share; | |
| for(i = 0; i < THREAD_SIZE; i++) { | |
| test_thread((void *)&ctx[i]); | |
| @@ -184,10 +184,10 @@ static void execute(CURLSH *share, struct Ctx *ctx) | |
| #endif | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3207(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| - | int i; |
| + | size_t i; |
| CURLSH* share; | |
| struct Ctx ctx[THREAD_SIZE]; | |
| @@ -199,7 +199,7 @@ CURLcode test(char *URL) | |
| goto test_cleanup; | |
| } | |
| - | for(i = 0; i < THREAD_SIZE; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(ctx); i++) { |
| ctx[i].share = share; | |
| ctx[i].URL = URL; | |
| ctx[i].thread_id = i; | |
| @@ -209,7 +209,7 @@ CURLcode test(char *URL) | |
| execute(share, ctx); | |
| - | for(i = 0; i < THREAD_SIZE; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(ctx); i++) { |
| if(ctx[i].result) { | |
| res = ctx[i].result; | |
| } | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib3208(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLM *multi = NULL; | |
| @@ -52,7 +52,7 @@ static void setupcallbacks(CURL *curl) | |
| testcounter = 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib500(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib501(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -31,7 +31,7 @@ | |
| * Get a single URL without select(). | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib502(char *URL) |
| { | |
| CURL *c = NULL; | |
| CURLM *m = NULL; | |
| @@ -35,7 +35,7 @@ | |
| * auth info. | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib503(char *URL) |
| { | |
| CURL *c = NULL; | |
| CURLM *m = NULL; | |
| @@ -34,7 +34,7 @@ | |
| * Use multi interface to get document over proxy with bad port number. | |
| * This caused the interface to "hang" in libcurl 7.10.2. | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib504(char *URL) |
| { | |
| CURL *c = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -36,7 +36,7 @@ | |
| * Example based on source code provided by Erick Nuwendam. Thanks! | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib505(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -152,7 +152,7 @@ static void *t506_test_fire(void *ptr) | |
| if(code) { | |
| int i = 0; | |
| curl_mfprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n", | |
| - | tdata->url, i, (int)code); |
| + | tdata->url, i, (int)code); |
| } | |
| curl_mprintf("CLEANUP\n"); | |
| @@ -163,7 +163,7 @@ static void *t506_test_fire(void *ptr) | |
| } | |
| /* test function */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib506(char *URL) |
| { | |
| CURLcode res; | |
| CURLSHcode scode = CURLSHE_OK; | |
| @@ -364,7 +364,7 @@ test_cleanup: | |
| scode = curl_share_cleanup(share); | |
| if(scode != CURLSHE_OK) | |
| curl_mfprintf(stderr, "curl_share_cleanup failed, code errno %d\n", | |
| - | (int)scode); |
| + | (int)scode); |
| curl_mprintf("GLOBAL_CLEANUP\n"); | |
| curl_global_cleanup(); | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib507(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLM *multi = NULL; | |
| @@ -47,7 +47,7 @@ static size_t t508_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; /* no more data left to deliver */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib508(char *URL) |
| { | |
| static const char testdata[] = | |
| "this is what we post to the silly web server\n"; | |
| @@ -69,7 +69,7 @@ static void custom_free(void *ptr) | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib509(char *URL) |
| { | |
| unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | |
| 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7}; | |
| @@ -60,7 +60,7 @@ static size_t t510_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; /* no more data left to deliver */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib510(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib511(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -28,7 +28,7 @@ | |
| /* Test case code based on source in a bug report filed by James Bursa on | |
| 28 Apr 2004 */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib512(char *URL) |
| { | |
| CURLcode code; | |
| int rc = 99; | |
| @@ -34,7 +34,7 @@ static size_t t513_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return CURL_READFUNC_ABORT; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib513(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib514(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib515(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib516(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib517(char *URL) |
| { | |
| struct dcheck { | |
| const char *input; | |
| @@ -173,7 +173,7 @@ CURLcode test(char *URL) | |
| time_t out = curl_getdate(dates[i].input, NULL); | |
| if(out != dates[i].output) { | |
| curl_mprintf("WRONGLY %s => %ld (instead of %ld)\n", | |
| - | dates[i].input, (long)out, (long)dates[i].output); |
| + | dates[i].input, (long)out, (long)dates[i].output); |
| error++; | |
| } | |
| } | |
| @@ -402,7 +402,7 @@ static int t518_test_rlimit(int keep_open) | |
| 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); |
| + | strbuff1); |
| curl_mfprintf(stderr, "%s\n", t518_msgbuff); | |
| curl_msnprintf(strbuff, sizeof(strbuff), | |
| "fopen fails with lots of fds open"); | |
| @@ -426,7 +426,7 @@ static int t518_test_rlimit(int keep_open) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib518(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -478,7 +478,7 @@ test_cleanup: | |
| #else /* defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib518(char *URL) |
| { | |
| (void)URL; | |
| curl_mprintf("system lacks necessary system function(s)"); | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib519(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib520(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib521(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib523(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib524(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -29,7 +29,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib525(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| @@ -49,7 +49,7 @@ CURLcode test(char *URL) | |
| hd_src = fopen(libtest_arg2, "rb"); | |
| if(!hd_src) { | |
| curl_mfprintf(stderr, "fopen failed with error (%d) %s\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2); | |
| return TEST_ERR_FOPEN; | |
| } | |
| @@ -63,7 +63,7 @@ CURLcode test(char *URL) | |
| if(hd == -1) { | |
| /* can't open file, bail out */ | |
| curl_mfprintf(stderr, "fstat() failed with error (%d) %s\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2); | |
| fclose(hd_src); | |
| return TEST_ERR_FSTAT; | |
| @@ -48,24 +48,24 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib526(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl[NUM_HANDLES]; | |
| int running; | |
| CURLM *m = NULL; | |
| - | int current = 0; |
| - | int i; |
| + | size_t current = 0; |
| + | size_t i; |
| - | for(i = 0; i < NUM_HANDLES; i++) |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) |
| curl[i] = NULL; | |
| start_test_timing(); | |
| global_init(CURL_GLOBAL_ALL); | |
| - | /* get NUM_HANDLES easy handles */ |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | /* get each easy handle */ |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| easy_init(curl[i]); | |
| /* specify target */ | |
| easy_setopt(curl[i], CURLOPT_URL, URL); | |
| @@ -99,8 +99,8 @@ CURLcode test(char *URL) | |
| curl_easy_cleanup(curl[current]); | |
| curl[current] = NULL; | |
| } | |
| - | if(++current < NUM_HANDLES) { |
| - | curl_mfprintf(stderr, "Advancing to URL %d\n", current); |
| + | if(++current < CURL_ARRAYSIZE(curl)) { |
| + | curl_mfprintf(stderr, "Advancing to URL %d\n", (int)current); |
| if(testnum == 532) { | |
| /* first remove the only handle we use */ | |
| curl_multi_remove_handle(m, curl[0]); | |
| @@ -142,7 +142,7 @@ test_cleanup: | |
| if((testnum == 526) || (testnum == 528)) { | |
| /* proper cleanup sequence - type PB */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) { |
| curl_multi_remove_handle(m, curl[i]); | |
| curl_easy_cleanup(curl[i]); | |
| } | |
| @@ -156,7 +156,7 @@ test_cleanup: | |
| will be leaked, let's use undocumented cleanup sequence - type UB */ | |
| if(res != CURLE_OK) | |
| - | for(i = 0; i < NUM_HANDLES; i++) |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) |
| curl_easy_cleanup(curl[i]); | |
| curl_multi_cleanup(m); | |
| @@ -166,7 +166,7 @@ test_cleanup: | |
| else if(testnum == 532) { | |
| /* undocumented cleanup sequence - type UB */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) |
| + | for(i = 0; i < CURL_ARRAYSIZE(curl); i++) |
| curl_easy_cleanup(curl[i]); | |
| curl_multi_cleanup(m); | |
| curl_global_cleanup(); | |
| @@ -190,7 +190,7 @@ static int t530_checkForCompletion(CURLM *curl, int *success) | |
| } | |
| else { | |
| curl_mfprintf(stderr, "Got an unexpected message from curl: %i\n", | |
| - | message->msg); |
| + | message->msg); |
| result = 1; | |
| *success = 0; | |
| } | |
| @@ -240,7 +240,7 @@ static int socket_action(CURLM *curl, curl_socket_t s, int evBitmask, | |
| CURLMcode result = curl_multi_socket_action(curl, s, evBitmask, &numhandles); | |
| if(result != CURLM_OK) { | |
| curl_mfprintf(stderr, "Curl error on %s (%i) %s\n", | |
| - | info, result, curl_multi_strerror(result)); |
| + | info, result, curl_multi_strerror(result)); |
| } | |
| return (int)result; | |
| } | |
| @@ -376,7 +376,7 @@ test_cleanup: | |
| return res; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib530(char *URL) |
| { | |
| CURLcode rc; | |
| /* rerun the same transfer multiple times and make it fail in different | |
| @@ -31,7 +31,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib533(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| @@ -33,11 +33,11 @@ static void proxystat(CURL *curl) | |
| long wasproxy; | |
| if(!curl_easy_getinfo(curl, CURLINFO_USED_PROXY, &wasproxy)) { | |
| curl_mprintf("This %sthe proxy\n", wasproxy ? "used ": | |
| - | "DID NOT use "); |
| + | "DID NOT use "); |
| } | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib536(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl; | |
| @@ -440,7 +440,7 @@ static int t537_test_rlimit(int keep_open) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib537(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -492,7 +492,7 @@ test_cleanup: | |
| #else /* defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib537(char *URL) |
| { | |
| (void)URL; | |
| curl_mprintf("system lacks necessary system function(s)"); | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib539(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -42,10 +42,7 @@ | |
| #define PROXYUSERPWD libtest_arg3 | |
| #define HOST test_argv[4] | |
| - | #undef NUM_HANDLES |
| - | #define NUM_HANDLES 2 |
| - | |
| - | static CURL *testeh[NUM_HANDLES]; |
| + | static CURL *testeh[2]; |
| static CURLcode init(int num, CURLM *cm, const char *url, const char *userpwd, | |
| struct curl_slist *headers) | |
| @@ -166,13 +163,13 @@ static CURLcode loop(int num, CURLM *cm, const char *url, const char *userpwd, | |
| if(!msg) | |
| break; | |
| if(msg->msg == CURLMSG_DONE) { | |
| - | int i; |
| + | size_t i; |
| CURL *e = msg->easy_handle; | |
| curl_mfprintf(stderr, "R: %d - %s\n", (int)msg->data.result, | |
| - | curl_easy_strerror(msg->data.result)); |
| + | curl_easy_strerror(msg->data.result)); |
| curl_multi_remove_handle(cm, e); | |
| curl_easy_cleanup(e); | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(testeh); i++) { |
| if(testeh[i] == e) { | |
| testeh[i] = NULL; | |
| break; | |
| @@ -191,15 +188,15 @@ static CURLcode loop(int num, CURLM *cm, const char *url, const char *userpwd, | |
| return CURLE_OK; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib540(char *URL) |
| { | |
| CURLM *cm = NULL; | |
| struct curl_slist *headers = NULL; | |
| char buffer[246]; /* naively fixed-size */ | |
| CURLcode res = CURLE_OK; | |
| - | int i; |
| + | size_t i; |
| - | for(i = 0; i < NUM_HANDLES; i++) |
| + | for(i = 0; i < CURL_ARRAYSIZE(testeh); i++) |
| testeh[i] = NULL; | |
| start_test_timing(); | |
| @@ -241,7 +238,7 @@ test_cleanup: | |
| /* proper cleanup sequence - type PB */ | |
| - | for(i = 0; i < NUM_HANDLES; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(testeh); i++) { |
| curl_multi_remove_handle(cm, testeh[i]); | |
| curl_easy_cleanup(testeh[i]); | |
| } | |
| @@ -33,7 +33,7 @@ | |
| * Two FTP uploads, the second with no content sent. | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib541(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -49,7 +49,7 @@ CURLcode test(char *URL) | |
| hd_src = fopen(libtest_arg2, "rb"); | |
| if(!hd_src) { | |
| curl_mfprintf(stderr, "fopen failed with error (%d) %s\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2); | |
| return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */ | |
| } | |
| @@ -63,7 +63,7 @@ CURLcode test(char *URL) | |
| if(hd == -1) { | |
| /* can't open file, bail out */ | |
| curl_mfprintf(stderr, "fstat() failed with error (%d) %s\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2); | |
| fclose(hd_src); | |
| return TEST_ERR_MAJOR_BAD; | |
| @@ -33,7 +33,7 @@ | |
| * FTP get with NOBODY but no HEADER | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib542(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -27,7 +27,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib543(char *URL) |
| { | |
| static const unsigned char a[] = { | |
| 0x9c, 0x26, 0x4b, 0x3d, 0x49, 0x4, 0xa1, 0x1, | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib544(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -63,7 +63,7 @@ static curlioerr t547_ioctl_callback(CURL *handle, int cmd, void *clientp) | |
| return CURLIOE_OK; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib547(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -30,7 +30,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib549(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -158,7 +158,7 @@ static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp) | |
| return CURLIOE_UNKNOWNCMD; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib552(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -55,7 +55,7 @@ static size_t myreadfunc(char *ptr, size_t size, size_t nmemb, void *stream) | |
| #define NUM_HEADERS 8 | |
| #define SIZE_HEADERS 5000 | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib553(char *URL) |
| { | |
| static char testbuf[SIZE_HEADERS + 100]; | |
| @@ -192,7 +192,7 @@ test_cleanup: | |
| return res; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib554(char *URL) |
| { | |
| CURLcode res; | |
| @@ -68,7 +68,7 @@ static curlioerr t555_ioctl_callback(CURL *handle, int cmd, void *clientp) | |
| return CURLIOE_OK; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib555(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| @@ -26,7 +26,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib556(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -85,7 +85,7 @@ again: | |
| if((size_t)write(STDOUT_FILENO, buf, nread) != nread) { | |
| #endif | |
| curl_mfprintf(stderr, "write() failed: errno %d (%s)\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| res = TEST_ERR_FAILURE; | |
| break; | |
| } | |
| @@ -148,8 +148,8 @@ static int test_unsigned_short_formatting(void) | |
| (void)curl_msprintf(us_test[i].result, "%hu", us_test[i].num); | |
| if(memcmp(us_test[i].result, | |
| - | us_test[i].expected, |
| - | strlen(us_test[i].expected))) { |
| + | us_test[i].expected, |
| + | strlen(us_test[i].expected))) { |
| curl_mprintf("unsigned short test #%.2d: Failed " | |
| "(Expected: %s Got: %s)\n", | |
| i, us_test[i].expected, us_test[i].result); | |
| @@ -226,7 +226,7 @@ static int test_signed_short_formatting(void) | |
| ss_test[i].expected, | |
| strlen(ss_test[i].expected))) { | |
| curl_mprintf("signed short test #%.2d: Failed (Expected: %s Got: %s)\n", | |
| - | i, ss_test[i].expected, ss_test[i].result); |
| + | i, ss_test[i].expected, ss_test[i].result); |
| failed++; | |
| } | |
| @@ -373,10 +373,10 @@ static int test_unsigned_int_formatting(void) | |
| (void)curl_msprintf(ui_test[i].result, "%u", ui_test[i].num); | |
| if(memcmp(ui_test[i].result, | |
| - | ui_test[i].expected, |
| - | strlen(ui_test[i].expected))) { |
| + | ui_test[i].expected, |
| + | strlen(ui_test[i].expected))) { |
| curl_mprintf("unsigned int test #%.2d: Failed (Expected: %s Got: %s)\n", | |
| - | i, ui_test[i].expected, ui_test[i].result); |
| + | i, ui_test[i].expected, ui_test[i].result); |
| failed++; | |
| } | |
| @@ -604,7 +604,7 @@ static int test_signed_int_formatting(void) | |
| si_test[i].expected, | |
| strlen(si_test[i].expected))) { | |
| curl_mprintf("signed int test #%.2d: Failed (Expected: %s Got: %s)\n", | |
| - | i, si_test[i].expected, si_test[i].result); |
| + | i, si_test[i].expected, si_test[i].result); |
| failed++; | |
| } | |
| @@ -750,10 +750,10 @@ static int test_unsigned_long_formatting(void) | |
| (void)curl_msprintf(ul_test[i].result, "%lu", ul_test[i].num); | |
| if(memcmp(ul_test[i].result, | |
| - | ul_test[i].expected, |
| - | strlen(ul_test[i].expected))) { |
| + | ul_test[i].expected, |
| + | strlen(ul_test[i].expected))) { |
| curl_mprintf("unsigned long test #%.2d: Failed (Expected: %s Got: %s)\n", | |
| - | i, ul_test[i].expected, ul_test[i].result); |
| + | i, ul_test[i].expected, ul_test[i].result); |
| failed++; | |
| } | |
| @@ -981,7 +981,7 @@ static int test_signed_long_formatting(void) | |
| sl_test[i].expected, | |
| strlen(sl_test[i].expected))) { | |
| curl_mprintf("signed long test #%.2d: Failed (Expected: %s Got: %s)\n", | |
| - | i, sl_test[i].expected, sl_test[i].result); |
| + | i, sl_test[i].expected, sl_test[i].result); |
| failed++; | |
| } | |
| @@ -1096,7 +1096,7 @@ static int test_curl_off_t_formatting(void) | |
| co_test[i].expected, | |
| strlen(co_test[i].expected))) { | |
| curl_mprintf("curl_off_t test #%.2d: Failed (Expected: %s Got: %s)\n", | |
| - | i, co_test[i].expected, co_test[i].result); |
| + | i, co_test[i].expected, co_test[i].result); |
| failed++; | |
| } | |
| @@ -1115,7 +1115,7 @@ static int _string_check(int linenumber, char *buf, const char *buf2) | |
| if(strcmp(buf, buf2)) { | |
| /* they shouldn't differ */ | |
| curl_mprintf("sprintf line %d failed:\nwe '%s'\nsystem: '%s'\n", | |
| - | linenumber, buf, buf2); |
| + | linenumber, buf, buf2); |
| return 1; | |
| } | |
| return 0; | |
| @@ -1128,7 +1128,7 @@ static int _strlen_check(int linenumber, char *buf, size_t len) | |
| if(len != buflen) { | |
| /* they shouldn't differ */ | |
| curl_mprintf("sprintf strlen:%d failed:\nwe '%zu'\nsystem: '%zu'\n", | |
| - | linenumber, buflen, len); |
| + | linenumber, buflen, len); |
| return 1; | |
| } | |
| return 0; | |
| @@ -1541,7 +1541,7 @@ static int test_return_codes(void) | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib557(char *URL) |
| { | |
| int errors = 0; | |
| (void)URL; /* not used */ | |
| @@ -1555,29 +1555,17 @@ CURLcode test(char *URL) | |
| #endif | |
| errors += test_pos_arguments(); | |
| - | |
| errors += test_weird_arguments(); | |
| - | |
| errors += test_unsigned_short_formatting(); | |
| - | |
| errors += test_signed_short_formatting(); | |
| - | |
| errors += test_unsigned_int_formatting(); | |
| - | |
| errors += test_signed_int_formatting(); | |
| - | |
| errors += test_unsigned_long_formatting(); | |
| - | |
| errors += test_signed_long_formatting(); | |
| - | |
| errors += test_curl_off_t_formatting(); | |
| - | |
| errors += test_string_formatting(); | |
| - | |
| errors += test_float_formatting(); | |
| - | |
| errors += test_oct_hex_formatting(); | |
| - | |
| errors += test_return_codes(); | |
| if(errors) | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib558(char *URL) |
| { | |
| unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | |
| 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7}; | |
| @@ -26,7 +26,7 @@ | |
| #include "testtrace.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib559(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -37,7 +37,7 @@ | |
| * fast/different compared to the real/distant servers we saw the bug happen | |
| * with. | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib560(char *URL) |
| { | |
| CURL *http_handle = NULL; | |
| CURLM *multi_handle = NULL; | |
| @@ -37,7 +37,7 @@ | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib562(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -29,7 +29,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib564(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib566(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -28,7 +28,7 @@ | |
| /* | |
| * Test a simple OPTIONS request with a custom header | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib567(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -36,7 +36,7 @@ | |
| /* | |
| * Test the Client->Server ANNOUNCE functionality (PUT style) | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib568(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -29,7 +29,7 @@ | |
| /* | |
| * Test Session ID capture | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib569(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -68,7 +68,7 @@ CURLcode test(char *URL) | |
| res = curl_easy_perform(curl); | |
| if(res != (int)CURLE_BAD_FUNCTION_ARGUMENT) { | |
| curl_mfprintf(stderr, "This should have failed. " | |
| - | "Cannot setup without a Transport: header"); |
| + | "Cannot setup without a Transport: header"); |
| res = TEST_ERR_MAJOR_BAD; | |
| goto test_cleanup; | |
| } | |
| @@ -26,7 +26,7 @@ | |
| #include "testutil.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib570(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -85,7 +85,7 @@ static size_t rtp_write(char *ptr, size_t size, size_t nmemb, void *stream) | |
| else { | |
| if(memcmp(RTP_DATA, data + i, message_size - i) != 0) { | |
| curl_mprintf("RTP PAYLOAD END CORRUPTED (%d), [%s]\n", | |
| - | message_size - i, data + i); |
| + | message_size - i, data + i); |
| /* return failure; */ | |
| } | |
| } | |
| @@ -97,7 +97,7 @@ static size_t rtp_write(char *ptr, size_t size, size_t nmemb, void *stream) | |
| return size * nmemb; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib571(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -36,7 +36,7 @@ | |
| /* | |
| * Test GET_PARAMETER: PUT, HEARTBEAT, and POST | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib572(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -59,7 +59,6 @@ CURLcode test(char *URL) | |
| return TEST_ERR_MAJOR_BAD; | |
| } | |
| - | |
| test_setopt(curl, CURLOPT_HEADERDATA, stdout); | |
| test_setopt(curl, CURLOPT_WRITEDATA, stdout); | |
| test_setopt(curl, CURLOPT_VERBOSE, 1L); | |
| @@ -32,7 +32,7 @@ | |
| * Get a single URL without select(). | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib573(char *URL) |
| { | |
| CURL *c = NULL; | |
| CURLM *m = NULL; | |
| @@ -96,7 +96,7 @@ CURLcode test(char *URL) | |
| curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time); | |
| if(connect_time < dbl_epsilon) { | |
| curl_mfprintf(stderr, "connect time %e is < epsilon %e\n", | |
| - | connect_time, dbl_epsilon); |
| + | connect_time, dbl_epsilon); |
| res = TEST_ERR_MAJOR_BAD; | |
| } | |
| @@ -30,11 +30,11 @@ static int new_fnmatch(void *ptr, | |
| { | |
| (void)ptr; | |
| curl_mfprintf(stderr, "lib574: match string '%s' against pattern '%s'\n", | |
| - | string, pattern); |
| + | string, pattern); |
| return CURL_FNMATCHFUNC_MATCH; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib574(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -35,7 +35,7 @@ | |
| * 3. with multi interface | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib575(char *URL) |
| { | |
| CURL *handle = NULL; | |
| CURL *duphandle = NULL; | |
| @@ -73,7 +73,8 @@ static long chunk_bgn(const void *f, void *ptr, int remains) | |
| if(finfo->filetype == CURLFILETYPE_FILE) { | |
| ch_d->print_content = 1; | |
| curl_mprintf("Content:\n" | |
| - | "-------------------------------------------------------------\n"); |
| + | "-------------------------------------------" |
| + | "------------------\n"); |
| } | |
| if(strcmp(finfo->filename, "someothertext.txt") == 0) { | |
| curl_mprintf("# THIS CONTENT WAS SKIPPED IN CHUNK_BGN CALLBACK #\n"); | |
| @@ -96,7 +97,7 @@ static long chunk_end(void *ptr) | |
| return CURL_CHUNK_END_FUNC_OK; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib576(char *URL) |
| { | |
| CURL *handle = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -50,7 +50,7 @@ static int t578_progress_callback(void *clientp, double dltotal, double dlnow, | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib578(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -37,7 +37,7 @@ static void progress_final_report(void) | |
| { | |
| FILE *moo = fopen(libtest_arg2, "ab"); | |
| curl_mfprintf(moo ? moo : stderr, "Progress: end UL %zu/%zu\n", | |
| - | last_ul, last_ul_total); |
| + | last_ul, last_ul_total); |
| if(moo) | |
| fclose(moo); | |
| else | |
| @@ -100,7 +100,7 @@ static size_t t579_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; /* no more data left to deliver */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib579(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -157,7 +157,7 @@ static int t582_checkForCompletion(CURLM *curl, int *success) | |
| } | |
| else { | |
| curl_mfprintf(stderr, "Got an unexpected message from curl: %i\n", | |
| - | (int)message->msg); |
| + | (int)message->msg); |
| result = 1; | |
| *success = 0; | |
| } | |
| @@ -207,7 +207,7 @@ static void notifyCurl(CURLM *curl, curl_socket_t s, int evBitmask, | |
| CURLMcode result = curl_multi_socket_action(curl, s, evBitmask, &numhandles); | |
| if(result != CURLM_OK) { | |
| curl_mfprintf(stderr, "Curl error on %s (%i) %s\n", | |
| - | info, result, curl_multi_strerror(result)); |
| + | info, result, curl_multi_strerror(result)); |
| } | |
| } | |
| @@ -225,7 +225,7 @@ static void t582_checkFdSet(CURLM *curl, struct t582_Sockets *sockets, | |
| } | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib582(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURL *curl = NULL; | |
| @@ -250,7 +250,7 @@ CURLcode test(char *URL) | |
| hd_src = fopen(libtest_arg2, "rb"); | |
| if(!hd_src) { | |
| curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2); | |
| return TEST_ERR_FOPEN; | |
| } | |
| @@ -264,7 +264,7 @@ CURLcode test(char *URL) | |
| if(hd == -1) { | |
| /* can't open file, bail out */ | |
| curl_mfprintf(stderr, "fstat() failed with error (%d) %s\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2); | |
| fclose(hd_src); | |
| return TEST_ERR_FSTAT; | |
| @@ -32,7 +32,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib583(char *URL) |
| { | |
| int stillRunning; | |
| CURLM *multiHandle = NULL; | |
| @@ -73,7 +73,7 @@ CURLcode test(char *URL) | |
| mres = curl_multi_remove_handle(multiHandle, curl); | |
| if(mres) { | |
| curl_mfprintf(stderr, "curl_multi_remove_handle() failed, " | |
| - | "with code %d\n", (int)mres); |
| + | "with code %d\n", (int)mres); |
| res = TEST_ERR_MULTI; | |
| } | |
| else | |
| @@ -119,7 +119,7 @@ static void *t586_test_fire(void *ptr) | |
| if(code != CURLE_OK) { | |
| int i = 0; | |
| curl_mfprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n", | |
| - | tdata->url, i, (int)code); |
| + | tdata->url, i, (int)code); |
| } | |
| curl_mprintf("CLEANUP\n"); | |
| @@ -129,7 +129,7 @@ static void *t586_test_fire(void *ptr) | |
| } | |
| /* test function */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib586(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| CURLSHcode scode = CURLSHE_OK; | |
| @@ -237,7 +237,7 @@ test_cleanup: | |
| scode = curl_share_cleanup(share); | |
| if(scode != CURLSHE_OK) | |
| curl_mfprintf(stderr, "curl_share_cleanup failed, code errno %d\n", | |
| - | (int)scode); |
| + | (int)scode); |
| curl_mprintf("GLOBAL_CLEANUP\n"); | |
| curl_global_cleanup(); | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib589(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -38,7 +38,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib590(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -33,7 +33,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib591(char *URL) |
| { | |
| CURL *easy = NULL; | |
| CURLM *multi = NULL; | |
| @@ -48,7 +48,7 @@ CURLcode test(char *URL) | |
| upload = fopen(libtest_arg3, "rb"); | |
| if(!upload) { | |
| curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n", | |
| - | errno, strerror(errno)); |
| + | errno, strerror(errno)); |
| curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg3); | |
| return TEST_ERR_FOPEN; | |
| } | |
| @@ -38,7 +38,7 @@ | |
| * with function curl_multi_info_read(). | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib597(char *URL) |
| { | |
| CURL *easy = NULL; | |
| CURLM *multi = NULL; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib598(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -41,7 +41,7 @@ static int t599_progress_callback(void *clientp, double dltotal, | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib599(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -247,7 +247,7 @@ static CURLcode t643_cyclic_add(void) | |
| return CURLE_OK; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib643(char *URL) |
| { | |
| CURLcode res; | |
| @@ -39,8 +39,7 @@ static size_t count_chars(void *userp, const char *buf, size_t len) | |
| return len; | |
| } | |
| - | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib650(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURLcode res = TEST_ERR_MAJOR_BAD; | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib651(char *URL) |
| { | |
| static char testbuf[17000]; /* more than 16K */ | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib652(char *URL) |
| { | |
| static char testbuf[17000]; /* more than 16K */ | |
| @@ -27,8 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib653(char *URL) |
| { | |
| CURL *curls = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -59,7 +59,7 @@ static size_t t654_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; /* no more data left to deliver */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib654(char *URL) |
| { | |
| static const char testdata[] = "dummy\n"; | |
| @@ -151,7 +151,7 @@ CURLcode test(char *URL) | |
| if(pooh.freecount != 2) { | |
| curl_mfprintf(stderr, "free_callback() called %d times instead of 2\n", | |
| - | pooh.freecount); |
| + | pooh.freecount); |
| res = TEST_ERR_FAILURE; | |
| goto test_cleanup; | |
| } | |
| @@ -58,7 +58,7 @@ static int resolver_alloc_cb_pass(void *resolver_state, void *reserved, | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib655(char *URL) |
| { | |
| CURL *curl; | |
| CURLcode res = CURLE_OK; | |
| @@ -31,7 +31,7 @@ | |
| * Get a single URL without select(). | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib658(char *URL) |
| { | |
| CURL *handle = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -51,7 +51,7 @@ CURLcode test(char *URL) | |
| uc = curl_url_set(urlp, CURLUPART_URL, URL, 0); | |
| if(uc) { | |
| curl_mfprintf(stderr, "problem setting CURLUPART_URL: %s.", | |
| - | curl_url_strerror(uc)); |
| + | curl_url_strerror(uc)); |
| goto test_cleanup; | |
| } | |
| @@ -31,7 +31,7 @@ | |
| * Get a single URL without select(). | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib659(char *URL) |
| { | |
| CURL *handle = NULL; | |
| CURLcode res = CURLE_OK; | |
| @@ -24,7 +24,7 @@ | |
| #include "test.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib661(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl = NULL; | |
| @@ -154,7 +154,6 @@ CURLcode test(char *URL) | |
| test_setopt(curl, CURLOPT_QUOTE, slist); | |
| res = curl_easy_perform(curl); | |
| - | |
| test_cleanup: | |
| if(res) | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib666(char *URL) |
| { | |
| static char testbuf[17000]; /* more than 16K */ | |
| @@ -51,7 +51,7 @@ static size_t t667_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return 0; /* no more data left to deliver */ | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib667(char *URL) |
| { | |
| static const char testdata[] = "dummy"; | |
| @@ -46,7 +46,7 @@ static size_t t668_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) | |
| return len; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib668(char *URL) |
| { | |
| static const char testdata[] = "dummy"; | |
| @@ -87,7 +87,7 @@ static int t670_xferinfo(void *clientp, | |
| return 0; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib670(char *URL) |
| { | |
| static const char testname[] = "field"; | |
| @@ -31,7 +31,7 @@ | |
| * Get a single URL without select(). | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib674(char *URL) |
| { | |
| CURL *handle = NULL; | |
| CURL *handle2; | |
| @@ -52,13 +52,12 @@ CURLcode test(char *URL) | |
| uc = curl_url_set(urlp, CURLUPART_URL, URL, 0); | |
| if(uc) { | |
| curl_mfprintf(stderr, "problem setting CURLUPART_URL: %s.", | |
| - | curl_url_strerror(uc)); |
| + | curl_url_strerror(uc)); |
| goto test_cleanup; | |
| } | |
| /* demonstrate override behavior */ | |
| - | |
| easy_setopt(handle, CURLOPT_CURLU, urlp); | |
| easy_setopt(handle, CURLOPT_VERBOSE, 1L); | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib676(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -27,7 +27,7 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib677(char *URL) |
| { | |
| static const char testcmd[] = "A1 IDLE\r\n"; | |
| static char testbuf[1024]; | |
| @@ -89,7 +89,7 @@ CURLcode test(char *URL) | |
| } | |
| else if(ec) { | |
| curl_mfprintf(stderr, "curl_easy_send() failed, with code %d (%s)\n", | |
| - | (int)ec, curl_easy_strerror(ec)); |
| + | (int)ec, curl_easy_strerror(ec)); |
| res = ec; | |
| goto test_cleanup; | |
| } | |
| @@ -110,7 +110,7 @@ CURLcode test(char *URL) | |
| } | |
| else if(ec) { | |
| curl_mfprintf(stderr, "curl_easy_recv() failed, with code %d (%s)\n", | |
| - | (int)ec, curl_easy_strerror(ec)); |
| + | (int)ec, curl_easy_strerror(ec)); |
| res = ec; | |
| goto test_cleanup; | |
| } | |
| @@ -97,7 +97,7 @@ static CURLcode test_cert_blob(const char *url, const char *cafile) | |
| return code; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib678(char *URL) |
| { | |
| CURLcode res = CURLE_OK; | |
| curl_global_init(CURL_GLOBAL_DEFAULT); | |
| @@ -25,7 +25,7 @@ | |
| #include "memdebug.h" | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib694(char *URL) |
| { | |
| CURLcode res; | |
| CURL *curl; | |
| @@ -25,7 +25,6 @@ | |
| #include "memdebug.h" | |
| - | |
| /* write callback that does nothing */ | |
| static size_t write_it(char *ptr, size_t size, size_t nmemb, void *userdata) | |
| { | |
| @@ -34,7 +33,7 @@ static size_t write_it(char *ptr, size_t size, size_t nmemb, void *userdata) | |
| return size * nmemb; | |
| } | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib695(char *URL) |
| { | |
| CURL *curl = NULL; | |
| curl_mime *mime1 = NULL; | |
| @@ -78,7 +77,7 @@ CURLcode test(char *URL) | |
| /* Check for errors */ | |
| if(res != CURLE_OK) | |
| curl_mfprintf(stderr, "curl_easy_perform() 1 failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(res)); |
| else { | |
| /* phase two, create a mime struct using the mime1 handle */ | |
| mime2 = curl_mime_init(curl); | |
| @@ -92,7 +91,7 @@ CURLcode test(char *URL) | |
| if(res != CURLE_OK) | |
| curl_mfprintf(stderr, "curl_mime_subparts() failed: %sn", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(res)); |
| else { | |
| mime1 = NULL; | |
| @@ -102,7 +101,7 @@ CURLcode test(char *URL) | |
| /* Check for errors */ | |
| if(res != CURLE_OK) | |
| curl_mfprintf(stderr, "curl_easy_perform() 2 failed: %s\n", | |
| - | curl_easy_strerror(res)); |
| + | curl_easy_strerror(res)); |
| } | |
| } | |
| @@ -27,13 +27,11 @@ | |
| #include "warnless.h" | |
| #include "memdebug.h" | |
| - | #define TEST_HANG_TIMEOUT 60 * 1000 |
| - | |
| /* | |
| * Get a single URL without select(). | |
| */ | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib751(char *URL) |
| { | |
| CURL *easies[1000]; | |
| CURLM *m; | |
| @@ -325,7 +325,7 @@ static bool bad_long(CURLcode res, int check) | |
| non-existing function return code back */ | |
| #define present(x) ((x != CURLE_NOT_BUILT_IN) && (x != CURLE_UNKNOWN_OPTION)) | |
| - | CURLcode test(char *URL) |
| + | static CURLcode test_lib1521(char *URL) |
| { | |
| CURL *curl = NULL; | |
| CURL *dep = NULL; | |
| @@ -29,9 +29,6 @@ | |
| need both of them in the include path), so that we get good in-depth | |
| knowledge about the system we're building this on */ | |
| - | #define CURL_NO_OLDIES |
| - | #define CURL_DISABLE_DEPRECATION 1 |
| - | |
| #include "curl_setup.h" | |
| #include <curl/curl.h> | |
| @@ -79,11 +76,6 @@ extern int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc, | |
| extern void wait_ms(int ms); /* wait this many milliseconds */ | |
| - | #ifndef CURLTESTS_BUNDLED_TEST_H |
| - | extern CURLcode test(char *URL); /* the actual test function provided by each |
| - | individual libXXX.c file */ |
| - | #endif |
| - | |
| extern char *hexdump(const unsigned char *buffer, size_t len); | |
| extern int unitfail; | |
| @@ -139,11 +131,11 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_easy_init(A,Y,Z) do { \ |
| - | if(((A) = curl_easy_init()) == NULL) { \ |
| + | #define exe_easy_init(A,Y,Z) do { \ |
| + | if(((A) = curl_easy_init()) == NULL) { \ |
| curl_mfprintf(stderr, "%s:%d curl_easy_init() failed\n", (Y), (Z)); \ | |
| - | res = TEST_ERR_EASY_INIT; \ |
| - | } \ |
| + | res = TEST_ERR_EASY_INIT; \ |
| + | } \ |
| } while(0) | |
| #define res_easy_init(A) \ | |
| @@ -160,11 +152,11 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_init(A,Y,Z) do { \ |
| - | if(((A) = curl_multi_init()) == NULL) { \ |
| + | #define exe_multi_init(A,Y,Z) do { \ |
| + | if(((A) = curl_multi_init()) == NULL) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_init() failed\n", (Y), (Z)); \ | |
| - | res = TEST_ERR_MULTI; \ |
| - | } \ |
| + | res = TEST_ERR_MULTI; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_init(A) \ | |
| @@ -181,14 +173,14 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_easy_setopt(A,B,C,Y,Z) do { \ |
| - | CURLcode ec; \ |
| - | if((ec = curl_easy_setopt((A), (B), (C))) != CURLE_OK) { \ |
| - | curl_mfprintf(stderr, "%s:%d curl_easy_setopt() failed, " \ |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_easy_strerror(ec)); \ |
| - | res = ec; \ |
| - | } \ |
| + | #define exe_easy_setopt(A,B,C,Y,Z) do { \ |
| + | CURLcode ec; \ |
| + | if((ec = curl_easy_setopt((A), (B), (C))) != CURLE_OK) { \ |
| + | curl_mfprintf(stderr, "%s:%d curl_easy_setopt() failed, " \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_easy_strerror(ec)); \ |
| + | res = ec; \ |
| + | } \ |
| } while(0) | |
| #define res_easy_setopt(A, B, C) \ | |
| @@ -205,14 +197,14 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_setopt(A, B, C, Y, Z) do { \ |
| - | CURLMcode ec; \ |
| - | if((ec = curl_multi_setopt((A), (B), (C))) != CURLM_OK) { \ |
| - | curl_mfprintf(stderr, "%s:%d curl_multi_setopt() failed, " \ |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| - | res = TEST_ERR_MULTI; \ |
| - | } \ |
| + | #define exe_multi_setopt(A, B, C, Y, Z) do { \ |
| + | CURLMcode ec; \ |
| + | if((ec = curl_multi_setopt((A), (B), (C))) != CURLM_OK) { \ |
| + | curl_mfprintf(stderr, "%s:%d curl_multi_setopt() failed, " \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | res = TEST_ERR_MULTI; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_setopt(A,B,C) \ | |
| @@ -229,14 +221,14 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_add_handle(A,B,Y,Z) do { \ |
| - | CURLMcode ec; \ |
| - | if((ec = curl_multi_add_handle((A), (B))) != CURLM_OK) { \ |
| + | #define exe_multi_add_handle(A,B,Y,Z) do { \ |
| + | CURLMcode ec; \ |
| + | if((ec = curl_multi_add_handle((A), (B))) != CURLM_OK) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_add_handle() failed, " \ | |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| - | res = TEST_ERR_MULTI; \ |
| - | } \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | res = TEST_ERR_MULTI; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_add_handle(A, B) \ | |
| @@ -253,14 +245,14 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_remove_handle(A,B,Y,Z) do { \ |
| - | CURLMcode ec; \ |
| - | if((ec = curl_multi_remove_handle((A), (B))) != CURLM_OK) { \ |
| + | #define exe_multi_remove_handle(A,B,Y,Z) do { \ |
| + | CURLMcode ec; \ |
| + | if((ec = curl_multi_remove_handle((A), (B))) != CURLM_OK) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_remove_handle() failed, " \ | |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| - | res = TEST_ERR_MULTI; \ |
| - | } \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | res = TEST_ERR_MULTI; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_remove_handle(A, B) \ | |
| @@ -278,20 +270,20 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_perform(A,B,Y,Z) do { \ |
| - | CURLMcode ec; \ |
| - | if((ec = curl_multi_perform((A), (B))) != CURLM_OK) { \ |
| + | #define exe_multi_perform(A,B,Y,Z) do { \ |
| + | CURLMcode ec; \ |
| + | if((ec = curl_multi_perform((A), (B))) != CURLM_OK) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_perform() failed, " \ | |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| - | res = TEST_ERR_MULTI; \ |
| - | } \ |
| - | else if(*((B)) < 0) { \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | res = TEST_ERR_MULTI; \ |
| + | } \ |
| + | else if(*((B)) < 0) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_perform() succeeded, " \ | |
| - | "but returned invalid running_handles value (%d)\n", \ |
| - | (Y), (Z), (int)*((B))); \ |
| - | res = TEST_ERR_NUM_HANDLES; \ |
| - | } \ |
| + | "but returned invalid running_handles value (%d)\n", \ |
| + | (Y), (Z), (int)*((B))); \ |
| + | res = TEST_ERR_NUM_HANDLES; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_perform(A, B) \ | |
| @@ -311,15 +303,15 @@ extern int unitfail; | |
| #define exe_multi_fdset(A, B, C, D, E, Y, Z) do { \ | |
| CURLMcode ec; \ | |
| if((ec = curl_multi_fdset((A), (B), (C), (D), (E))) != CURLM_OK) { \ | |
| - | curl_mfprintf(stderr, "%s:%d curl_multi_fdset() failed, " \ |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | curl_mfprintf(stderr, "%s:%d curl_multi_fdset() failed, " \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| res = TEST_ERR_MULTI; \ | |
| } \ | |
| else if(*((E)) < -1) { \ | |
| - | curl_mfprintf(stderr, "%s:%d curl_multi_fdset() succeeded, " \ |
| - | "but returned invalid max_fd value (%d)\n", \ |
| - | (Y), (Z), (int)*((E))); \ |
| + | curl_mfprintf(stderr, "%s:%d curl_multi_fdset() succeeded, " \ |
| + | "but returned invalid max_fd value (%d)\n", \ |
| + | (Y), (Z), (int)*((E))); \ |
| res = TEST_ERR_NUM_HANDLES; \ | |
| } \ | |
| } while(0) | |
| @@ -338,20 +330,20 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_timeout(A,B,Y,Z) do { \ |
| - | CURLMcode ec; \ |
| - | if((ec = curl_multi_timeout((A), (B))) != CURLM_OK) { \ |
| + | #define exe_multi_timeout(A,B,Y,Z) do { \ |
| + | CURLMcode ec; \ |
| + | if((ec = curl_multi_timeout((A), (B))) != CURLM_OK) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_timeout() failed, " \ | |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| - | res = TEST_ERR_BAD_TIMEOUT; \ |
| - | } \ |
| - | else if(*((B)) < -1L) { \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | res = TEST_ERR_BAD_TIMEOUT; \ |
| + | } \ |
| + | else if(*((B)) < -1L) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_timeout() succeeded, " \ | |
| - | "but returned invalid timeout value (%ld)\n", \ |
| - | (Y), (Z), (long)*((B))); \ |
| - | res = TEST_ERR_BAD_TIMEOUT; \ |
| - | } \ |
| + | "but returned invalid timeout value (%ld)\n", \ |
| + | (Y), (Z), (long)*((B))); \ |
| + | res = TEST_ERR_BAD_TIMEOUT; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_timeout(A, B) \ | |
| @@ -371,15 +363,15 @@ extern int unitfail; | |
| #define exe_multi_poll(A,B,C,D,E,Y,Z) do { \ | |
| CURLMcode ec; \ | |
| if((ec = curl_multi_poll((A), (B), (C), (D), (E))) != CURLM_OK) { \ | |
| - | curl_mfprintf(stderr, "%s:%d curl_multi_poll() failed, " \ |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | curl_mfprintf(stderr, "%s:%d curl_multi_poll() failed, " \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| res = TEST_ERR_MULTI; \ | |
| } \ | |
| else if(*((E)) < 0) { \ | |
| - | curl_mfprintf(stderr, "%s:%d curl_multi_poll() succeeded, " \ |
| - | "but returned invalid numfds value (%d)\n", \ |
| - | (Y), (Z), (int)*((E))); \ |
| + | curl_mfprintf(stderr, "%s:%d curl_multi_poll() succeeded, " \ |
| + | "but returned invalid numfds value (%d)\n", \ |
| + | (Y), (Z), (int)*((E))); \ |
| res = TEST_ERR_NUM_HANDLES; \ | |
| } \ | |
| } while(0) | |
| @@ -398,14 +390,14 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_multi_wakeup(A,Y,Z) do { \ |
| - | CURLMcode ec; \ |
| - | if((ec = curl_multi_wakeup((A))) != CURLM_OK) { \ |
| + | #define exe_multi_wakeup(A,Y,Z) do { \ |
| + | CURLMcode ec; \ |
| + | if((ec = curl_multi_wakeup((A))) != CURLM_OK) { \ |
| curl_mfprintf(stderr, "%s:%d curl_multi_wakeup() failed, " \ | |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| - | res = TEST_ERR_MULTI; \ |
| - | } \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ |
| + | res = TEST_ERR_MULTI; \ |
| + | } \ |
| } while(0) | |
| #define res_multi_wakeup(A) \ | |
| @@ -422,15 +414,15 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_select_test(A, B, C, D, E, Y, Z) do { \ |
| - | int ec; \ |
| - | if(select_wrapper((A), (B), (C), (D), (E)) == -1) { \ |
| - | ec = SOCKERRNO; \ |
| - | curl_mfprintf(stderr, "%s:%d select() failed, with " \ |
| - | "errno %d (%s)\n", \ |
| - | (Y), (Z), ec, strerror(ec)); \ |
| - | res = TEST_ERR_SELECT; \ |
| - | } \ |
| + | #define exe_select_test(A, B, C, D, E, Y, Z) do { \ |
| + | int ec; \ |
| + | if(select_wrapper((A), (B), (C), (D), (E)) == -1) { \ |
| + | ec = SOCKERRNO; \ |
| + | curl_mfprintf(stderr, "%s:%d select() failed, with " \ |
| + | "errno %d (%s)\n", \ |
| + | (Y), (Z), ec, strerror(ec)); \ |
| + | res = TEST_ERR_SELECT; \ |
| + | } \ |
| } while(0) | |
| #define res_select_test(A, B, C, D, E) \ | |
| @@ -451,14 +443,14 @@ extern int unitfail; | |
| tv_test_start = tutil_tvnow(); \ | |
| } while(0) | |
| - | #define exe_test_timedout(Y,Z) do { \ |
| - | long timediff = tutil_tvdiff(tutil_tvnow(), tv_test_start); \ |
| - | if(timediff > (TEST_HANG_TIMEOUT)) { \ |
| - | curl_mfprintf(stderr, "%s:%d ABORTING TEST, since it seems " \ |
| - | "that it would have run forever (%ld ms > %ld ms)\n", \ |
| - | (Y), (Z), timediff, (long) (TEST_HANG_TIMEOUT)); \ |
| - | res = TEST_ERR_RUNS_FOREVER; \ |
| - | } \ |
| + | #define exe_test_timedout(Y,Z) do { \ |
| + | long timediff = tutil_tvdiff(tutil_tvnow(), tv_test_start); \ |
| + | if(timediff > (TEST_HANG_TIMEOUT)) { \ |
| + | curl_mfprintf(stderr, "%s:%d ABORTING TEST, since it seems " \ |
| + | "that it would have run forever (%ld ms > %ld ms)\n", \ |
| + | (Y), (Z), timediff, (long) (TEST_HANG_TIMEOUT)); \ |
| + | res = TEST_ERR_RUNS_FOREVER; \ |
| + | } \ |
| } while(0) | |
| #define res_test_timedout() \ | |
| @@ -475,14 +467,14 @@ extern int unitfail; | |
| /* ---------------------------------------------------------------- */ | |
| - | #define exe_global_init(A,Y,Z) do { \ |
| - | CURLcode ec; \ |
| - | if((ec = curl_global_init((A))) != CURLE_OK) { \ |
| + | #define exe_global_init(A,Y,Z) do { \ |
| + | CURLcode ec; \ |
| + | if((ec = curl_global_init((A))) != CURLE_OK) { \ |
| curl_mfprintf(stderr, "%s:%d curl_global_init() failed, " \ | |
| - | "with code %d (%s)\n", \ |
| - | (Y), (Z), (int)ec, curl_easy_strerror(ec)); \ |
| - | res = ec; \ |
| - | } \ |
| + | "with code %d (%s)\n", \ |
| + | (Y), (Z), (int)ec, curl_easy_strerror(ec)); \ |
| + | res = ec; \ |
| + | } \ |
| } while(0) | |
| #define res_global_init(A) \ | |
| @@ -500,37 +492,20 @@ extern int unitfail; | |
| #define global_init(A) \ | |
| chk_global_init((A), (__FILE__), (__LINE__)) | |
| - | #ifndef CURLTESTS_BUNDLED_TEST_H |
| #define NO_SUPPORT_BUILT_IN \ | |
| - | CURLcode test(char *URL) \ |
| { \ | |
| (void)URL; \ | |
| - | curl_mfprintf(stderr, "Missing support\n"); \ |
| + | curl_mfprintf(stderr, "Missing support\n"); \ |
| return CURLE_UNSUPPORTED_PROTOCOL; \ | |
| } | |
| - | #endif |
| + | |
| + | /* global default */ |
| + | #define NUM_HANDLES 4 |
| /* ---------------------------------------------------------------- */ | |
| #endif /* HEADER_CURL_TEST_H */ | |
| - | #ifdef CURLTESTS_BUNDLED_TEST_H |
| - | extern CURLcode test(char *URL); /* the actual test function provided by each |
| - | individual libXXX.c file */ |
| - | |
| - | #undef NO_SUPPORT_BUILT_IN |
| - | #define NO_SUPPORT_BUILT_IN \ |
| - | CURLcode test(char *URL) \ |
| - | { \ |
| - | (void)URL; \ |
| - | curl_mfprintf(stderr, "Missing support\n"); \ |
| - | 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 |
| @@ -21,7 +21,6 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | |
| #include "test.h" | |
| #include "testutil.h" | |
| #include "testtrace.h" | |
| @@ -1,80 +0,0 @@ | |
| - | #!/usr/bin/env perl |
| - | #*************************************************************************** |
| - | # _ _ ____ _ |
| - | # 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 |
| - | # |
| - | ########################################################################### |
| - | |
| - | # 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 [<directory>] |
| - | |
| - | use strict; |
| - | use warnings; |
| - | |
| - | my $src_dir = @ARGV ? $ARGV[0] : "."; |
| - | |
| - | # Read list of tests |
| - | open my $fh, "<", "$src_dir/Makefile.inc" or die "Cannot open '$src_dir/Makefile.inc': $!"; |
| - | |
| - | print <<HEADER |
| - | /* !checksrc! disable COPYRIGHT all */ |
| - | /* !checksrc! disable INCLUDEDUP all */ |
| - | /* !checksrc! disable UNUSEDIGNORE all */ |
| - | |
| - | #define CURLTESTS_BUNDLED |
| - | #define CURLTESTS_BUNDLED_TEST_H |
| - | #include "first.h" |
| - | HEADER |
| - | ; |
| - | |
| - | my $tlist = ""; |
| - | |
| - | while(my $line = <$fh>) { |
| - | chomp $line; |
| - | if($line =~ /([a-z0-9]+)_SOURCES\ =\ ([a-z0-9]+)\.c/) { |
| - | my $name = $1; |
| - | my $src = "$2.c"; |
| - | |
| - | # Make common symbols unique across test sources |
| - | foreach my $symb ("test", "unit_setup", "unit_stop") { |
| - | print "#undef $symb\n"; |
| - | print "#define $symb ${symb}_$name\n"; |
| - | } |
| - | |
| - | print "#include \"$src\"\n"; |
| - | print "\n"; |
| - | $tlist .= " {\"$name\", test_$name},\n"; |
| - | } |
| - | } |
| - | |
| - | close $fh; |
| - | |
| - | print <<FOOTER |
| - | static const struct onetest s_tests[] = { |
| - | $tlist}; |
| - | |
| - | #undef CURLTESTS_BUNDLED_TEST_H |
| - | |
| - | #include "first.c" |
| - | FOOTER |
| - | ; |
| @@ -909,21 +909,15 @@ sub singletest_run { | |
| } | |
| if($tool =~ /^lib/) { | |
| - | if($bundle) { |
| - | $tool = "libtests" . exe_ext('TOOL'); |
| - | } |
| + | $tool = "libtests" . exe_ext('TOOL'); |
| $CMDLINE=$LIBDIR . $tool; | |
| } | |
| elsif($tool =~ /^tool/) { | |
| - | if($bundle) { |
| - | $tool = "tunits" . exe_ext('TOOL') |
| - | } |
| + | $tool = "tunits" . exe_ext('TOOL'); |
| $CMDLINE=$TUNITDIR . $tool; | |
| } | |
| elsif($tool =~ /^unit/) { | |
| - | if($bundle) { |
| - | $tool = "units" . exe_ext('TOOL') |
| - | } |
| + | $tool = "units" . exe_ext('TOOL'); |
| $CMDLINE=$UNITDIR . $tool; | |
| } | |
| @@ -934,13 +928,11 @@ sub singletest_run { | |
| $CMDLINE=exerunner() . $CMDLINE; | |
| - | if($bundle) { |
| - | if($gdbthis) { |
| - | $cmdargs =" $tool_name$cmdargs"; |
| - | } |
| - | else { |
| - | $CMDLINE.=" $tool_name"; |
| - | } |
| + | if($gdbthis) { |
| + | $cmdargs =" $tool_name$cmdargs"; |
| + | } |
| + | else { |
| + | $CMDLINE.=" $tool_name"; |
| } | |
| $DBGCURL=$CMDLINE; | |
| @@ -882,7 +882,6 @@ sub checksystemfeatures { | |
| logmsg sprintf("* Env: %s%s%s%s%s", $valgrind?"Valgrind ":"", | |
| $run_duphandle?"test-duphandle ":"", | |
| $run_event_based?"event-based ":"", | |
| - | $bundle?"bundle ":"", |
| $nghttpx_h3); | |
| logmsg sprintf("%s\n", $libtool?"Libtool ":""); | |
| logmsg ("* Seed: $randseed\n"); | |
| @@ -2503,15 +2502,6 @@ EOHELP | |
| shift @ARGV; | |
| } | |
| - | # Detect a test bundle build. |
| - | # Do not look for 'tunits' and 'units' because not all configurations build them. |
| - | if(-e $LIBDIR . "libtests" . exe_ext('TOOL') && |
| - | -e $SRVDIR . "servers" . exe_ext('SRV')) { |
| - | # use test bundles |
| - | $bundle=1; |
| - | $ENV{'CURL_TEST_BUNDLES'} = 1; |
| - | } |
| - | |
| delete $ENV{'DEBUGINFOD_URLS'} if($ENV{'DEBUGINFOD_URLS'} && $no_debuginfod); | |
| if(!$randseed) { | |
| @@ -2,14 +2,5 @@ | |
| # | |
| # SPDX-License-Identifier: curl | |
| - | server_bundle.c |
| servers | |
| - | buildinfo |
| - | dnsd |
| - | mqttd |
| - | resolve |
| - | rtspd |
| - | sockfilt |
| - | socksd |
| - | sws |
| - | tftpd |
| + | servers.c |
| @@ -22,53 +22,43 @@ | |
| # | |
| ########################################################################### | |
| - | # Get 'SERVERPROGS', '<target>_SOURCES' variables, 'MEMDEBUG', 'CURLX_SRCS', 'USEFUL', 'INET_PTON', 'UTIL', 'FIRSTFILES' |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, MEMDEBUG, CURLX_SRCS, TESTFILES variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| + | add_custom_command( |
| + | OUTPUT "${BUNDLE_SRC}" |
| + | COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --test ${TESTFILES} |
| + | ${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}" |
| + | DEPENDS |
| + | "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" ${FIRSTFILES} ${TESTFILES} |
| + | VERBATIM) |
| + | |
| if(ENABLE_SERVER_DEBUG AND ENABLE_CURLDEBUG) | |
| set_source_files_properties("../../lib/memdebug.c" PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) | |
| endif() | |
| - | if(CURL_TEST_BUNDLES) |
| - | add_custom_command( |
| - | OUTPUT "server_bundle.c" |
| - | COMMAND ${PERL_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/mk-bundle.pl" ${SERVERPROGS} > "server_bundle.c" |
| - | DEPENDS |
| - | "${CMAKE_CURRENT_SOURCE_DIR}/mk-bundle.pl" ${FIRSTFILES} |
| - | "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" |
| - | VERBATIM) |
| - | |
| - | set(SERVERPROGS "servers") |
| - | set(servers_SOURCES ${MEMDEBUG} ${CURLX_SRCS} ${USEFUL} ${INET_PTON} ${UTIL} "server_bundle.c") |
| + | add_executable(servers EXCLUDE_FROM_ALL ${MEMDEBUG} ${CURLX_SRCS} ${UTILS} "${BUNDLE_SRC}") |
| + | add_dependencies(testdeps servers) |
| + | target_include_directories(servers PRIVATE |
| + | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| + | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| + | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| + | "${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h", "tool_xattr.h" |
| + | "${PROJECT_SOURCE_DIR}/tests/server" # for "first.h" |
| + | ) |
| + | target_link_libraries(servers ${CURL_LIBS}) |
| + | if(ENABLE_SERVER_DEBUG) |
| + | set_property(TARGET servers APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}") |
| endif() | |
| - | |
| - | foreach(_target IN LISTS SERVERPROGS) |
| - | set(_target_name "${_target}") |
| - | add_executable(${_target_name} EXCLUDE_FROM_ALL ${${_target}_SOURCES}) |
| - | add_dependencies(testdeps ${_target_name}) |
| - | target_include_directories(${_target_name} PRIVATE |
| - | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| - | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| - | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| - | "${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h", "tool_xattr.h" |
| - | "${PROJECT_SOURCE_DIR}/tests/server" # for "first.h" |
| - | ) |
| - | target_link_libraries(${_target_name} ${CURL_LIBS}) |
| - | if(ENABLE_SERVER_DEBUG) |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}") |
| - | endif() |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "WITHOUT_LIBCURL") |
| - | # Test servers simply are standalone programs that do not use libcurl |
| - | # library. For convenience and to ease portability of these servers, |
| - | # some source code files from the libcurl subdirectory are also used |
| - | # to build the servers. In order to achieve proper linkage of these |
| - | # files on Windows targets it is necessary to build the test servers |
| - | # with CURL_STATICLIB defined, independently of how libcurl is built. |
| - | if(WIN32) |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB") |
| - | endif() |
| - | set_target_properties(${_target_name} PROPERTIES |
| - | OUTPUT_NAME "${_target}" |
| - | PROJECT_LABEL "Test server ${_target}") |
| - | endforeach() |
| + | set_property(TARGET servers APPEND PROPERTY COMPILE_DEFINITIONS "WITHOUT_LIBCURL" "CURL_NO_OLDIES") |
| + | # Test servers simply are standalone programs that do not use libcurl |
| + | # library. For convenience and to ease portability of these servers, |
| + | # some source code files from the libcurl subdirectory are also used |
| + | # to build the servers. In order to achieve proper linkage of these |
| + | # files on Windows targets it is necessary to build the test servers |
| + | # with CURL_STATICLIB defined, independently of how libcurl is built. |
| + | if(WIN32) |
| + | set_property(TARGET servers APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB") |
| + | endif() |
| + | set_target_properties(servers PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}") |
| @@ -40,11 +40,16 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \ | |
| -I$(top_srcdir)/src \ | |
| -I$(top_srcdir)/tests/server | |
| - | # Prevent LIBS from being used for all link targets |
| - | LIBS = $(BLANK_AT_MAKETIME) |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, MEMDEBUG, CURLX_SRCS, TESTFILES variables |
| + | include Makefile.inc |
| + | |
| + | EXTRA_DIST = CMakeLists.txt .checksrc $(FIRSTFILES) $(UTILS) $(TESTFILES) |
| CFLAGS += @CURL_CFLAG_EXTRAS@ | |
| + | # Prevent LIBS from being used for all link targets |
| + | LIBS = $(BLANK_AT_MAKETIME) |
| + | |
| if DOING_NATIVE_WINDOWS | |
| AM_CPPFLAGS += -DCURL_STATICLIB | |
| endif | |
| @@ -57,32 +62,23 @@ AM_CPPFLAGS += -DCURLDEBUG | |
| endif | |
| endif | |
| - | AM_CPPFLAGS += -DWITHOUT_LIBCURL |
| - | |
| - | # Makefile.inc provides neat definitions |
| - | include Makefile.inc |
| - | |
| - | EXTRA_DIST = CMakeLists.txt .checksrc mk-bundle.pl $(FIRSTFILES) |
| + | AM_CPPFLAGS += -DWITHOUT_LIBCURL -DCURL_NO_OLDIES |
| - | if USE_TEST_BUNDLES |
| - | server_EXCLUDE = |
| + | bundle_EXCLUDE = |
| if ENABLE_SERVER_DEBUG | |
| if CURLDEBUG | |
| - | server_EXCLUDE += $(MEMDEBUG) |
| + | bundle_EXCLUDE += $(MEMDEBUG) |
| endif | |
| endif | |
| - | server_bundle.c: $(top_srcdir)/tests/server/mk-bundle.pl $(MEMDEBUG) $(CURLX_SRCS) $(USEFUL) $(INET_PTON) $(UTIL) $(FIRSTFILES) |
| - | @PERL@ $(top_srcdir)/tests/server/mk-bundle.pl $(MEMDEBUG) $(CURLX_SRCS) $(USEFUL) $(INET_PTON) $(UTIL) $(SERVERPROGS) --exclude $(server_EXCLUDE) > server_bundle.c |
| + | $(BUNDLE_SRC): $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRSTFILES) $(UTILS) $(MEMDEBUG) $(CURLX_SRCS) $(TESTFILES) |
| + | @PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(UTILS) $(MEMDEBUG) $(CURLX_SRCS) --test $(TESTFILES) --exclude $(bundle_EXCLUDE) > $(BUNDLE_SRC) |
| - | noinst_PROGRAMS = servers |
| - | nodist_servers_SOURCES = server_bundle.c |
| - | servers_SOURCES = $(server_EXCLUDE) |
| + | noinst_PROGRAMS = $(BUNDLE) |
| + | nodist_servers_SOURCES = $(BUNDLE_SRC) |
| + | servers_SOURCES = $(bundle_EXCLUDE) |
| servers_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ | |
| servers_CFLAGS = $(AM_CFLAGS) | |
| - | CLEANFILES = server_bundle.c |
| - | else |
| - | noinst_PROGRAMS = $(SERVERPROGS) |
| - | endif |
| + | CLEANFILES = $(BUNDLE_SRC) |
| CHECKSRC = $(CS_$(V)) | |
| CS_0 = @echo " RUN " $@; | |
| @@ -92,9 +88,12 @@ CS_ = $(CS_0) | |
| # ignore generated C files since they play by slightly different rules! | |
| checksrc: | |
| $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ | |
| - | -W$(srcdir)/server_bundle.c \ |
| + | -W$(srcdir)/$(BUNDLE_SRC) \ |
| $(srcdir)/*.[ch]) | |
| if NOT_CURL_CI | |
| all-local: checksrc | |
| endif | |
| + | |
| + | clean-local: |
| + | rm -f $(BUNDLE) |
| @@ -21,8 +21,16 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| + | # Shared between CMakeLists.txt and Makefile.am |
| - | SERVERPROGS = resolve rtspd sockfilt sws tftpd socksd mqttd dnsd |
| + | BUNDLE = servers |
| + | BUNDLE_SRC = servers.c |
| + | |
| + | # Files referenced from the bundle source |
| + | FIRSTFILES = first.c first.h |
| + | |
| + | # Common files used by test programs |
| + | UTILS = getpart.c getpart.h util.c util.h |
| MEMDEBUG = \ | |
| ../../lib/memdebug.c \ | |
| @@ -30,6 +38,7 @@ MEMDEBUG = \ | |
| CURLX_SRCS = \ | |
| ../../lib/curlx/base64.c \ | |
| + | ../../lib/curlx/inet_pton.c \ |
| ../../lib/curlx/multibyte.c \ | |
| ../../lib/curlx/nonblock.c \ | |
| ../../lib/curlx/strparse.c \ | |
| @@ -39,74 +48,13 @@ CURLX_SRCS = \ | |
| ../../lib/curlx/warnless.c \ | |
| ../../lib/curlx/winapi.c | |
| - | CURLX_HDRS = \ |
| - | ../../lib/curlx/base64.h \ |
| - | ../../lib/curlx/curlx.h \ |
| - | ../../lib/curlx/multibyte.h \ |
| - | ../../lib/curlx/nonblock.h \ |
| - | ../../lib/curlx/timediff.h \ |
| - | ../../lib/curlx/timeval.h \ |
| - | ../../lib/curlx/version_win32.h \ |
| - | ../../lib/curlx/warnless.h \ |
| - | ../../lib/curlx/winapi.h |
| - | |
| - | UTIL = \ |
| - | getpart.c \ |
| - | getpart.h \ |
| - | util.c \ |
| - | util.h \ |
| - | server_setup.h |
| - | |
| - | FIRSTFILES = \ |
| - | first.c \ |
| - | first.h |
| - | |
| - | INET_PTON = \ |
| - | ../../lib/curlx/inet_pton.c |
| - | |
| - | resolve_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \ |
| - | resolve.c |
| - | resolve_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | resolve_CFLAGS = $(AM_CFLAGS) |
| - | |
| - | rtspd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \ |
| - | server_sockaddr.h \ |
| - | rtspd.c |
| - | rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | rtspd_CFLAGS = $(AM_CFLAGS) |
| - | |
| - | sockfilt_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) $(INET_PTON) \ |
| - | server_sockaddr.h \ |
| - | sockfilt.c |
| - | sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | sockfilt_CFLAGS = $(AM_CFLAGS) |
| - | |
| - | socksd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) $(INET_PTON) \ |
| - | server_sockaddr.h \ |
| - | socksd.c |
| - | socksd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | socksd_CFLAGS = $(AM_CFLAGS) |
| - | |
| - | mqttd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \ |
| - | server_sockaddr.h \ |
| - | mqttd.c |
| - | mqttd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | mqttd_CFLAGS = $(AM_CFLAGS) |
| - | |
| - | sws_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) $(INET_PTON) \ |
| - | server_sockaddr.h \ |
| - | sws.c |
| - | sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | sws_CFLAGS = $(AM_CFLAGS) |
| - | |
| - | tftpd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \ |
| - | server_sockaddr.h \ |
| - | tftpd.c \ |
| - | tftp.h |
| - | tftpd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | tftpd_CFLAGS = $(AM_CFLAGS) |
| - | |
| - | dnsd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \ |
| - | dnsd.c |
| - | dnsd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@ |
| - | dnsd_CFLAGS = $(AM_CFLAGS) |
| + | # All test servers |
| + | TESTFILES = \ |
| + | dnsd.c \ |
| + | mqttd.c \ |
| + | resolve.c \ |
| + | rtspd.c \ |
| + | sockfilt.c \ |
| + | socksd.c \ |
| + | sws.c \ |
| + | tftpd.c |
| @@ -22,7 +22,7 @@ | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| #ifdef HAVE_SYS_IOCTL_H | |
| #include <sys/ioctl.h> | |
| @@ -54,7 +54,6 @@ | |
| #include <curlx.h> /* from the private lib dir */ | |
| #include "getpart.h" | |
| #include "util.h" | |
| - | #include "server_sockaddr.h" |
| /* include memdebug.h last */ | |
| #include <memdebug.h> | |
| @@ -385,7 +384,7 @@ static int send_response(curl_socket_t sock, | |
| return 0; | |
| } | |
| - | int main(int argc, char **argv) |
| + | static int test_dnsd(int argc, char **argv) |
| { | |
| srvr_sockaddr_union_t me; | |
| ssize_t n = 0; | |
| @@ -23,37 +23,36 @@ | |
| ***************************************************************************/ | |
| #include <stdio.h> | |
| #include <string.h> | |
| - | #include "first.h" |
| int main(int argc, char **argv) | |
| { | |
| - | main_func_t main_func; |
| - | char *main_name; |
| + | entry_func_t entry_func; |
| + | char *entry_name; |
| if(argc < 2) { | |
| fprintf(stderr, "Pass servername as first argument\n"); | |
| return 1; | |
| } | |
| - | main_name = argv[1]; |
| - | main_func = NULL; |
| + | entry_name = argv[1]; |
| + | entry_func = NULL; |
| { | |
| size_t 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; |
| + | for(tmp = 0; tmp < CURL_ARRAYSIZE(s_entries); ++tmp) { |
| + | if(strcmp(entry_name, s_entries[tmp].name) == 0) { |
| + | entry_func = s_entries[tmp].ptr; |
| break; | |
| } | |
| } | |
| } | |
| - | if(!main_func) { |
| - | fprintf(stderr, "Test '%s' not found.\n", main_name); |
| + | if(!entry_func) { |
| + | fprintf(stderr, "Test '%s' not found.\n", entry_name); |
| return 99; | |
| } | |
| --argc; | |
| ++argv; | |
| - | return main_func(argc, argv); |
| + | return entry_func(argc, argv); |
| } | |
| @@ -23,11 +23,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | typedef int (*main_func_t)(int, char **); |
| + | typedef int (*entry_func_t)(int, char **); |
| - | struct onemain { |
| + | struct entry_s { |
| const char *name; | |
| - | main_func_t ptr; |
| + | entry_func_t ptr; |
| }; | |
| #endif /* HEADER_SERVER_FIRST_H */ | |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| #include "getpart.h" | |
| #include <curlx.h> /* from the private lib dir */ | |
| @@ -64,7 +64,6 @@ curl_wcsdup_callback Curl_cwcsdup = NULL; /* not use in test code */ | |
| # pragma warning(pop) | |
| #endif | |
| - | |
| /* | |
| * line_length() | |
| * | |
| @@ -109,7 +108,6 @@ static size_t line_length(const char *buffer, int bytestocheck) | |
| * GPE_END_OF_FILE | |
| * GPE_OK | |
| */ | |
| - | |
| static int readline(char **buffer, size_t *bufsize, size_t *length, | |
| FILE *stream) | |
| { | |
| @@ -174,7 +172,6 @@ static int readline(char **buffer, size_t *bufsize, size_t *length, | |
| * GPE_OUT_OF_MEMORY | |
| * GPE_OK | |
| */ | |
| - | |
| static int appenddata(char **dst_buf, /* dest buffer */ | |
| size_t *dst_len, /* dest buffer data length */ | |
| size_t *dst_alloc, /* dest buffer allocated size */ | |
| @@ -274,7 +271,6 @@ static int decodedata(char **buf, /* dest buffer */ | |
| * GPE_OUT_OF_MEMORY | |
| * GPE_OK | |
| */ | |
| - | |
| int getpart(char **outbuf, size_t *outlen, | |
| const char *main, const char *sub, FILE *stream) | |
| { | |
| @@ -23,7 +23,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| #include "strdup.h" | |
| @@ -1,87 +0,0 @@ | |
| - | #!/usr/bin/env perl |
| - | #*************************************************************************** |
| - | # _ _ ____ _ |
| - | # 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 |
| - | # |
| - | ########################################################################### |
| - | |
| - | # 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. |
| - | |
| - | use strict; |
| - | use warnings; |
| - | |
| - | if(!@ARGV) { |
| - | die "Usage: $0 [<inputs>] [--exclude <exclude-c-sources>]\n"; |
| - | } |
| - | |
| - | # Specific sources to exclude or add as an extra source file |
| - | my @src; |
| - | my %exclude; |
| - | my $in_exclude = 0; |
| - | foreach my $src (@ARGV) { |
| - | if($in_exclude) { |
| - | $exclude{$src} = 1; |
| - | } |
| - | elsif($src eq "--exclude") { |
| - | $in_exclude = 1; |
| - | } |
| - | else { |
| - | push @src, $src; |
| - | } |
| - | } |
| - | |
| - | print <<HEADER |
| - | /* !checksrc! disable COPYRIGHT all */ |
| - | |
| - | #include "first.h" |
| - | |
| - | HEADER |
| - | ; |
| - | |
| - | my $tlist = ""; |
| - | |
| - | foreach my $src (@src) { |
| - | if($src =~ /\.c$/) { |
| - | if(!exists $exclude{$src}) { |
| - | # Misc .c source to include |
| - | print "#include \"$src\"\n\n"; |
| - | } |
| - | } |
| - | elsif($src !~ /\.h$/) { |
| - | # Make 'main' unique across server sources |
| - | print "#undef main\n"; |
| - | print "#define main main_$src\n"; |
| - | print "int main_$src(int argc, char **argv);\n"; |
| - | print "#include \"$src.c\"\n"; |
| - | print "#undef main\n"; |
| - | print "\n"; |
| - | $tlist .= " {\"$src\", main_$src},\n"; |
| - | } |
| - | } |
| - | |
| - | print <<FOOTER |
| - | static const struct onemain s_mains[] = { |
| - | $tlist}; |
| - | |
| - | #include "first.c" |
| - | FOOTER |
| - | ; |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include "util.h" | |
| @@ -55,7 +55,6 @@ | |
| #include <curlx.h> /* from the private lib dir */ | |
| #include "getpart.h" | |
| - | #include "server_sockaddr.h" |
| #include "tool_binmode.h" | |
| @@ -882,7 +881,7 @@ static curl_socket_t mqttd_sockdaemon(curl_socket_t sock, | |
| } | |
| - | int main(int argc, char *argv[]) |
| + | static int test_mqttd(int argc, char *argv[]) |
| { | |
| curl_socket_t sock = CURL_SOCKET_BAD; | |
| curl_socket_t msgsock = CURL_SOCKET_BAD; | |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| /* Purpose | |
| * | |
| @@ -49,7 +49,7 @@ | |
| /* include memdebug.h last */ | |
| #include <memdebug.h> | |
| - | int main(int argc, char *argv[]) |
| + | static int test_resolve(int argc, char *argv[]) |
| { | |
| int arg = 1; | |
| const char *host = NULL; | |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| /* | |
| * curl's test suite Real Time Streaming Protocol (RTSP) server. | |
| @@ -51,7 +51,6 @@ | |
| #include <curlx.h> /* from the private lib dir */ | |
| #include "getpart.h" | |
| #include "util.h" | |
| - | #include "server_sockaddr.h" |
| /* include memdebug.h last */ | |
| #include <memdebug.h> | |
| @@ -1000,7 +999,7 @@ static int rtspd_send_doc(curl_socket_t sock, struct rtspd_httprequest *req) | |
| } | |
| - | int main(int argc, char *argv[]) |
| + | static int test_rtspd(int argc, char *argv[]) |
| { | |
| srvr_sockaddr_union_t me; | |
| curl_socket_t sock = CURL_SOCKET_BAD; | |
| @@ -1,31 +0,0 @@ | |
| - | #ifndef HEADER_CURL_SERVER_SETUP_H |
| - | #define HEADER_CURL_SERVER_SETUP_H |
| - | /*************************************************************************** |
| - | * _ _ ____ _ |
| - | * 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 |
| - | * |
| - | ***************************************************************************/ |
| - | |
| - | #define CURL_NO_OLDIES |
| - | |
| - | #include "curl_setup.h" /* portability help from the lib directory */ |
| - | |
| - | #endif /* HEADER_CURL_SERVER_SETUP_H */ |
| @@ -1,43 +0,0 @@ | |
| - | #ifndef HEADER_CURL_SERVER_SOCKADDR_H |
| - | #define HEADER_CURL_SERVER_SOCKADDR_H |
| - | /*************************************************************************** |
| - | * _ _ ____ _ |
| - | * 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 "server_setup.h" |
| - | |
| - | #ifdef HAVE_SYS_UN_H |
| - | #include <sys/un.h> /* for sockaddr_un */ |
| - | #endif |
| - | |
| - | typedef union { |
| - | struct sockaddr sa; |
| - | struct sockaddr_in sa4; |
| - | #ifdef USE_IPV6 |
| - | struct sockaddr_in6 sa6; |
| - | #endif |
| - | #ifdef USE_UNIX_SOCKETS |
| - | struct sockaddr_un sau; |
| - | #endif |
| - | } srvr_sockaddr_union_t; |
| - | |
| - | #endif /* HEADER_CURL_SERVER_SOCKADDR_H */ |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| /* Purpose | |
| * | |
| @@ -104,8 +104,8 @@ | |
| #include <curlx.h> /* from the private lib dir */ | |
| #include "inet_pton.h" | |
| #include "util.h" | |
| - | #include "server_sockaddr.h" |
| #include "timediff.h" | |
| + | #include "warnless.h" /* for read() */ |
| #include "tool_binmode.h" | |
| @@ -1373,7 +1373,7 @@ static curl_socket_t sockfilt_sockdaemon(curl_socket_t sock, | |
| } | |
| - | int main(int argc, char *argv[]) |
| + | static int test_sockfilt(int argc, char *argv[]) |
| { | |
| srvr_sockaddr_union_t me; | |
| curl_socket_t sock = CURL_SOCKET_BAD; | |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| #include <stdlib.h> | |
| /* Function | |
| @@ -76,7 +76,6 @@ | |
| #include <curlx.h> /* from the private lib dir */ | |
| #include "inet_pton.h" | |
| #include "util.h" | |
| - | #include "server_sockaddr.h" |
| #include "tool_binmode.h" | |
| /* include memdebug.h last */ | |
| @@ -914,7 +913,7 @@ static curl_socket_t socksd_sockdaemon(curl_socket_t sock, | |
| } | |
| - | int main(int argc, char *argv[]) |
| + | static int test_socksd(int argc, char *argv[]) |
| { | |
| curl_socket_t sock = CURL_SOCKET_BAD; | |
| curl_socket_t msgsock = CURL_SOCKET_BAD; | |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| /* sws.c: simple (silly?) web server | |
| @@ -53,7 +53,6 @@ | |
| #include "getpart.h" | |
| #include "inet_pton.h" | |
| #include "util.h" | |
| - | #include "server_sockaddr.h" |
| /* include memdebug.h last */ | |
| #include <memdebug.h> | |
| @@ -1989,7 +1988,7 @@ static int service_connection(curl_socket_t msgsock, | |
| return -1; | |
| } | |
| - | int main(int argc, char *argv[]) |
| + | static int test_sws(int argc, char *argv[]) |
| { | |
| srvr_sockaddr_union_t me; | |
| curl_socket_t sock = CURL_SOCKET_BAD; | |
| @@ -1,63 +0,0 @@ | |
| - | #ifndef HEADER_CURL_SERVER_TFTP_H |
| - | #define HEADER_CURL_SERVER_TFTP_H |
| - | /*************************************************************************** |
| - | * _ _ ____ _ |
| - | * 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 "server_setup.h" |
| - | |
| - | /* This file is a rewrite/clone of the arpa/tftp.h file for systems without |
| - | it. */ |
| - | |
| - | #define SEGSIZE 512 /* data segment size */ |
| - | |
| - | #if defined(__GNUC__) && ((__GNUC__ >= 3) || \ |
| - | ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7))) |
| - | # define PACKED_STRUCT __attribute__((__packed__)) |
| - | #else |
| - | # define PACKED_STRUCT /* NOTHING */ |
| - | #endif |
| - | |
| - | /* Using a packed struct as binary in a program is begging for problems, but |
| - | the tftpd server was written like this so we have this struct here to make |
| - | things build. */ |
| - | |
| - | struct tftphdr { |
| - | unsigned short th_opcode; /* packet type */ |
| - | unsigned short th_block; /* all sorts of things */ |
| - | char th_data[1]; /* data or error string */ |
| - | } PACKED_STRUCT; |
| - | |
| - | #define th_stuff th_block |
| - | #define th_code th_block |
| - | #define th_msg th_data |
| - | |
| - | #define TFTP_EUNDEF 0 |
| - | #define TFTP_ENOTFOUND 1 |
| - | #define TFTP_EACCESS 2 |
| - | #define TFTP_ENOSPACE 3 |
| - | #define TFTP_EBADOP 4 |
| - | #define TFTP_EBADID 5 |
| - | #define TFTP_EEXISTS 6 |
| - | #define TFTP_ENOUSER 7 |
| - | |
| - | #endif /* HEADER_CURL_SERVER_TFTP_H */ |
| @@ -50,7 +50,7 @@ | |
| * SPDX-License-Identifier: BSD-4-Clause-UC | |
| */ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| #ifdef HAVE_SYS_IOCTL_H | |
| #include <sys/ioctl.h> | |
| @@ -86,8 +86,42 @@ | |
| #include <curlx.h> /* from the private lib dir */ | |
| #include "getpart.h" | |
| #include "util.h" | |
| - | #include "server_sockaddr.h" |
| - | #include "tftp.h" |
| + | |
| + | /***************************************************************************** |
| + | * This is a rewrite/clone of the arpa/tftp.h file for systems without it. * |
| + | *****************************************************************************/ |
| + | #define SEGSIZE 512 /* data segment size */ |
| + | |
| + | #if defined(__GNUC__) && ((__GNUC__ >= 3) || \ |
| + | ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7))) |
| + | # define PACKED_STRUCT __attribute__((__packed__)) |
| + | #else |
| + | # define PACKED_STRUCT /* NOTHING */ |
| + | #endif |
| + | |
| + | /* Using a packed struct as binary in a program is begging for problems, but |
| + | the tftpd server was written like this so we have this struct here to make |
| + | things build. */ |
| + | |
| + | struct tftphdr { |
| + | unsigned short th_opcode; /* packet type */ |
| + | unsigned short th_block; /* all sorts of things */ |
| + | char th_data[1]; /* data or error string */ |
| + | } PACKED_STRUCT; |
| + | |
| + | #define th_stuff th_block |
| + | #define th_code th_block |
| + | #define th_msg th_data |
| + | |
| + | #define TFTP_EUNDEF 0 |
| + | #define TFTP_ENOTFOUND 1 |
| + | #define TFTP_EACCESS 2 |
| + | #define TFTP_ENOSPACE 3 |
| + | #define TFTP_EBADOP 4 |
| + | #define TFTP_EBADID 5 |
| + | #define TFTP_EEXISTS 6 |
| + | #define TFTP_ENOUSER 7 |
| + | /****************************************************************************/ |
| /* include memdebug.h last */ | |
| #include <memdebug.h> | |
| @@ -528,7 +562,7 @@ static int synchnet(curl_socket_t f /* socket to flush */) | |
| return j; | |
| } | |
| - | int main(int argc, char **argv) |
| + | static int test_tftpd(int argc, char **argv) |
| { | |
| srvr_sockaddr_union_t me; | |
| struct tftphdr *tp; | |
| @@ -826,7 +860,6 @@ int main(int argc, char **argv) | |
| } | |
| logmsg("end of one transfer"); | |
| - | |
| } | |
| tftpd_cleanup: | |
| @@ -21,7 +21,7 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| #ifndef UNDER_CE | |
| #include <signal.h> | |
| @@ -23,13 +23,11 @@ | |
| * SPDX-License-Identifier: curl | |
| * | |
| ***************************************************************************/ | |
| - | #include "server_setup.h" |
| + | #include "curl_setup.h" |
| /* adjust for old MSVC */ | |
| - | #ifdef _MSC_VER |
| - | # if _MSC_VER < 1900 |
| - | # define snprintf _snprintf |
| - | # endif |
| + | #if defined(_MSC_VER) && (_MSC_VER < 1900) |
| + | # define snprintf _snprintf |
| #endif | |
| #ifdef _WIN32 | |
| @@ -124,6 +122,17 @@ int bind_unix_socket(curl_socket_t sock, const char *unix_socket, | |
| struct sockaddr_un *sau); | |
| #endif /* USE_UNIX_SOCKETS */ | |
| + | typedef union { |
| + | struct sockaddr sa; |
| + | struct sockaddr_in sa4; |
| + | #ifdef USE_IPV6 |
| + | struct sockaddr_in6 sa6; |
| + | #endif |
| + | #ifdef USE_UNIX_SOCKETS |
| + | struct sockaddr_un sau; |
| + | #endif |
| + | } srvr_sockaddr_union_t; |
| + | |
| unsigned short util_ultous(unsigned long ulnum); | |
| #endif /* HEADER_CURL_SERVER_UTIL_H */ | |
| @@ -247,14 +247,7 @@ sub server_exe { | |
| if(!defined $ext) { | |
| $ext = 'SRV'; | |
| } | |
| - | my $cmd; |
| - | if($ENV{'CURL_TEST_BUNDLES'}) { |
| - | $cmd = $SRVDIR . "servers" . exe_ext($ext) . " $name"; |
| - | } |
| - | else { |
| - | $cmd = $SRVDIR . $name . exe_ext($ext); |
| - | } |
| - | return exerunner() . "$cmd"; |
| + | return exerunner() . $SRVDIR . "servers" . exe_ext($ext) . " $name"; |
| } | |
| @@ -266,13 +259,7 @@ sub server_exe_args { | |
| if(!defined $ext) { | |
| $ext = 'SRV'; | |
| } | |
| - | my @cmd; |
| - | if($ENV{'CURL_TEST_BUNDLES'}) { |
| - | @cmd = ($SRVDIR . "servers" . exe_ext($ext), $name); |
| - | } |
| - | else { |
| - | @cmd = ($SRVDIR . $name . exe_ext($ext)); |
| - | } |
| + | my @cmd = ($SRVDIR . "servers" . exe_ext($ext), $name); |
| if($ENV{'CURL_TEST_EXE_RUNNER'}) { | |
| unshift @cmd, $ENV{'CURL_TEST_EXE_RUNNER'}; | |
| } | |
| @@ -2,6 +2,5 @@ | |
| # | |
| # SPDX-License-Identifier: curl | |
| - | /tool[0-9][0-9][0-9][0-9] |
| - | tool_bundle.c |
| tunits | |
| + | tunits.c |
| @@ -22,41 +22,29 @@ | |
| # | |
| ########################################################################### | |
| - | # Get 'TOOLPROGS', '*_SOURCES', 'TOOLFILES' variables |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, TESTFILES variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| - | if(CURL_TEST_BUNDLES) |
| - | add_custom_command( |
| - | OUTPUT "tool_bundle.c" |
| - | COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tests/mk-bundle.pl" "${CMAKE_CURRENT_SOURCE_DIR}" > "tool_bundle.c" |
| - | DEPENDS |
| - | "${PROJECT_SOURCE_DIR}/tests/mk-bundle.pl" ${TOOLFILES} |
| - | "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" |
| - | VERBATIM) |
| + | add_custom_command( |
| + | OUTPUT "${BUNDLE_SRC}" |
| + | COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --test ${TESTFILES} |
| + | ${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}" |
| + | DEPENDS |
| + | "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" ${FIRSTFILES} ${TESTFILES} |
| + | VERBATIM) |
| - | set(TOOLPROGS "tunits") |
| - | set(tunits_SOURCES "tool_bundle.c") |
| - | endif() |
| - | |
| - | foreach(_target IN LISTS TOOLPROGS) |
| - | set(_target_name "${_target}") |
| - | add_executable(${_target_name} EXCLUDE_FROM_ALL ${${_target}_SOURCES}) |
| - | add_dependencies(testdeps ${_target_name}) |
| - | target_link_libraries(${_target_name} curltool curlu) |
| - | target_include_directories(${_target_name} PRIVATE |
| - | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| - | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| - | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| - | "${PROJECT_SOURCE_DIR}/src" |
| - | "${PROJECT_SOURCE_DIR}/tests/libtest" |
| - | "${PROJECT_SOURCE_DIR}/tests/unit" # for curlcheck.h |
| - | ) |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}") |
| - | if(CURL_TEST_BUNDLES) |
| - | target_include_directories(${_target_name} PRIVATE "${PROJECT_SOURCE_DIR}/tests/tunit") |
| - | endif() |
| - | set_target_properties(${_target_name} PROPERTIES |
| - | OUTPUT_NAME "${_target}" |
| - | PROJECT_LABEL "Test tunit ${_target}") |
| - | endforeach() |
| + | add_executable(tunits EXCLUDE_FROM_ALL ${UTILS} "${BUNDLE_SRC}") |
| + | add_dependencies(testdeps tunits) |
| + | target_link_libraries(tunits curltool curlu) |
| + | target_include_directories(tunits PRIVATE |
| + | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| + | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| + | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| + | "${PROJECT_SOURCE_DIR}/src" |
| + | "${PROJECT_SOURCE_DIR}/tests/libtest" |
| + | "${PROJECT_SOURCE_DIR}/tests/unit" # for curlcheck.h |
| + | "${PROJECT_SOURCE_DIR}/tests/tunit" |
| + | ) |
| + | set_property(TARGET tunits APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}" "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION") |
| + | set_target_properties(tunits PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}") |
| @@ -41,7 +41,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \ | |
| -I$(top_srcdir)/tests/unit \ | |
| -I$(top_srcdir)/tests/tunit | |
| - | EXTRA_DIST = CMakeLists.txt README.md |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, TESTFILES variables |
| + | include Makefile.inc |
| + | |
| + | EXTRA_DIST = CMakeLists.txt README.md $(UTILS) $(TESTFILES) |
| CFLAGS += @CURL_CFLAG_EXTRAS@ | |
| @@ -49,7 +52,7 @@ CFLAGS += @CURL_CFLAG_EXTRAS@ | |
| LIBS = $(BLANK_AT_MAKETIME) | |
| LDADD = $(top_builddir)/src/libcurltool.la \ | |
| - | $(top_builddir)/lib/libcurl.la \ |
| + | $(top_builddir)/lib/libcurl.la \ |
| @LIBCURL_PC_LDFLAGS_PRIVATE@ @LIBCURL_PC_LIBS_PRIVATE@ | |
| AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS | |
| @@ -60,21 +63,15 @@ if CURLDEBUG | |
| AM_CPPFLAGS += -DCURLDEBUG | |
| endif | |
| - | BUNDLE=tunits |
| + | AM_CPPFLAGS += -DCURL_NO_OLDIES -DCURL_DISABLE_DEPRECATION |
| if BUILD_UNITTESTS | |
| - | if USE_TEST_BUNDLES |
| - | tool_bundle.c: $(top_srcdir)/tests/mk-bundle.pl Makefile.inc |
| - | @PERL@ $(top_srcdir)/tests/mk-bundle.pl $(srcdir) > tool_bundle.c |
| + | $(BUNDLE_SRC): $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRSTFILES) $(UTILS) $(TESTFILES) |
| + | @PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(UTILS) --test $(TESTFILES) > $(BUNDLE_SRC) |
| noinst_PROGRAMS = $(BUNDLE) | |
| - | nodist_tunits_SOURCES = tool_bundle.c |
| - | CLEANFILES = tool_bundle.c |
| - | else |
| - | # Makefile.inc provides neat definitions |
| - | include Makefile.inc |
| - | noinst_PROGRAMS = $(TOOLPROGS) |
| - | endif |
| + | nodist_tunits_SOURCES = $(BUNDLE_SRC) |
| + | CLEANFILES = $(BUNDLE_SRC) |
| else | |
| noinst_PROGRAMS = | |
| endif | |
| @@ -87,7 +84,7 @@ CS_ = $(CS_0) | |
| # ignore generated C files since they play by slightly different rules! | |
| checksrc: | |
| $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ | |
| - | -W$(srcdir)/tool_bundle.c \ |
| + | -W$(srcdir)/$(BUNDLE_SRC) \ |
| $(srcdir)/*.[ch]) | |
| if NOT_CURL_CI | |
| @@ -21,18 +21,19 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| + | # Shared between CMakeLists.txt and Makefile.am |
| - | # these files are used in every single unit test program |
| + | BUNDLE = tunits |
| + | BUNDLE_SRC = tunits.c |
| - | FIRSTFILES = ../libtest/first.c |
| + | # Files referenced from the bundle source |
| + | FIRSTFILES = ../libtest/first.c ../libtest/first.h |
| - | TOOLFILES = $(FIRSTFILES) |
| + | # Common files used by test programs |
| + | UTILS = ../unit/curlcheck.h |
| - | # These are all tool unit test programs |
| - | TOOLPROGS = tool1394 tool1604 tool1621 |
| - | |
| - | tool1394_SOURCES = tool1394.c $(TOOLFILES) |
| - | |
| - | tool1604_SOURCES = tool1604.c $(TOOLFILES) |
| - | |
| - | tool1621_SOURCES = tool1621.c $(TOOLFILES) |
| + | # All tool unit test programs |
| + | TESTFILES = \ |
| + | tool1394.c \ |
| + | tool1604.c \ |
| + | tool1621.c |
| @@ -31,17 +31,9 @@ | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| + | static CURLcode test_tool1394(char *arg) |
| { | |
| - | |
| - | } |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| const char *values[] = { | |
| /* -E parameter */ /* exp. cert name */ /* exp. passphrase */ | |
| @@ -130,4 +122,5 @@ UNITTEST_START | |
| free(passphrase); | |
| } | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -32,18 +32,7 @@ | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| #if defined(_WIN32) || defined(MSDOS) | |
| - | |
| static char *getflagstr(int flags) | |
| { | |
| char *buf = malloc(256); | |
| @@ -71,16 +60,21 @@ static char *getcurlcodestr(int cc) | |
| } | |
| return buf; | |
| } | |
| + | #endif |
| - | struct data { |
| - | const char *input; |
| - | int flags; |
| - | const char *expected_output; |
| - | SANITIZEcode expected_result; |
| - | }; |
| + | static CURLcode test_tool1604(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| + | #if defined(_WIN32) || defined(MSDOS) |
| + | struct data { |
| + | const char *input; |
| + | int flags; |
| + | const char *expected_output; |
| + | SANITIZEcode expected_result; |
| + | }; |
| - | UNITTEST_START |
| - | { /* START sanitize_file_name */ |
| + | /* START sanitize_file_name */ |
| struct data data[] = { | |
| { "", 0, | |
| "", SANITIZE_ERR_OK | |
| @@ -256,13 +250,10 @@ UNITTEST_START | |
| free(received_ccstr); | |
| free(expected_ccstr); | |
| } | |
| - | } /* END sanitize_file_name */ |
| - | |
| + | /* END sanitize_file_name */ |
| #else | |
| - | UNITTEST_START |
| - | { |
| fprintf(stderr, "Skipped test not for this platform\n"); | |
| - | } |
| #endif /* _WIN32 || MSDOS */ | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -26,67 +26,64 @@ | |
| #include "urldata.h" | |
| #include "url.h" | |
| - | #include "memdebug.h" /* LAST include file */ |
| + | #include "tool_xattr.h" |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| + | #include "memdebug.h" /* LAST include file */ |
| - | static void unit_stop(void) |
| + | static CURLcode test_tool1621(char *arg) |
| { | |
| - | } |
| - | |
| - | #ifndef USE_XATTR |
| - | /* stripcredentials isn't available in this case */ |
| + | UNITTEST_BEGIN_SIMPLE |
| - | UNITTEST_START |
| - | UNITTEST_STOP |
| - | #else |
| + | #ifdef USE_XATTR /* Required for stripcredentials() */ |
| - | char *stripcredentials(const char *url); |
| + | struct checkthis { |
| + | const char *input; |
| + | const char *output; |
| + | }; |
| - | struct checkthis { |
| - | const char *input; |
| - | const char *output; |
| - | }; |
| - | |
| - | static const struct checkthis tests[] = { |
| - | { "ninja://[email protected]", "(null)" }, /* unsupported scheme */ |
| - | { "pop3s://[email protected]", "pop3s://example.com/" }, |
| - | { "ldap://[email protected]", "ldap://example.com/" }, |
| - | { "https://[email protected]", "https://example.com/" }, |
| - | { "https://localhost:45", "https://localhost:45/" }, |
| - | { "https://foo@localhost:45", "https://localhost:45/" }, |
| - | { "http://daniel:password@localhost", "http://localhost/" }, |
| - | { "http://daniel@localhost", "http://localhost/" }, |
| - | { "https://user:pass@localhost:45", "https://localhost:45/" }, |
| - | { "http://localhost/", "http://localhost/" }, |
| - | { "http://odd%40host/", "(null)" }, /* bad host */ |
| - | { "http://user@odd%40host/", "(null)" }, /* bad host */ |
| - | { "http://host/@path/", "http://host/@path/" }, |
| - | { "http://emptypw:@host/", "http://host/" }, |
| - | { "http://:emptyuser@host/", "http://host/" }, |
| - | { "http://odd%40user@host/", "http://host/" }, |
| - | { "http://only%40one%40host/", "(null)" }, /* bad host */ |
| - | { "http://odder%3auser@host/", "http://host/" }, |
| - | { NULL, NULL } /* end marker */ |
| - | }; |
| + | static const struct checkthis tests[] = { |
| + | { "ninja://[email protected]", "(null)" }, /* unsupported scheme */ |
| + | #if defined(USE_SSL) && !defined(CURL_DISABLE_POP3) |
| + | { "pop3s://[email protected]", "pop3s://example.com/" }, |
| + | #endif |
| + | #ifndef CURL_DISABLE_LDAP |
| + | { "ldap://[email protected]", "ldap://example.com/" }, |
| + | #endif |
| + | #if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP) |
| + | { "https://[email protected]", "https://example.com/" }, |
| + | { "https://localhost:45", "https://localhost:45/" }, |
| + | { "https://foo@localhost:45", "https://localhost:45/" }, |
| + | { "https://user:pass@localhost:45", "https://localhost:45/" }, |
| + | #endif |
| + | #ifndef CURL_DISABLE_HTTP |
| + | { "http://daniel:password@localhost", "http://localhost/" }, |
| + | { "http://daniel@localhost", "http://localhost/" }, |
| + | { "http://localhost/", "http://localhost/" }, |
| + | { "http://odd%40host/", "(null)" }, /* bad host */ |
| + | { "http://user@odd%40host/", "(null)" }, /* bad host */ |
| + | { "http://host/@path/", "http://host/@path/" }, |
| + | { "http://emptypw:@host/", "http://host/" }, |
| + | { "http://:emptyuser@host/", "http://host/" }, |
| + | { "http://odd%40user@host/", "http://host/" }, |
| + | { "http://only%40one%40host/", "(null)" }, /* bad host */ |
| + | { "http://odder%3auser@host/", "http://host/" }, |
| + | #endif |
| + | { NULL, NULL } /* end marker */ |
| + | }; |
| - | UNITTEST_START |
| - | { |
| int i; | |
| for(i = 0; tests[i].input; i++) { | |
| const char *url = tests[i].input; | |
| char *stripped = stripcredentials(url); | |
| - | char *strippedstr = stripped ? stripped : "(null)"; |
| - | printf("Test %u got input \"%s\", output: \"%s\"\n", |
| - | i, tests[i].input, strippedstr); |
| + | const char *strippedstr = stripped ? stripped : "(null)"; |
| + | printf("Test %u got input \"%s\", output: \"%s\", expected: \"%s\"\n", |
| + | i, tests[i].input, strippedstr, tests[i].output); |
| fail_if(strcmp(tests[i].output, strippedstr), tests[i].output); | |
| curl_free(stripped); | |
| } | |
| - | } |
| - | UNITTEST_STOP |
| #endif | |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -2,6 +2,5 @@ | |
| # | |
| # SPDX-License-Identifier: curl | |
| - | /unit[0-9][0-9][0-9][0-9] |
| - | unit_bundle.c |
| units | |
| + | units.c |
| @@ -22,42 +22,29 @@ | |
| # | |
| ########################################################################### | |
| - | # Get 'UNITPROGS', '*_SOURCES', 'FIRSTFILES' variables |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, TESTFILES variables |
| curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") | |
| - | if(CURL_TEST_BUNDLES) |
| - | add_custom_command( |
| - | OUTPUT "unit_bundle.c" |
| - | COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tests/mk-bundle.pl" "${CMAKE_CURRENT_SOURCE_DIR}" > "unit_bundle.c" |
| - | DEPENDS |
| - | "${PROJECT_SOURCE_DIR}/tests/mk-bundle.pl" ${FIRSTFILES} |
| - | "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" |
| - | VERBATIM) |
| + | add_custom_command( |
| + | OUTPUT "${BUNDLE_SRC}" |
| + | COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --test ${TESTFILES} |
| + | ${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}" |
| + | DEPENDS |
| + | "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc" ${FIRSTFILES} ${TESTFILES} |
| + | VERBATIM) |
| - | set(UNITPROGS "units") |
| - | set(units_SOURCES "unit_bundle.c") |
| - | endif() |
| - | |
| - | foreach(_target IN LISTS UNITPROGS) |
| - | set(_target_name "${_target}") |
| - | add_executable(${_target_name} EXCLUDE_FROM_ALL ${${_target}_SOURCES}) |
| - | add_dependencies(testdeps ${_target_name}) |
| - | target_link_libraries(${_target_name} curltool curlu) |
| - | target_include_directories(${_target_name} PRIVATE |
| - | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| - | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| - | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| - | "${PROJECT_SOURCE_DIR}/src" |
| - | "${PROJECT_SOURCE_DIR}/tests/libtest" |
| - | ) |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}") |
| - | # unit tests are small pretend-libcurl-programs |
| - | set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "BUILDING_LIBCURL") |
| - | if(CURL_TEST_BUNDLES) |
| - | target_include_directories(${_target_name} PRIVATE "${PROJECT_SOURCE_DIR}/tests/unit") |
| - | endif() |
| - | set_target_properties(${_target_name} PROPERTIES |
| - | OUTPUT_NAME "${_target}" |
| - | PROJECT_LABEL "Test unit ${_target}") |
| - | endforeach() |
| + | add_executable(units EXCLUDE_FROM_ALL ${UTILS} "${BUNDLE_SRC}") |
| + | add_dependencies(testdeps units) |
| + | target_link_libraries(units curltool curlu) |
| + | target_include_directories(units PRIVATE |
| + | "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" |
| + | "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" |
| + | "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx |
| + | "${PROJECT_SOURCE_DIR}/src" |
| + | "${PROJECT_SOURCE_DIR}/tests/libtest" |
| + | "${PROJECT_SOURCE_DIR}/tests/unit" |
| + | ) |
| + | set_property(TARGET units APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}" "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION") |
| + | set_property(TARGET units APPEND PROPERTY COMPILE_DEFINITIONS "BUILDING_LIBCURL") # unit tests are small pretend-libcurl-programs |
| + | set_target_properties(units PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}") |
| @@ -40,7 +40,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \ | |
| -I$(top_srcdir)/tests/libtest \ | |
| -I$(top_srcdir)/tests/unit | |
| - | EXTRA_DIST = CMakeLists.txt README.md |
| + | # Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, TESTFILES variables |
| + | include Makefile.inc |
| + | |
| + | EXTRA_DIST = CMakeLists.txt README.md $(UTILS) $(TESTFILES) |
| CFLAGS += @CURL_CFLAG_EXTRAS@ | |
| @@ -58,21 +61,15 @@ if CURLDEBUG | |
| AM_CPPFLAGS += -DCURLDEBUG | |
| endif | |
| - | BUNDLE=units |
| + | AM_CPPFLAGS += -DCURL_NO_OLDIES -DCURL_DISABLE_DEPRECATION |
| if BUILD_UNITTESTS | |
| - | if USE_TEST_BUNDLES |
| - | unit_bundle.c: $(top_srcdir)/tests/mk-bundle.pl Makefile.inc |
| - | @PERL@ $(top_srcdir)/tests/mk-bundle.pl $(srcdir) > unit_bundle.c |
| + | $(BUNDLE_SRC): $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRSTFILES) $(UTILS) $(TESTFILES) |
| + | @PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(UTILS) --test $(TESTFILES) > $(BUNDLE_SRC) |
| noinst_PROGRAMS = $(BUNDLE) | |
| - | nodist_units_SOURCES = unit_bundle.c |
| - | CLEANFILES = unit_bundle.c |
| - | else |
| - | # Makefile.inc provides neat definitions |
| - | include Makefile.inc |
| - | noinst_PROGRAMS = $(UNITPROGS) |
| - | endif |
| + | nodist_units_SOURCES = $(BUNDLE_SRC) |
| + | CLEANFILES = $(BUNDLE_SRC) |
| else | |
| noinst_PROGRAMS = | |
| endif | |
| @@ -85,7 +82,7 @@ CS_ = $(CS_0) | |
| # ignore generated C files since they play by slightly different rules! | |
| checksrc: | |
| $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ | |
| - | -W$(srcdir)/unit_bundle.c \ |
| + | -W$(srcdir)/$(BUNDLE_SRC) \ |
| $(srcdir)/*.[ch]) | |
| if NOT_CURL_CI | |
| @@ -21,138 +21,31 @@ | |
| # SPDX-License-Identifier: curl | |
| # | |
| ########################################################################### | |
| - | |
| - | # these files are used in every single unit test program |
| - | |
| - | FIRSTFILES = \ |
| - | ../libtest/first.c \ |
| - | ../libtest/first.h |
| - | |
| - | UNITFILES = curlcheck.h $(FIRSTFILES) |
| - | |
| - | # These are all unit test programs |
| - | UNITPROGS = unit1300 unit1302 unit1303 unit1304 unit1305 unit1307 \ |
| - | unit1309 unit1323 \ |
| - | unit1330 unit1395 unit1396 unit1397 unit1398 \ |
| - | unit1399 \ |
| - | unit1600 unit1601 unit1602 unit1603 unit1605 unit1606 unit1607 \ |
| - | unit1608 unit1609 unit1610 unit1611 unit1612 unit1614 unit1615 unit1616 \ |
| - | unit1620 \ |
| - | unit1650 unit1651 unit1652 unit1653 unit1654 unit1655 unit1656 unit1657 \ |
| - | unit1658 \ |
| - | unit1660 unit1661 unit1663 unit1664 \ |
| - | unit1979 unit1980 \ |
| - | unit2600 unit2601 unit2602 unit2603 unit2604 \ |
| - | unit3200 \ |
| - | unit3205 \ |
| - | unit3211 unit3212 unit3213 |
| - | |
| - | unit1300_SOURCES = unit1300.c $(UNITFILES) |
| - | |
| - | unit1302_SOURCES = unit1302.c $(UNITFILES) |
| - | |
| - | unit1303_SOURCES = unit1303.c $(UNITFILES) |
| - | |
| - | unit1304_SOURCES = unit1304.c $(UNITFILES) |
| - | |
| - | unit1305_SOURCES = unit1305.c $(UNITFILES) |
| - | |
| - | unit1307_SOURCES = unit1307.c $(UNITFILES) |
| - | |
| - | unit1309_SOURCES = unit1309.c $(UNITFILES) |
| - | |
| - | unit1323_SOURCES = unit1323.c $(UNITFILES) |
| - | |
| - | unit1330_SOURCES = unit1330.c $(UNITFILES) |
| - | |
| - | unit1395_SOURCES = unit1395.c $(UNITFILES) |
| - | |
| - | unit1396_SOURCES = unit1396.c $(UNITFILES) |
| - | |
| - | unit1397_SOURCES = unit1397.c $(UNITFILES) |
| - | |
| - | unit1398_SOURCES = unit1398.c $(UNITFILES) |
| - | |
| - | unit1399_SOURCES = unit1399.c $(UNITFILES) |
| - | |
| - | unit1600_SOURCES = unit1600.c $(UNITFILES) |
| - | |
| - | unit1601_SOURCES = unit1601.c $(UNITFILES) |
| - | |
| - | unit1602_SOURCES = unit1602.c $(UNITFILES) |
| - | |
| - | unit1603_SOURCES = unit1603.c $(UNITFILES) |
| - | |
| - | unit1605_SOURCES = unit1605.c $(UNITFILES) |
| - | |
| - | unit1606_SOURCES = unit1606.c $(UNITFILES) |
| - | |
| - | unit1607_SOURCES = unit1607.c $(UNITFILES) |
| - | |
| - | unit1608_SOURCES = unit1608.c $(UNITFILES) |
| - | |
| - | unit1609_SOURCES = unit1609.c $(UNITFILES) |
| - | |
| - | unit1610_SOURCES = unit1610.c $(UNITFILES) |
| - | |
| - | unit1611_SOURCES = unit1611.c $(UNITFILES) |
| - | |
| - | unit1612_SOURCES = unit1612.c $(UNITFILES) |
| - | |
| - | unit1614_SOURCES = unit1614.c $(UNITFILES) |
| - | |
| - | unit1615_SOURCES = unit1615.c $(UNITFILES) |
| - | |
| - | unit1616_SOURCES = unit1616.c $(UNITFILES) |
| - | |
| - | unit1620_SOURCES = unit1620.c $(UNITFILES) |
| - | |
| - | unit1650_SOURCES = unit1650.c $(UNITFILES) |
| - | |
| - | unit1651_SOURCES = unit1651.c $(UNITFILES) |
| - | |
| - | unit1652_SOURCES = unit1652.c $(UNITFILES) |
| - | |
| - | unit1653_SOURCES = unit1653.c $(UNITFILES) |
| - | |
| - | unit1654_SOURCES = unit1654.c $(UNITFILES) |
| - | |
| - | unit1655_SOURCES = unit1655.c $(UNITFILES) |
| - | |
| - | unit1656_SOURCES = unit1656.c $(UNITFILES) |
| - | |
| - | unit1657_SOURCES = unit1657.c $(UNITFILES) |
| - | |
| - | unit1658_SOURCES = unit1658.c $(UNITFILES) |
| - | |
| - | unit1660_SOURCES = unit1660.c $(UNITFILES) |
| - | |
| - | unit1661_SOURCES = unit1661.c $(UNITFILES) |
| - | |
| - | unit1663_SOURCES = unit1663.c $(UNITFILES) |
| - | |
| - | unit1664_SOURCES = unit1664.c $(UNITFILES) |
| - | |
| - | unit1979_SOURCES = unit1979.c $(UNITFILES) |
| - | |
| - | unit1980_SOURCES = unit1980.c $(UNITFILES) |
| - | |
| - | unit2600_SOURCES = unit2600.c $(UNITFILES) |
| - | |
| - | unit2601_SOURCES = unit2601.c $(UNITFILES) |
| - | |
| - | unit2602_SOURCES = unit2602.c $(UNITFILES) |
| - | |
| - | unit2603_SOURCES = unit2603.c $(UNITFILES) |
| - | |
| - | unit2604_SOURCES = unit2604.c $(UNITFILES) |
| - | |
| - | unit3200_SOURCES = unit3200.c $(UNITFILES) |
| - | |
| - | unit3205_SOURCES = unit3205.c $(UNITFILES) |
| - | |
| - | unit3211_SOURCES = unit3211.c $(UNITFILES) |
| - | |
| - | unit3212_SOURCES = unit3212.c $(UNITFILES) |
| - | |
| - | unit3213_SOURCES = unit3213.c $(UNITFILES) |
| + | # Shared between CMakeLists.txt and Makefile.am |
| + | |
| + | BUNDLE = units |
| + | BUNDLE_SRC = units.c |
| + | |
| + | # Files referenced from the bundle source |
| + | FIRSTFILES = ../libtest/first.c ../libtest/first.h |
| + | |
| + | # Common files used by test programs |
| + | UTILS = curlcheck.h |
| + | |
| + | # All unit test programs |
| + | TESTFILES = \ |
| + | unit1300.c unit1302.c unit1303.c unit1304.c unit1305.c unit1307.c \ |
| + | unit1309.c unit1323.c \ |
| + | unit1330.c unit1395.c unit1396.c unit1397.c unit1398.c \ |
| + | unit1399.c \ |
| + | unit1600.c unit1601.c unit1602.c unit1603.c unit1605.c unit1606.c unit1607.c \ |
| + | unit1608.c unit1609.c unit1610.c unit1611.c unit1612.c unit1614.c unit1615.c unit1616.c \ |
| + | unit1620.c \ |
| + | unit1650.c unit1651.c unit1652.c unit1653.c unit1654.c unit1655.c unit1656.c unit1657.c \ |
| + | unit1658.c \ |
| + | unit1660.c unit1661.c unit1663.c unit1664.c \ |
| + | unit1979.c unit1980.c \ |
| + | unit2600.c unit2601.c unit2602.c unit2603.c unit2604.c \ |
| + | unit3200.c \ |
| + | unit3205.c \ |
| + | unit3211.c unit3212.c unit3213.c |
| @@ -45,7 +45,27 @@ and the `tests/FILEFORMAT.md` documentation. | |
| For the actual C file, here's a simple example: | |
| ~~~c | |
| + | #include "curlcheck.h" |
| + | |
| + | #include "a libcurl header.h" /* from the lib dir */ |
| + | |
| + | static CURLcode test_unit9998(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | /* here you start doing things and checking that the results are good */ |
| + | |
| + | fail_unless( size == 0 , "initial size should be zero" ); |
| + | fail_if( head == NULL , "head should not be initiated to NULL" ); |
| + | |
| + | /* you end the test code like this: */ |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| + | ~~~ |
| + | |
| + | Here's an example using optional initialization and cleanup: |
| + | ~~~c |
| #include "curlcheck.h" | |
| #include "a libcurl header.h" /* from the lib dir */ | |
| @@ -61,7 +81,9 @@ For the actual C file, here's a simple example: | |
| /* done before shutting down and exiting */ | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit9999(char *arg) |
| + | { |
| + | UNITTEST_BEGIN(unit_setup()) |
| /* here you start doing things and checking that the results are good */ | |
| @@ -70,4 +92,6 @@ For the actual C file, here's a simple example: | |
| /* you end the test code like this: */ | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(unit_stop()) |
| + | } |
| + | ~~~ |
| @@ -92,19 +92,27 @@ | |
| } while(0) | |
| - | #define UNITTEST_START \ |
| - | CURLcode test(char *arg) \ |
| - | { \ |
| - | (void)arg; \ |
| - | if(unit_setup()) { \ |
| - | fail("unit_setup() FAILURE"); \ |
| - | } \ |
| - | else { |
| + | #define UNITTEST_BEGIN_SIMPLE \ |
| + | (void)arg; \ |
| + | { |
| - | #define UNITTEST_STOP \ |
| + | #define UNITTEST_END_SIMPLE \ |
| goto unit_test_abort; /* avoid warning */ \ | |
| + | } \ |
| unit_test_abort: \ | |
| - | unit_stop(); \ |
| + | return (CURLcode)unitfail; |
| + | |
| + | #define UNITTEST_BEGIN(setupfunc) \ |
| + | (void)arg; \ |
| + | if(setupfunc) { \ |
| + | fail("unit_setup() FAILURE"); \ |
| + | return (CURLcode)unitfail; \ |
| + | } \ |
| + | { |
| + | |
| + | #define UNITTEST_END(stopfunc) \ |
| + | goto unit_test_abort; /* avoid warning */ \ |
| } \ | |
| - | return (CURLcode)unitfail; \ |
| - | } |
| + | unit_test_abort: \ |
| + | stopfunc; \ |
| + | return (CURLcode)unitfail; |
| @@ -25,10 +25,6 @@ | |
| #include "llist.h" | |
| - | static struct Curl_llist llist; |
| - | |
| - | static struct Curl_llist llist_destination; |
| - | |
| static void test_Curl_llist_dtor(void *key, void *value) | |
| { | |
| /* used by the llist API, does nothing here */ | |
| @@ -36,19 +32,13 @@ static void test_Curl_llist_dtor(void *key, void *value) | |
| (void)value; | |
| } | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1300(char *arg) |
| { | |
| - | Curl_llist_init(&llist, test_Curl_llist_dtor); |
| - | Curl_llist_init(&llist_destination, test_Curl_llist_dtor); |
| - | return CURLE_OK; |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | struct Curl_llist llist; |
| + | struct Curl_llist llist_destination; |
| - | UNITTEST_START |
| - | { |
| int unusedData_case1 = 1; | |
| int unusedData_case2 = 2; | |
| int unusedData_case3 = 3; | |
| @@ -62,6 +52,9 @@ UNITTEST_START | |
| struct Curl_llist_node *to_remove; | |
| size_t llist_size; | |
| + | Curl_llist_init(&llist, test_Curl_llist_dtor); |
| + | Curl_llist_init(&llist_destination, test_Curl_llist_dtor); |
| + | |
| /** | |
| * testing llist_init | |
| * case 1: | |
| @@ -271,5 +264,6 @@ UNITTEST_START | |
| Curl_llist_destroy(&llist, NULL); | |
| Curl_llist_destroy(&llist_destination, NULL); | |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| @@ -28,164 +28,145 @@ | |
| #include "curlx/base64.h" | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static struct Curl_easy *t1302_easy; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1302(char *arg) |
| { | |
| - | CURLcode res = CURLE_OK; |
| - | |
| - | global_init(CURL_GLOBAL_ALL); |
| - | t1302_easy = curl_easy_init(); |
| - | if(!t1302_easy) { |
| - | curl_global_cleanup(); |
| - | return CURLE_OUT_OF_MEMORY; |
| - | } |
| - | return res; |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| + | char *output; |
| + | unsigned char *decoded; |
| + | size_t size = 0; |
| + | unsigned char anychar = 'x'; |
| + | CURLcode rc; |
| + | |
| + | rc = curlx_base64_encode("i", 1, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 4, "size should be 4"); |
| + | verify_memory(output, "aQ==", 4); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64_encode("ii", 2, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 4, "size should be 4"); |
| + | verify_memory(output, "aWk=", 4); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64_encode("iii", 3, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 4, "size should be 4"); |
| + | verify_memory(output, "aWlp", 4); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64_encode("iiii", 4, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 8, "size should be 8"); |
| + | verify_memory(output, "aWlpaQ==", 8); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64_encode("\xff\x01\xfe\x02", 4, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 8, "size should be 8"); |
| + | verify_memory(output, "/wH+Ag==", 8); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64url_encode("\xff\x01\xfe\x02", 4, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 6, "size should be 6"); |
| + | verify_memory(output, "_wH-Ag", 6); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64url_encode("iiii", 4, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 6, "size should be 6"); |
| + | verify_memory(output, "aWlpaQ", 6); |
| + | Curl_safefree(output); |
| + | |
| + | /* 0 length makes it do strlen() */ |
| + | rc = curlx_base64_encode("iiii", 0, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 8, "size should be 8"); |
| + | verify_memory(output, "aWlpaQ==", 8); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64_encode("", 0, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 0, "size should be 0"); |
| + | fail_unless(output && !output[0], "output should be a zero-length string"); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64url_encode("", 0, &output, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 0, "size should be 0"); |
| + | fail_unless(output && !output[0], "output should be a zero-length string"); |
| + | Curl_safefree(output); |
| + | |
| + | rc = curlx_base64_decode("aWlpaQ==", &decoded, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 4, "size should be 4"); |
| + | verify_memory(decoded, "iiii", 4); |
| + | Curl_safefree(decoded); |
| + | |
| + | rc = curlx_base64_decode("aWlp", &decoded, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 3, "size should be 3"); |
| + | verify_memory(decoded, "iii", 3); |
| + | Curl_safefree(decoded); |
| + | |
| + | rc = curlx_base64_decode("aWk=", &decoded, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 2, "size should be 2"); |
| + | verify_memory(decoded, "ii", 2); |
| + | Curl_safefree(decoded); |
| + | |
| + | rc = curlx_base64_decode("aQ==", &decoded, &size); |
| + | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| + | fail_unless(size == 1, "size should be 1"); |
| + | verify_memory(decoded, "i", 2); |
| + | Curl_safefree(decoded); |
| + | |
| + | /* This is illegal input as the data is too short */ |
| + | size = 1; /* not zero */ |
| + | decoded = &anychar; /* not NULL */ |
| + | rc = curlx_base64_decode("aQ", &decoded, &size); |
| + | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| + | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| + | fail_unless(size == 0, "size should be 0"); |
| + | fail_if(decoded, "returned pointer should be NULL"); |
| + | |
| + | /* This is illegal input as it contains three padding characters */ |
| + | size = 1; /* not zero */ |
| + | decoded = &anychar; /* not NULL */ |
| + | rc = curlx_base64_decode("a===", &decoded, &size); |
| + | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| + | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| + | fail_unless(size == 0, "size should be 0"); |
| + | fail_if(decoded, "returned pointer should be NULL"); |
| + | |
| + | /* This is illegal input as it contains a padding character mid input */ |
| + | size = 1; /* not zero */ |
| + | decoded = &anychar; /* not NULL */ |
| + | rc = curlx_base64_decode("a=Q=", &decoded, &size); |
| + | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| + | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| + | fail_unless(size == 0, "size should be 0"); |
| + | fail_if(decoded, "returned pointer should be NULL"); |
| + | |
| + | /* This is also illegal input as it contains a padding character mid input */ |
| + | size = 1; /* not zero */ |
| + | decoded = &anychar; /* not NULL */ |
| + | rc = curlx_base64_decode("aWlpa=Q=", &decoded, &size); |
| + | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| + | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| + | fail_unless(size == 0, "size should be 0"); |
| + | fail_if(decoded, "returned pointer should be NULL"); |
| + | |
| + | /* This is garbage input as it contains an illegal base64 character */ |
| + | size = 1; /* not zero */ |
| + | decoded = &anychar; /* not NULL */ |
| + | rc = curlx_base64_decode("a\x1f==", &decoded, &size); |
| + | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| + | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| + | fail_unless(size == 0, "size should be 0"); |
| + | fail_if(decoded, "returned pointer should be NULL"); |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_easy_cleanup(t1302_easy); |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| - | UNITTEST_START |
| - | |
| - | char *output; |
| - | unsigned char *decoded; |
| - | size_t size = 0; |
| - | unsigned char anychar = 'x'; |
| - | CURLcode rc; |
| - | |
| - | rc = curlx_base64_encode("i", 1, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 4, "size should be 4"); |
| - | verify_memory(output, "aQ==", 4); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64_encode("ii", 2, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 4, "size should be 4"); |
| - | verify_memory(output, "aWk=", 4); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64_encode("iii", 3, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 4, "size should be 4"); |
| - | verify_memory(output, "aWlp", 4); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64_encode("iiii", 4, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 8, "size should be 8"); |
| - | verify_memory(output, "aWlpaQ==", 8); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64_encode("\xff\x01\xfe\x02", 4, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 8, "size should be 8"); |
| - | verify_memory(output, "/wH+Ag==", 8); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64url_encode("\xff\x01\xfe\x02", 4, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 6, "size should be 6"); |
| - | verify_memory(output, "_wH-Ag", 6); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64url_encode("iiii", 4, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 6, "size should be 6"); |
| - | verify_memory(output, "aWlpaQ", 6); |
| - | Curl_safefree(output); |
| - | |
| - | /* 0 length makes it do strlen() */ |
| - | rc = curlx_base64_encode("iiii", 0, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 8, "size should be 8"); |
| - | verify_memory(output, "aWlpaQ==", 8); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64_encode("", 0, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 0, "size should be 0"); |
| - | fail_unless(output && !output[0], "output should be a zero-length string"); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64url_encode("", 0, &output, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 0, "size should be 0"); |
| - | fail_unless(output && !output[0], "output should be a zero-length string"); |
| - | Curl_safefree(output); |
| - | |
| - | rc = curlx_base64_decode("aWlpaQ==", &decoded, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 4, "size should be 4"); |
| - | verify_memory(decoded, "iiii", 4); |
| - | Curl_safefree(decoded); |
| - | |
| - | rc = curlx_base64_decode("aWlp", &decoded, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 3, "size should be 3"); |
| - | verify_memory(decoded, "iii", 3); |
| - | Curl_safefree(decoded); |
| - | |
| - | rc = curlx_base64_decode("aWk=", &decoded, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 2, "size should be 2"); |
| - | verify_memory(decoded, "ii", 2); |
| - | Curl_safefree(decoded); |
| - | |
| - | rc = curlx_base64_decode("aQ==", &decoded, &size); |
| - | fail_unless(rc == CURLE_OK, "return code should be CURLE_OK"); |
| - | fail_unless(size == 1, "size should be 1"); |
| - | verify_memory(decoded, "i", 2); |
| - | Curl_safefree(decoded); |
| - | |
| - | /* This is illegal input as the data is too short */ |
| - | size = 1; /* not zero */ |
| - | decoded = &anychar; /* not NULL */ |
| - | rc = curlx_base64_decode("aQ", &decoded, &size); |
| - | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| - | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| - | fail_unless(size == 0, "size should be 0"); |
| - | fail_if(decoded, "returned pointer should be NULL"); |
| - | |
| - | /* This is illegal input as it contains three padding characters */ |
| - | size = 1; /* not zero */ |
| - | decoded = &anychar; /* not NULL */ |
| - | rc = curlx_base64_decode("a===", &decoded, &size); |
| - | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| - | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| - | fail_unless(size == 0, "size should be 0"); |
| - | fail_if(decoded, "returned pointer should be NULL"); |
| - | |
| - | /* This is illegal input as it contains a padding character mid input */ |
| - | size = 1; /* not zero */ |
| - | decoded = &anychar; /* not NULL */ |
| - | rc = curlx_base64_decode("a=Q=", &decoded, &size); |
| - | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| - | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| - | fail_unless(size == 0, "size should be 0"); |
| - | fail_if(decoded, "returned pointer should be NULL"); |
| - | |
| - | /* This is also illegal input as it contains a padding character mid input */ |
| - | size = 1; /* not zero */ |
| - | decoded = &anychar; /* not NULL */ |
| - | rc = curlx_base64_decode("aWlpa=Q=", &decoded, &size); |
| - | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| - | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| - | fail_unless(size == 0, "size should be 0"); |
| - | fail_if(decoded, "returned pointer should be NULL"); |
| - | |
| - | /* This is garbage input as it contains an illegal base64 character */ |
| - | size = 1; /* not zero */ |
| - | decoded = &anychar; /* not NULL */ |
| - | rc = curlx_base64_decode("a\x1f==", &decoded, &size); |
| - | fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, |
| - | "return code should be CURLE_BAD_CONTENT_ENCODING"); |
| - | fail_unless(size == 0, "size should be 0"); |
| - | fail_if(decoded, "returned pointer should be NULL"); |
| - | |
| - | |
| - | UNITTEST_STOP |
| @@ -27,24 +27,22 @@ | |
| #include "connect.h" | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static struct Curl_easy *t1303_easy; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1303_setup(struct Curl_easy **easy) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| - | t1303_easy = curl_easy_init(); |
| - | if(!t1303_easy) { |
| + | *easy = curl_easy_init(); |
| + | if(!*easy) { |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1303_stop(struct Curl_easy *easy) |
| { | |
| - | curl_easy_cleanup(t1303_easy); |
| + | curl_easy_cleanup(easy); |
| curl_global_cleanup(); | |
| } | |
| @@ -55,8 +53,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) t1303_easy->set.timeout = x; \ |
| - | t1303_easy->set.connecttimeout = y |
| + | #define TIMEOUTS(x,y) easy->set.timeout = x; \ |
| + | easy->set.connecttimeout = y |
| /* | |
| * To test: | |
| @@ -67,21 +65,25 @@ static void unit_stop(void) | |
| * N various values of now | |
| */ | |
| - | struct timetest { |
| - | int now_s; |
| - | int now_us; |
| - | unsigned int timeout_ms; |
| - | unsigned int connecttimeout_ms; |
| - | bool connecting; |
| - | timediff_t result; |
| - | const char *comment; |
| - | }; |
| - | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1303(char *arg) |
| { | |
| + | struct Curl_easy *easy; |
| + | |
| + | UNITTEST_BEGIN(t1303_setup(&easy)) |
| + | |
| struct curltime now; | |
| unsigned int i; | |
| + | struct timetest { |
| + | int now_s; |
| + | int now_us; |
| + | unsigned int timeout_ms; |
| + | unsigned int connecttimeout_ms; |
| + | bool connecting; |
| + | timediff_t result; |
| + | const char *comment; |
| + | }; |
| + | |
| const struct timetest run[] = { | |
| /* both timeouts set, not connecting */ | |
| {BASE + 4, 0, 10000, 8000, FALSE, 6000, "6 seconds should be left"}, | |
| @@ -137,18 +139,19 @@ UNITTEST_START | |
| }; | |
| /* this is the pretended start time of the transfer */ | |
| - | 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; |
| + | easy->progress.t_startsingle.tv_sec = BASE; |
| + | easy->progress.t_startsingle.tv_usec = 0; |
| + | easy->progress.t_startop.tv_sec = BASE; |
| + | 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(t1303_easy, &now, run[i].connecting); |
| + | timeout = Curl_timeleft(easy, &now, run[i].connecting); |
| if(timeout != run[i].result) | |
| fail(run[i].comment); | |
| } | |
| + | |
| + | UNITTEST_END(t1303_stop(easy)) |
| } | |
| - | UNITTEST_STOP |
| @@ -27,24 +27,19 @@ | |
| #ifndef CURL_DISABLE_NETRC | |
| - | static char *s_login; |
| - | static char *s_password; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static void t1304_stop(char **password, char **login) |
| { | |
| - | s_password = NULL; |
| - | s_login = NULL; |
| - | return CURLE_OK; |
| + | Curl_safefree(*password); |
| + | Curl_safefree(*login); |
| } | |
| - | static void unit_stop(void) |
| + | static CURLcode test_unit1304(char *arg) |
| { | |
| - | Curl_safefree(s_password); |
| - | Curl_safefree(s_login); |
| - | } |
| + | char *login = NULL; |
| + | char *password = NULL; |
| + | |
| + | UNITTEST_BEGIN_SIMPLE |
| - | UNITTEST_START |
| - | { |
| int result; | |
| struct store_netrc store; | |
| @@ -53,142 +48,140 @@ UNITTEST_START | |
| */ | |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "test.example.com", &s_login, &s_password, arg); |
| + | "test.example.com", &login, &password, arg); |
| fail_unless(result == 1, "Host not found should return 1"); | |
| - | abort_unless(s_password == NULL, "password did not return NULL!"); |
| - | abort_unless(s_login == NULL, "user did not return NULL!"); |
| + | abort_unless(password == NULL, "password did not return NULL!"); |
| + | abort_unless(login == NULL, "user did not return NULL!"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test a non existent login in our netrc file. | |
| */ | |
| - | s_login = (char *)CURL_UNCONST("me"); |
| + | login = (char *)CURL_UNCONST("me"); |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "example.com", &s_login, &s_password, arg); |
| + | "example.com", &login, &password, arg); |
| fail_unless(result == 0, "Host should have been found"); | |
| - | abort_unless(s_password == NULL, "password is not NULL!"); |
| + | abort_unless(password == NULL, "password is not NULL!"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test a non existent login and host in our netrc file. | |
| */ | |
| - | s_login = (char *)CURL_UNCONST("me"); |
| + | login = (char *)CURL_UNCONST("me"); |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "test.example.com", &s_login, &s_password, arg); |
| + | "test.example.com", &login, &password, arg); |
| fail_unless(result == 1, "Host not found should return 1"); | |
| - | abort_unless(s_password == NULL, "password is not NULL!"); |
| + | abort_unless(password == NULL, "password is not NULL!"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test a non existent login (substring of an existing one) in our | |
| * netrc file. | |
| */ | |
| - | s_login = (char *)CURL_UNCONST("admi"); |
| + | login = (char *)CURL_UNCONST("admi"); |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "example.com", &s_login, &s_password, arg); |
| + | "example.com", &login, &password, arg); |
| fail_unless(result == 0, "Host should have been found"); | |
| - | abort_unless(s_password == NULL, "password is not NULL!"); |
| + | abort_unless(password == NULL, "password is not NULL!"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test a non existent login (superstring of an existing one) | |
| * in our netrc file. | |
| */ | |
| - | s_login = (char *)CURL_UNCONST("adminn"); |
| + | login = (char *)CURL_UNCONST("adminn"); |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "example.com", &s_login, &s_password, arg); |
| + | "example.com", &login, &password, arg); |
| fail_unless(result == 0, "Host should have been found"); | |
| - | abort_unless(s_password == NULL, "password is not NULL!"); |
| + | abort_unless(password == NULL, "password is not NULL!"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test for the first existing host in our netrc file | |
| - | * with s_login[0] = 0. |
| + | * with login[0] = 0. |
| */ | |
| - | s_login = NULL; |
| + | login = NULL; |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "example.com", &s_login, &s_password, arg); |
| + | "example.com", &login, &password, arg); |
| fail_unless(result == 0, "Host should have been found"); | |
| - | abort_unless(s_password != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_password, "passwd", 6) == 0, |
| + | abort_unless(password != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(password, "passwd", 6) == 0, |
| "password should be 'passwd'"); | |
| - | abort_unless(s_login != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_login, "admin", 5) == 0, "login should be 'admin'"); |
| + | abort_unless(login != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(login, "admin", 5) == 0, "login should be 'admin'"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test for the first existing host in our netrc file | |
| - | * with s_login[0] != 0. |
| + | * with login[0] != 0. |
| */ | |
| - | free(s_password); |
| - | free(s_login); |
| - | s_password = NULL; |
| - | s_login = NULL; |
| + | free(password); |
| + | free(login); |
| + | password = NULL; |
| + | login = NULL; |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "example.com", &s_login, &s_password, arg); |
| + | "example.com", &login, &password, arg); |
| fail_unless(result == 0, "Host should have been found"); | |
| - | abort_unless(s_password != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_password, "passwd", 6) == 0, |
| + | abort_unless(password != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(password, "passwd", 6) == 0, |
| "password should be 'passwd'"); | |
| - | abort_unless(s_login != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_login, "admin", 5) == 0, "login should be 'admin'"); |
| + | abort_unless(login != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(login, "admin", 5) == 0, "login should be 'admin'"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test for the second existing host in our netrc file | |
| - | * with s_login[0] = 0. |
| + | * with login[0] = 0. |
| */ | |
| - | free(s_password); |
| - | s_password = NULL; |
| - | free(s_login); |
| - | s_login = NULL; |
| + | free(password); |
| + | password = NULL; |
| + | free(login); |
| + | login = NULL; |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "curl.example.com", &s_login, &s_password, arg); |
| + | "curl.example.com", &login, &password, arg); |
| fail_unless(result == 0, "Host should have been found"); | |
| - | abort_unless(s_password != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_password, "none", 4) == 0, |
| + | abort_unless(password != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(password, "none", 4) == 0, |
| "password should be 'none'"); | |
| - | abort_unless(s_login != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_login, "none", 4) == 0, "login should be 'none'"); |
| + | abort_unless(login != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(login, "none", 4) == 0, "login should be 'none'"); |
| Curl_netrc_cleanup(&store); | |
| /* | |
| * Test for the second existing host in our netrc file | |
| - | * with s_login[0] != 0. |
| + | * with login[0] != 0. |
| */ | |
| - | free(s_password); |
| - | free(s_login); |
| - | s_password = NULL; |
| - | s_login = NULL; |
| + | free(password); |
| + | free(login); |
| + | password = NULL; |
| + | login = NULL; |
| Curl_netrc_init(&store); | |
| result = Curl_parsenetrc(&store, | |
| - | "curl.example.com", &s_login, &s_password, arg); |
| + | "curl.example.com", &login, &password, arg); |
| fail_unless(result == 0, "Host should have been found"); | |
| - | abort_unless(s_password != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_password, "none", 4) == 0, |
| + | abort_unless(password != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(password, "none", 4) == 0, |
| "password should be 'none'"); | |
| - | abort_unless(s_login != NULL, "returned NULL!"); |
| - | fail_unless(strncmp(s_login, "none", 4) == 0, "login should be 'none'"); |
| + | abort_unless(login != NULL, "returned NULL!"); |
| + | fail_unless(strncmp(login, "none", 4) == 0, "login should be 'none'"); |
| Curl_netrc_cleanup(&store); | |
| + | |
| + | UNITTEST_END(t1304_stop(&password, &login)) |
| } | |
| - | UNITTEST_STOP |
| #else | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | static void unit_stop(void) |
| + | |
| + | static CURLcode test_unit1304(char *arg) |
| { | |
| + | UNITTEST_BEGIN_SIMPLE |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_START |
| - | UNITTEST_STOP |
| #endif | |
| @@ -40,24 +40,17 @@ | |
| #include "memdebug.h" /* LAST include file */ | |
| - | 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) |
| + | static CURLcode t1305_setup(void) |
| { | |
| - | t1305_easy = curl_easy_init(); |
| - | if(!t1305_easy) { |
| - | curl_global_cleanup(); |
| - | return CURLE_OUT_OF_MEMORY; |
| - | } |
| - | |
| Curl_dnscache_init(&hp, 7); | |
| return CURLE_OK; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1305_stop(void) |
| { | |
| if(data_node) { | |
| Curl_freeaddrinfo(data_node->addr); | |
| @@ -65,15 +58,12 @@ static void unit_stop(void) | |
| } | |
| free(data_key); | |
| Curl_dnscache_destroy(&hp); | |
| - | |
| - | curl_easy_cleanup(t1305_easy); |
| - | curl_global_cleanup(); |
| } | |
| static struct Curl_addrinfo *fake_ai(void) | |
| { | |
| static struct Curl_addrinfo *ai; | |
| - | static const char dummy[]="dummy"; |
| + | static const char dummy[] = "dummy"; |
| size_t namelen = sizeof(dummy); /* including the null-terminator */ | |
| ai = calloc(1, sizeof(struct Curl_addrinfo) + sizeof(struct sockaddr_in) + | |
| @@ -109,14 +99,15 @@ static CURLcode create_node(void) | |
| return CURLE_OK; | |
| } | |
| - | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1305(char *arg) |
| + | { |
| + | UNITTEST_BEGIN(t1305_setup()) |
| struct Curl_dns_entry *nodep; | |
| size_t key_len; | |
| /* Test 1305 exits without adding anything to the hash */ | |
| - | if(strcmp(arg, "1305") != 0) { |
| + | if(testnum == 1306) { |
| CURLcode rc = create_node(); | |
| abort_unless(rc == CURLE_OK, "data node creation failed"); | |
| key_len = strlen(data_key); | |
| @@ -128,4 +119,5 @@ UNITTEST_START | |
| data_node = NULL; | |
| } | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t1305_stop()) |
| + | } |
| @@ -25,15 +25,6 @@ | |
| #include "curl_fnmatch.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| - | |
| #ifndef CURL_DISABLE_FTP | |
| /* | |
| @@ -72,14 +63,10 @@ static const char *ret2name(int i) | |
| /* not reached */ | |
| } | |
| - | enum system { |
| - | SYSTEM_CUSTOM, |
| - | SYSTEM_LINUX, |
| - | SYSTEM_MACOS |
| - | }; |
| - | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1307(char *arg) |
| { | |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| struct testcase { | |
| const char *pattern; | |
| const char *string; | |
| @@ -278,6 +265,13 @@ UNITTEST_START | |
| }; | |
| int i; | |
| + | |
| + | enum system { |
| + | SYSTEM_CUSTOM, |
| + | SYSTEM_LINUX, |
| + | SYSTEM_MACOS |
| + | }; |
| + | |
| enum system machine; | |
| #ifdef HAVE_FNMATCH | |
| @@ -311,12 +305,16 @@ UNITTEST_START | |
| fail("pattern mismatch"); | |
| } | |
| } | |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| #else | |
| - | UNITTEST_START |
| - | UNITTEST_STOP |
| + | static CURLcode test_unit1307(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | UNITTEST_END_SIMPLE |
| + | } |
| #endif | |
| @@ -26,17 +26,6 @@ | |
| #include "splay.h" | |
| #include "warnless.h" | |
| - | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| static void splayprint(struct Curl_tree *t, int d, char output) | |
| { | |
| struct Curl_tree *node; | |
| @@ -68,7 +57,9 @@ static void splayprint(struct Curl_tree *t, int d, char output) | |
| splayprint(t->smaller, d + 1, output); | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1309(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| /* number of nodes to add to the splay tree */ | |
| #define NUM_NODES 50 | |
| @@ -141,4 +132,5 @@ UNITTEST_START | |
| fail_unless(root == NULL, "tree not empty when it should be"); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -25,30 +25,23 @@ | |
| #include "timeval.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1323(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| - | struct a { |
| - | struct curltime first; |
| - | struct curltime second; |
| - | time_t result; |
| - | }; |
| + | struct a { |
| + | struct curltime first; |
| + | struct curltime second; |
| + | time_t result; |
| + | }; |
| - | UNITTEST_START |
| - | { |
| struct a tests[] = { | |
| { {36762, 8345 }, {36761, 995926 }, 13 }, | |
| { {36761, 995926 }, {36762, 8345 }, -13 }, | |
| { {36761, 995926 }, {0, 0}, 36761995 }, | |
| { {0, 0}, {36761, 995926 }, -36761995 }, | |
| }; | |
| + | |
| size_t i; | |
| for(i = 0; i < CURL_ARRAYSIZE(tests); i++) { | |
| @@ -64,5 +57,6 @@ UNITTEST_START | |
| fail("unexpected result!"); | |
| } | |
| } | |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| @@ -25,19 +25,12 @@ | |
| #include "memdebug.h" | |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1330(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | char *ptr = malloc(1330); |
| + | Curl_safefree(ptr); |
| - | UNITTEST_START |
| - | |
| - | char *ptr = malloc(1330); |
| - | Curl_safefree(ptr); |
| - | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -28,25 +28,18 @@ extern int dedotdotify(const char *input, size_t clen, char **out); | |
| #include "memdebug.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1395(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| - | struct dotdot { |
| - | const char *input; |
| - | const char *output; |
| - | }; |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| unsigned int i; | |
| int fails = 0; | |
| + | |
| + | struct dotdot { |
| + | const char *input; |
| + | const char *output; |
| + | }; |
| + | |
| const struct dotdot pairs[] = { | |
| { "%2f%2e%2e%2f/../a", "%2f%2e%2e%2f/a" }, | |
| { "%2f%2e%2e%2f/../", "%2f%2e%2e%2f/" }, | |
| @@ -148,4 +141,5 @@ UNITTEST_START | |
| fail_if(fails, "output mismatched"); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -23,34 +23,35 @@ | |
| ***************************************************************************/ | |
| #include "curlcheck.h" | |
| - | static CURL *hnd; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1396_setup(void) |
| { | |
| CURLcode res = CURLE_OK; | |
| - | |
| global_init(CURL_GLOBAL_ALL); | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1396_stop(CURL *easy) |
| { | |
| - | if(hnd) |
| - | curl_easy_cleanup(hnd); |
| + | if(easy) |
| + | curl_easy_cleanup(easy); |
| curl_global_cleanup(); | |
| } | |
| - | struct test { |
| - | const char *in; |
| - | int inlen; |
| - | const char *out; |
| - | int outlen; |
| - | }; |
| - | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1396(char *arg) |
| { | |
| + | CURL *easy; |
| + | |
| + | UNITTEST_BEGIN(t1396_setup()) |
| + | |
| + | struct test { |
| + | const char *in; |
| + | int inlen; |
| + | const char *out; |
| + | int outlen; |
| + | }; |
| + | |
| /* unescape, this => that */ | |
| - | const struct test list1[]={ |
| + | const struct test list1[] = { |
| {"%61", 3, "a", 1}, | |
| {"%61a", 4, "aa", 2}, | |
| {"%61b", 4, "ab", 2}, | |
| @@ -66,7 +67,7 @@ UNITTEST_START | |
| {NULL, 0, NULL, 0} /* end of list marker */ | |
| }; | |
| /* escape, this => that */ | |
| - | const struct test list2[]={ |
| + | const struct test list2[] = { |
| {"a", 1, "a", 1}, | |
| {"/", 1, "%2F", 3}, | |
| {"a=b", 3, "a%3Db", 5}, | |
| @@ -81,11 +82,11 @@ UNITTEST_START | |
| }; | |
| int i; | |
| - | hnd = curl_easy_init(); |
| - | abort_unless(hnd != NULL, "returned NULL!"); |
| + | easy = curl_easy_init(); |
| + | abort_unless(easy != NULL, "returned NULL!"); |
| for(i = 0; list1[i].in; i++) { | |
| int outlen; | |
| - | char *out = curl_easy_unescape(hnd, |
| + | char *out = curl_easy_unescape(easy, |
| list1[i].in, list1[i].inlen, | |
| &outlen); | |
| @@ -101,7 +102,7 @@ UNITTEST_START | |
| for(i = 0; list2[i].in; i++) { | |
| int outlen; | |
| - | char *out = curl_easy_escape(hnd, list2[i].in, list2[i].inlen); |
| + | char *out = curl_easy_escape(easy, list2[i].in, list2[i].inlen); |
| abort_unless(out != NULL, "returned NULL!"); | |
| outlen = (int)strlen(out); | |
| @@ -113,5 +114,6 @@ UNITTEST_START | |
| curl_free(out); | |
| } | |
| + | |
| + | UNITTEST_END(t1396_stop(easy)) |
| } | |
| - | UNITTEST_STOP |
| @@ -23,29 +23,22 @@ | |
| ***************************************************************************/ | |
| #include "curlcheck.h" | |
| + | #include "vtls/hostcheck.h" |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1397(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| /* only these backends define the tested functions */ | |
| #if defined(USE_OPENSSL) || defined(USE_SCHANNEL) | |
| - | #include "vtls/hostcheck.h" |
| - | UNITTEST_START |
| - | { |
| struct testcase { | |
| const char *host; | |
| const char *pattern; | |
| bool match; | |
| }; | |
| - | static struct testcase tests[] = { |
| + | static const struct testcase tests[] = { |
| {"", "", FALSE}, | |
| {"a", "", FALSE}, | |
| {"", "b", FALSE}, | |
| @@ -114,12 +107,7 @@ UNITTEST_START | |
| unitfail++; | |
| } | |
| } | |
| - | } |
| - | |
| - | UNITTEST_STOP |
| - | #else |
| - | |
| - | UNITTEST_START |
| - | |
| - | UNITTEST_STOP |
| #endif | |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -28,170 +28,164 @@ | |
| #pragma GCC diagnostic ignored "-Wformat" | |
| #endif | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1398(char *arg) |
| { | |
| - | return CURLE_OK; |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| + | int rc; |
| + | char buf[3] = {'b', 'u', 'g'}; |
| + | const char *str = "bug"; |
| + | int width = 3; |
| + | char output[130]; |
| + | |
| + | /*#define curl_msnprintf snprintf */ |
| + | |
| + | /* without a trailing zero */ |
| + | rc = curl_msnprintf(output, 4, "%.*s", width, buf); |
| + | fail_unless(rc == 3, "return code should be 3"); |
| + | fail_unless(!strcmp(output, "bug"), "wrong output"); |
| + | |
| + | /* with a trailing zero */ |
| + | rc = curl_msnprintf(output, 4, "%.*s", width, str); |
| + | fail_unless(rc == 3, "return code should be 3"); |
| + | fail_unless(!strcmp(output, "bug"), "wrong output"); |
| + | |
| + | width = 2; |
| + | /* one byte less */ |
| + | rc = curl_msnprintf(output, 4, "%.*s", width, buf); |
| + | fail_unless(rc == 2, "return code should be 2"); |
| + | fail_unless(!strcmp(output, "bu"), "wrong output"); |
| + | |
| + | /* string with larger precision */ |
| + | rc = curl_msnprintf(output, 8, "%.8s", str); |
| + | fail_unless(rc == 3, "return code should be 3"); |
| + | fail_unless(!strcmp(output, "bug"), "wrong output"); |
| + | |
| + | /* longer string with precision */ |
| + | rc = curl_msnprintf(output, 8, "%.3s", "0123456789"); |
| + | fail_unless(rc == 3, "return code should be 3"); |
| + | fail_unless(!strcmp(output, "012"), "wrong output"); |
| + | |
| + | /* negative width */ |
| + | rc = curl_msnprintf(output, 8, "%-8s", str); |
| + | fail_unless(rc == 7, "return code should be 7"); |
| + | fail_unless(!strcmp(output, "bug "), "wrong output"); |
| + | |
| + | /* larger width that string length */ |
| + | rc = curl_msnprintf(output, 8, "%8s", str); |
| + | fail_unless(rc == 7, "return code should be 7"); |
| + | fail_unless(!strcmp(output, " bu"), "wrong output"); |
| + | |
| + | /* output a number in a limited output */ |
| + | rc = curl_msnprintf(output, 4, "%d", 10240); |
| + | fail_unless(rc == 3, "return code should be 3"); |
| + | fail_unless(!strcmp(output, "102"), "wrong output"); |
| + | |
| + | /* padded strings */ |
| + | rc = curl_msnprintf(output, 16, "%8s%8s", str, str); |
| + | fail_unless(rc == 15, "return code should be 15"); |
| + | fail_unless(!strcmp(output, " bug bu"), "wrong output"); |
| + | |
| + | /* padded numbers */ |
| + | rc = curl_msnprintf(output, 16, "%8d%8d", 1234, 5678); |
| + | fail_unless(rc == 15, "return code should be 15"); |
| + | fail_unless(!strcmp(output, " 1234 567"), "wrong output"); |
| + | |
| + | /* double precision */ |
| + | rc = curl_msnprintf(output, 24, "%2$.*1$.99d", 3, 5678); |
| + | fail_unless(rc == 0, "return code should be 0"); |
| + | |
| + | /* 129 input % flags */ |
| + | rc = curl_msnprintf(output, 130, |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 10 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 20 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 30 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 40 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 50 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 60 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 70 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 80 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 90 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 100 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 110 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 120 */ |
| + | "%s%s%s%s%s%s%s%s%s", /* 129 */ |
| + | |
| + | "a", "", "", "", "", "", "", "", "", "", /* 10 */ |
| + | "b", "", "", "", "", "", "", "", "", "", /* 20 */ |
| + | "c", "", "", "", "", "", "", "", "", "", /* 30 */ |
| + | "d", "", "", "", "", "", "", "", "", "", /* 40 */ |
| + | "e", "", "", "", "", "", "", "", "", "", /* 50 */ |
| + | "f", "", "", "", "", "", "", "", "", "", /* 60 */ |
| + | "g", "", "", "", "", "", "", "", "", "", /* 70 */ |
| + | "h", "", "", "", "", "", "", "", "", "", /* 80 */ |
| + | "i", "", "", "", "", "", "", "", "", "", /* 90 */ |
| + | "j", "", "", "", "", "", "", "", "", "", /* 100 */ |
| + | "k", "", "", "", "", "", "", "", "", "", /* 110 */ |
| + | "l", "", "", "", "", "", "", "", "", "", /* 120 */ |
| + | "m", "", "", "", "", "", "", "", "" /* 129 */ |
| + | ); |
| + | fail_unless(rc == 0, "return code should be 0"); |
| + | |
| + | /* 128 input % flags */ |
| + | rc = curl_msnprintf(output, 130, |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 10 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 20 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 30 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 40 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 50 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 60 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 70 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 80 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 90 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 100 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 110 */ |
| + | "%s%s%s%s%s%s%s%s%s%s" /* 120 */ |
| + | "%s%s%s%s%s%s%s%s", /* 128 */ |
| + | |
| + | "a", "", "", "", "", "", "", "", "", "", /* 10 */ |
| + | "b", "", "", "", "", "", "", "", "", "", /* 20 */ |
| + | "c", "", "", "", "", "", "", "", "", "", /* 30 */ |
| + | "d", "", "", "", "", "", "", "", "", "", /* 40 */ |
| + | "e", "", "", "", "", "", "", "", "", "", /* 50 */ |
| + | "f", "", "", "", "", "", "", "", "", "", /* 60 */ |
| + | "g", "", "", "", "", "", "", "", "", "", /* 70 */ |
| + | "h", "", "", "", "", "", "", "", "", "", /* 80 */ |
| + | "i", "", "", "", "", "", "", "", "", "", /* 90 */ |
| + | "j", "", "", "", "", "", "", "", "", "", /* 100 */ |
| + | "k", "", "", "", "", "", "", "", "", "", /* 110 */ |
| + | "l", "", "", "", "", "", "", "", "", "", /* 120 */ |
| + | "m", "", "", "", "", "", "", "" /* 128 */ |
| + | ); |
| + | fail_unless(rc == 13, "return code should be 13"); |
| + | |
| + | /* 129 output segments */ |
| + | rc = curl_msnprintf(output, 130, |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 20 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 40 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 60 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 80 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 100 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 120 */ |
| + | "%%%%%%%%%%%%%%%%%%" /* 129 */ |
| + | ); |
| + | fail_unless(rc == 0, "return code should be 0"); |
| + | |
| + | /* 128 output segments */ |
| + | rc = curl_msnprintf(output, 129, |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 20 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 40 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 60 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 80 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 100 */ |
| + | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 120 */ |
| + | "%%%%%%%%%%%%%%%%" /* 128 */ |
| + | ); |
| + | fail_unless(rc == 128, "return code should be 128"); |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| - | |
| - | UNITTEST_START |
| - | |
| - | int rc; |
| - | char buf[3] = {'b', 'u', 'g'}; |
| - | const char *str = "bug"; |
| - | int width = 3; |
| - | char output[130]; |
| - | |
| - | /*#define curl_msnprintf snprintf */ |
| - | |
| - | /* without a trailing zero */ |
| - | rc = curl_msnprintf(output, 4, "%.*s", width, buf); |
| - | fail_unless(rc == 3, "return code should be 3"); |
| - | fail_unless(!strcmp(output, "bug"), "wrong output"); |
| - | |
| - | /* with a trailing zero */ |
| - | rc = curl_msnprintf(output, 4, "%.*s", width, str); |
| - | fail_unless(rc == 3, "return code should be 3"); |
| - | fail_unless(!strcmp(output, "bug"), "wrong output"); |
| - | |
| - | width = 2; |
| - | /* one byte less */ |
| - | rc = curl_msnprintf(output, 4, "%.*s", width, buf); |
| - | fail_unless(rc == 2, "return code should be 2"); |
| - | fail_unless(!strcmp(output, "bu"), "wrong output"); |
| - | |
| - | /* string with larger precision */ |
| - | rc = curl_msnprintf(output, 8, "%.8s", str); |
| - | fail_unless(rc == 3, "return code should be 3"); |
| - | fail_unless(!strcmp(output, "bug"), "wrong output"); |
| - | |
| - | /* longer string with precision */ |
| - | rc = curl_msnprintf(output, 8, "%.3s", "0123456789"); |
| - | fail_unless(rc == 3, "return code should be 3"); |
| - | fail_unless(!strcmp(output, "012"), "wrong output"); |
| - | |
| - | /* negative width */ |
| - | rc = curl_msnprintf(output, 8, "%-8s", str); |
| - | fail_unless(rc == 7, "return code should be 7"); |
| - | fail_unless(!strcmp(output, "bug "), "wrong output"); |
| - | |
| - | /* larger width that string length */ |
| - | rc = curl_msnprintf(output, 8, "%8s", str); |
| - | fail_unless(rc == 7, "return code should be 7"); |
| - | fail_unless(!strcmp(output, " bu"), "wrong output"); |
| - | |
| - | /* output a number in a limited output */ |
| - | rc = curl_msnprintf(output, 4, "%d", 10240); |
| - | fail_unless(rc == 3, "return code should be 3"); |
| - | fail_unless(!strcmp(output, "102"), "wrong output"); |
| - | |
| - | /* padded strings */ |
| - | rc = curl_msnprintf(output, 16, "%8s%8s", str, str); |
| - | fail_unless(rc == 15, "return code should be 15"); |
| - | fail_unless(!strcmp(output, " bug bu"), "wrong output"); |
| - | |
| - | /* padded numbers */ |
| - | rc = curl_msnprintf(output, 16, "%8d%8d", 1234, 5678); |
| - | fail_unless(rc == 15, "return code should be 15"); |
| - | fail_unless(!strcmp(output, " 1234 567"), "wrong output"); |
| - | |
| - | /* double precision */ |
| - | rc = curl_msnprintf(output, 24, "%2$.*1$.99d", 3, 5678); |
| - | fail_unless(rc == 0, "return code should be 0"); |
| - | |
| - | /* 129 input % flags */ |
| - | rc = curl_msnprintf(output, 130, |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 10 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 20 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 30 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 40 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 50 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 60 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 70 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 80 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 90 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 100 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 110 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 120 */ |
| - | "%s%s%s%s%s%s%s%s%s", /* 129 */ |
| - | |
| - | "a", "", "", "", "", "", "", "", "", "", /* 10 */ |
| - | "b", "", "", "", "", "", "", "", "", "", /* 20 */ |
| - | "c", "", "", "", "", "", "", "", "", "", /* 30 */ |
| - | "d", "", "", "", "", "", "", "", "", "", /* 40 */ |
| - | "e", "", "", "", "", "", "", "", "", "", /* 50 */ |
| - | "f", "", "", "", "", "", "", "", "", "", /* 60 */ |
| - | "g", "", "", "", "", "", "", "", "", "", /* 70 */ |
| - | "h", "", "", "", "", "", "", "", "", "", /* 80 */ |
| - | "i", "", "", "", "", "", "", "", "", "", /* 90 */ |
| - | "j", "", "", "", "", "", "", "", "", "", /* 100 */ |
| - | "k", "", "", "", "", "", "", "", "", "", /* 110 */ |
| - | "l", "", "", "", "", "", "", "", "", "", /* 120 */ |
| - | "m", "", "", "", "", "", "", "", "" /* 129 */ |
| - | ); |
| - | fail_unless(rc == 0, "return code should be 0"); |
| - | |
| - | /* 128 input % flags */ |
| - | rc = curl_msnprintf(output, 130, |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 10 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 20 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 30 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 40 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 50 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 60 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 70 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 80 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 90 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 100 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 110 */ |
| - | "%s%s%s%s%s%s%s%s%s%s" /* 120 */ |
| - | "%s%s%s%s%s%s%s%s", /* 128 */ |
| - | |
| - | "a", "", "", "", "", "", "", "", "", "", /* 10 */ |
| - | "b", "", "", "", "", "", "", "", "", "", /* 20 */ |
| - | "c", "", "", "", "", "", "", "", "", "", /* 30 */ |
| - | "d", "", "", "", "", "", "", "", "", "", /* 40 */ |
| - | "e", "", "", "", "", "", "", "", "", "", /* 50 */ |
| - | "f", "", "", "", "", "", "", "", "", "", /* 60 */ |
| - | "g", "", "", "", "", "", "", "", "", "", /* 70 */ |
| - | "h", "", "", "", "", "", "", "", "", "", /* 80 */ |
| - | "i", "", "", "", "", "", "", "", "", "", /* 90 */ |
| - | "j", "", "", "", "", "", "", "", "", "", /* 100 */ |
| - | "k", "", "", "", "", "", "", "", "", "", /* 110 */ |
| - | "l", "", "", "", "", "", "", "", "", "", /* 120 */ |
| - | "m", "", "", "", "", "", "", "" /* 128 */ |
| - | ); |
| - | fail_unless(rc == 13, "return code should be 13"); |
| - | |
| - | /* 129 output segments */ |
| - | rc = curl_msnprintf(output, 130, |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 20 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 40 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 60 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 80 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 100 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 120 */ |
| - | "%%%%%%%%%%%%%%%%%%" /* 129 */ |
| - | ); |
| - | fail_unless(rc == 0, "return code should be 0"); |
| - | |
| - | /* 128 output segments */ |
| - | rc = curl_msnprintf(output, 129, |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 20 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 40 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 60 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 80 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 100 */ |
| - | "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" /* 120 */ |
| - | "%%%%%%%%%%%%%%%%" /* 128 */ |
| - | ); |
| - | fail_unless(rc == 128, "return code should be 128"); |
| - | |
| - | UNITTEST_STOP |
| - | |
| #if defined(CURL_GNUC_DIAG) || defined(__clang__) | |
| #pragma GCC diagnostic pop | |
| #endif | |
| @@ -26,17 +26,6 @@ | |
| #include "urldata.h" | |
| #include "progress.h" | |
| - | static int usec_magnitude = 1000000; |
| - | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| - | |
| /* | |
| * Invoke Curl_pgrsTime for TIMER_STARTSINGLE to trigger the behavior that | |
| * manages is_t_startransfer_set, but fake the t_startsingle time for purposes | |
| @@ -53,6 +42,8 @@ static void fake_t_startsingle_time(struct Curl_easy *data, | |
| static bool usec_matches_seconds(timediff_t time_usec, int expected_seconds) | |
| { | |
| + | static int usec_magnitude = 1000000; |
| + | |
| int time_sec = (int)(time_usec / usec_magnitude); | |
| bool same = (time_sec == expected_seconds); | |
| curl_mfprintf(stderr, "is %d us same as %d seconds? %s\n", | |
| @@ -80,7 +71,10 @@ static void expect_timer_seconds(struct Curl_easy *data, int seconds) | |
| * E.g., if t_starttransfer took 2 seconds initially and took another 1 | |
| * second for the redirect request, then the resulting t_starttransfer should | |
| * be 3 seconds. */ | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1399(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| struct Curl_easy data; | |
| struct curltime now = curlx_now(); | |
| @@ -116,4 +110,6 @@ UNITTEST_START | |
| Curl_pgrsTime(&data, TIMER_STARTTRANSFER); | |
| expect_timer_seconds(&data, 3); | |
| - | UNITTEST_STOP |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -26,28 +26,30 @@ | |
| #include "urldata.h" | |
| #include "curl_ntlm_core.h" | |
| - | static CURL *t1600_easy; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1600_setup(CURL **easy) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| - | t1600_easy = curl_easy_init(); |
| - | if(!t1600_easy) { |
| + | *easy = curl_easy_init(); |
| + | if(!*easy) { |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1600_stop(CURL *easy) |
| { | |
| - | curl_easy_cleanup(t1600_easy); |
| + | curl_easy_cleanup(easy); |
| curl_global_cleanup(); | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1600(char *arg) |
| + | { |
| + | CURL *easy; |
| + | |
| + | UNITTEST_BEGIN(t1600_setup(&easy)) |
| #if defined(USE_NTLM) && (!defined(USE_WINDOWS_SSPI) || \ | |
| defined(USE_WIN32_CRYPTO)) | |
| @@ -65,11 +67,12 @@ UNITTEST_START | |
| "\x39\xaf\x87\xa6\x75\x0a\x7a\x00\xba\xa0" | |
| "\xd3\x4f\x04\x9e\xc1\xd0\x00\x00\x00\x00\x00", 21); | |
| - | /* !checksrc! disable LONGLINE 2 */ |
| + | /* !checksrc! disable LONGLINE 2 */ |
| Curl_ntlm_core_mk_nt_hash("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", output); | |
| verify_memory(testp, | |
| "\x36\x9d\xae\x06\x84\x7e\xe1\xc1\x4a\x94\x39\xea\x6f\x44\x8c\x65\x00\x00\x00\x00\x00", 21); | |
| #endif | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t1600_stop(easy)) |
| + | } |
| @@ -25,17 +25,9 @@ | |
| #include "curl_md5.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1601(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| #if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \ | |
| || !defined(CURL_DISABLE_DIGEST_AUTH) | |
| @@ -56,5 +48,5 @@ UNITTEST_START | |
| "\x87\x5f\x22", MD5_DIGEST_LEN); | |
| #endif | |
| - | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -29,27 +29,30 @@ | |
| #include <memdebug.h> /* LAST include file */ | |
| - | static struct Curl_hash t1602_hash_static; |
| - | |
| static void t1602_mydtor(void *p) | |
| { | |
| int *ptr = (int *)p; | |
| free(ptr); | |
| } | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1602_setup(struct Curl_hash *hash) |
| { | |
| - | Curl_hash_init(&t1602_hash_static, 7, Curl_hash_str, |
| + | Curl_hash_init(hash, 7, Curl_hash_str, |
| curlx_str_key_compare, t1602_mydtor); | |
| return CURLE_OK; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1602_stop(struct Curl_hash *hash) |
| { | |
| - | Curl_hash_destroy(&t1602_hash_static); |
| + | Curl_hash_destroy(hash); |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1602(char *arg) |
| + | { |
| + | struct Curl_hash hash; |
| + | |
| + | UNITTEST_BEGIN(t1602_setup(&hash)) |
| + | |
| int *value; | |
| int *value2; | |
| int *nodep; | |
| @@ -58,23 +61,23 @@ UNITTEST_START | |
| int key = 20; | |
| int key2 = 25; | |
| - | |
| value = malloc(sizeof(int)); | |
| abort_unless(value != NULL, "Out of memory"); | |
| *value = 199; | |
| - | nodep = Curl_hash_add(&t1602_hash_static, &key, klen, value); |
| + | nodep = Curl_hash_add(&hash, &key, klen, value); |
| if(!nodep) | |
| free(value); | |
| abort_unless(nodep, "insertion into hash failed"); | |
| - | Curl_hash_clean(&t1602_hash_static); |
| + | Curl_hash_clean(&hash); |
| /* Attempt to add another key/value pair */ | |
| value2 = malloc(sizeof(int)); | |
| abort_unless(value2 != NULL, "Out of memory"); | |
| *value2 = 204; | |
| - | nodep = Curl_hash_add(&t1602_hash_static, &key2, klen, value2); |
| + | nodep = Curl_hash_add(&hash, &key2, klen, value2); |
| if(!nodep) | |
| free(value2); | |
| abort_unless(nodep, "insertion into hash failed"); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t1602_stop(&hash)) |
| + | } |
| @@ -27,7 +27,6 @@ | |
| #include "hash.h" | |
| #include <memdebug.h> /* LAST include file */ | |
| - | static struct Curl_hash t1603_hash_static; |
| static const size_t slots = 3; | |
| static void t1603_mydtor(void *p) | |
| @@ -46,19 +45,24 @@ static void my_elem_dtor(void *key, size_t key_len, void *p) | |
| ++elem_dtor_calls; | |
| } | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1603_setup(struct Curl_hash *hash_static) |
| { | |
| - | Curl_hash_init(&t1603_hash_static, slots, Curl_hash_str, |
| + | Curl_hash_init(hash_static, slots, Curl_hash_str, |
| curlx_str_key_compare, t1603_mydtor); | |
| return CURLE_OK; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1603_stop(struct Curl_hash *hash_static) |
| { | |
| - | Curl_hash_destroy(&t1603_hash_static); |
| + | Curl_hash_destroy(hash_static); |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1603(char *arg) |
| + | { |
| + | struct Curl_hash hash_static; |
| + | |
| + | UNITTEST_BEGIN(t1603_setup(&hash_static)) |
| + | |
| char key1[] = "key1"; | |
| char key2[] = "key2b"; | |
| char key3[] = "key3"; | |
| @@ -78,100 +82,100 @@ UNITTEST_START | |
| "Warning: hashes are not computed as expected on this " | |
| "architecture; test coverage will be less comprehensive\n"); | |
| - | nodep = Curl_hash_add(&t1603_hash_static, &key1, strlen(key1), &key1); |
| + | nodep = Curl_hash_add(&hash_static, &key1, strlen(key1), &key1); |
| fail_unless(nodep, "insertion into hash failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1)); |
| + | nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1)); |
| fail_unless(nodep == key1, "hash retrieval failed"); | |
| - | nodep = Curl_hash_add(&t1603_hash_static, &key2, strlen(key2), &key2); |
| + | nodep = Curl_hash_add(&hash_static, &key2, strlen(key2), &key2); |
| fail_unless(nodep, "insertion into hash failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key2, strlen(key2)); |
| + | nodep = Curl_hash_pick(&hash_static, &key2, strlen(key2)); |
| fail_unless(nodep == key2, "hash retrieval failed"); | |
| - | nodep = Curl_hash_add(&t1603_hash_static, &key3, strlen(key3), &key3); |
| + | nodep = Curl_hash_add(&hash_static, &key3, strlen(key3), &key3); |
| fail_unless(nodep, "insertion into hash failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key3, strlen(key3)); |
| + | nodep = Curl_hash_pick(&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(&t1603_hash_static, &key4, strlen(key4), &key4); |
| + | nodep = Curl_hash_add(&hash_static, &key4, strlen(key4), &key4); |
| fail_unless(nodep, "insertion into hash failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4)); |
| + | nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4)); |
| fail_unless(nodep == key4, "hash retrieval failed"); | |
| /* Make sure all elements are still accessible */ | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1)); |
| + | nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1)); |
| fail_unless(nodep == key1, "hash retrieval failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key2, strlen(key2)); |
| + | nodep = Curl_hash_pick(&hash_static, &key2, strlen(key2)); |
| fail_unless(nodep == key2, "hash retrieval failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key3, strlen(key3)); |
| + | nodep = Curl_hash_pick(&hash_static, &key3, strlen(key3)); |
| fail_unless(nodep == key3, "hash retrieval failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4)); |
| + | nodep = Curl_hash_pick(&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(&t1603_hash_static, &key4, strlen(key4)); |
| + | rc = Curl_hash_delete(&hash_static, &key4, strlen(key4)); |
| fail_unless(rc == 0, "hash delete failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1)); |
| + | nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1)); |
| fail_unless(nodep == key1, "hash retrieval failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4)); |
| + | nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4)); |
| fail_unless(!nodep, "hash retrieval should have failed"); | |
| /* Insert that deleted node again */ | |
| - | nodep = Curl_hash_add(&t1603_hash_static, &key4, strlen(key4), &key4); |
| + | nodep = Curl_hash_add(&hash_static, &key4, strlen(key4), &key4); |
| fail_unless(nodep, "insertion into hash failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4)); |
| + | nodep = Curl_hash_pick(&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(&t1603_hash_static, &key1, strlen(key1)); |
| + | rc = Curl_hash_delete(&hash_static, &key1, strlen(key1)); |
| fail_unless(rc == 0, "hash delete failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1)); |
| + | nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1)); |
| fail_unless(!nodep, "hash retrieval should have failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4)); |
| + | nodep = Curl_hash_pick(&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(&t1603_hash_static, &key4, strlen(key4)); |
| + | rc = Curl_hash_delete(&hash_static, &key4, strlen(key4)); |
| fail_unless(rc == 0, "hash delete failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1)); |
| + | nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1)); |
| fail_unless(!nodep, "hash retrieval should have failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key4, strlen(key4)); |
| + | nodep = Curl_hash_pick(&hash_static, &key4, strlen(key4)); |
| fail_unless(!nodep, "hash retrieval should have failed"); | |
| /* Delete an already deleted node */ | |
| - | rc = Curl_hash_delete(&t1603_hash_static, &key4, strlen(key4)); |
| + | rc = Curl_hash_delete(&hash_static, &key4, strlen(key4)); |
| fail_unless(rc, "hash delete should have failed"); | |
| /* Replace an existing node */ | |
| - | nodep = Curl_hash_add(&t1603_hash_static, &key1, strlen(key1), ¬akey); |
| + | nodep = Curl_hash_add(&hash_static, &key1, strlen(key1), ¬akey); |
| fail_unless(nodep, "insertion into hash failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key1, strlen(key1)); |
| + | nodep = Curl_hash_pick(&hash_static, &key1, strlen(key1)); |
| fail_unless(nodep == notakey, "hash retrieval failed"); | |
| /* Make sure all remaining elements are still accessible */ | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key2, strlen(key2)); |
| + | nodep = Curl_hash_pick(&hash_static, &key2, strlen(key2)); |
| fail_unless(nodep == key2, "hash retrieval failed"); | |
| - | nodep = Curl_hash_pick(&t1603_hash_static, &key3, strlen(key3)); |
| + | nodep = Curl_hash_pick(&hash_static, &key3, strlen(key3)); |
| fail_unless(nodep == key3, "hash retrieval failed"); | |
| /* Add element with own destructor */ | |
| - | nodep = Curl_hash_add2(&t1603_hash_static, &key1, strlen(key1), &key1, |
| + | nodep = Curl_hash_add2(&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(&t1603_hash_static, &key1, strlen(key1), &key1, |
| + | nodep = Curl_hash_add2(&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(&t1603_hash_static, &key1, strlen(key1)); |
| + | rc = Curl_hash_delete(&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(&t1603_hash_static); |
| + | Curl_hash_clean(&hash_static); |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t1603_stop(&hash_static)) |
| + | } |
| @@ -25,35 +25,39 @@ | |
| #include "llist.h" | |
| - | static CURL *t1605_easy; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1605_setup(CURL **easy) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| - | t1605_easy = curl_easy_init(); |
| - | if(!t1605_easy) { |
| + | *easy = curl_easy_init(); |
| + | if(!*easy) { |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1605_stop(CURL *easy) |
| { | |
| - | curl_easy_cleanup(t1605_easy); |
| + | curl_easy_cleanup(easy); |
| curl_global_cleanup(); | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1605(char *arg) |
| + | { |
| + | CURL *easy; |
| + | |
| + | UNITTEST_BEGIN(t1605_setup(&easy)) |
| + | |
| int len; | |
| char *esc; | |
| - | esc = curl_easy_escape(t1605_easy, "", -1); |
| + | esc = curl_easy_escape(easy, "", -1); |
| fail_unless(esc == NULL, "negative string length can't work"); | |
| - | esc = curl_easy_unescape(t1605_easy, "%41%41%41%41", -1, &len); |
| + | esc = curl_easy_unescape(easy, "%41%41%41%41", -1, &len); |
| fail_unless(esc == NULL, "negative string length can't work"); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t1605_stop(easy)) |
| + | } |
| @@ -26,28 +26,27 @@ | |
| #include "speedcheck.h" | |
| #include "urldata.h" | |
| - | static struct Curl_easy *t1606_easy; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1606_setup(struct Curl_easy **easy) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| - | t1606_easy = curl_easy_init(); |
| - | if(!t1606_easy) { |
| + | *easy = curl_easy_init(); |
| + | if(!*easy) { |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1606_stop(struct Curl_easy *easy) |
| { | |
| - | curl_easy_cleanup(t1606_easy); |
| + | curl_easy_cleanup(easy); |
| curl_global_cleanup(); | |
| } | |
| - | static int runawhile(long time_limit, |
| + | static int runawhile(struct Curl_easy *easy, |
| + | long time_limit, |
| long speed_limit, | |
| curl_off_t speed, | |
| int dec) | |
| @@ -57,14 +56,14 @@ static int runawhile(long time_limit, | |
| CURLcode result; | |
| int finaltime; | |
| - | 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); |
| + | curl_easy_setopt(easy, CURLOPT_LOW_SPEED_LIMIT, speed_limit); |
| + | curl_easy_setopt(easy, CURLOPT_LOW_SPEED_TIME, time_limit); |
| + | Curl_speedinit(easy); |
| do { | |
| /* fake the current transfer speed */ | |
| - | t1606_easy->progress.current_speed = speed; |
| - | result = Curl_speedcheck(t1606_easy, now); |
| + | easy->progress.current_speed = speed; |
| + | result = Curl_speedcheck(easy, now); |
| if(result) | |
| break; | |
| /* step the time */ | |
| @@ -77,17 +76,24 @@ static int runawhile(long time_limit, | |
| return finaltime; | |
| } | |
| - | UNITTEST_START |
| - | fail_unless(runawhile(41, 41, 40, 0) == 41, |
| + | static CURLcode test_unit1606(char *arg) |
| + | { |
| + | struct Curl_easy *easy; |
| + | |
| + | UNITTEST_BEGIN(t1606_setup(&easy)) |
| + | |
| + | fail_unless(runawhile(easy, 41, 41, 40, 0) == 41, |
| "wrong low speed timeout"); | |
| - | fail_unless(runawhile(21, 21, 20, 0) == 21, |
| + | fail_unless(runawhile(easy, 21, 21, 20, 0) == 21, |
| "wrong low speed timeout"); | |
| - | fail_unless(runawhile(60, 60, 40, 0) == 60, |
| + | fail_unless(runawhile(easy, 60, 60, 40, 0) == 60, |
| "wrong log speed timeout"); | |
| - | fail_unless(runawhile(50, 50, 40, 0) == 50, |
| + | fail_unless(runawhile(easy, 50, 50, 40, 0) == 50, |
| "wrong log speed timeout"); | |
| - | fail_unless(runawhile(40, 40, 40, 0) == 99, |
| + | fail_unless(runawhile(easy, 40, 40, 40, 0) == 99, |
| "should not time out"); | |
| - | fail_unless(runawhile(10, 50, 100, 2) == 36, |
| + | fail_unless(runawhile(easy, 10, 50, 100, 2) == 36, |
| "bad timeout"); | |
| - | UNITTEST_STOP |
| + | |
| + | UNITTEST_END(t1606_stop(easy)) |
| + | } |
| @@ -29,30 +29,26 @@ | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1607_setup(void) |
| { | |
| CURLcode res = CURLE_OK; | |
| - | |
| global_init(CURL_GLOBAL_ALL); | |
| - | |
| return res; | |
| } | |
| - | /* 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; |
| + | |
| + | static CURLcode test_unit1607(char *arg) |
| + | { |
| + | /* 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; |
| #ifdef USE_IPV6 | |
| #define IPV6ONLY(x) x | |
| #else | |
| #define IPV6ONLY(x) &skip | |
| #endif | |
| - | UNITTEST_START |
| - | { |
| + | UNITTEST_BEGIN(t1607_setup()) |
| + | |
| struct testcase { | |
| /* host:port:address[,address]... */ | |
| const char *optval; | |
| @@ -233,5 +229,6 @@ error: | |
| curl_easy_cleanup(easy); | |
| curl_multi_cleanup(multi); | |
| curl_slist_free_all(list); | |
| + | |
| + | UNITTEST_END(curl_global_cleanup()) |
| } | |
| - | UNITTEST_STOP |
| @@ -30,25 +30,21 @@ | |
| CURLcode Curl_shuffle_addr(struct Curl_easy *data, | |
| struct Curl_addrinfo **addr); | |
| - | #define NUM_ADDRS 8 |
| - | static struct Curl_addrinfo addrs[NUM_ADDRS]; |
| + | static struct Curl_addrinfo addrs[8]; |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1608_setup(void) |
| { | |
| - | int i; |
| - | for(i = 0; i < NUM_ADDRS - 1; i++) { |
| + | size_t i; |
| + | for(i = 0; i < CURL_ARRAYSIZE(addrs) - 1; i++) { |
| addrs[i].ai_next = &addrs[i + 1]; | |
| } | |
| return CURLE_OK; | |
| } | |
| - | static void unit_stop(void) |
| + | static CURLcode test_unit1608(char *arg) |
| { | |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN(t1608_setup()) |
| int i; | |
| CURLcode code; | |
| @@ -73,17 +69,15 @@ UNITTEST_START | |
| abort_unless(addrhead != addrs, "addresses are not being reordered"); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(curl_global_cleanup()) |
| + | } |
| #else | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | static void unit_stop(void) |
| + | |
| + | static CURLcode test_unit1608(char *arg) |
| { | |
| + | UNITTEST_BEGIN_SIMPLE |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_START |
| - | UNITTEST_STOP |
| #endif | |
| @@ -29,17 +29,10 @@ | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1609_setup(void) |
| { | |
| CURLcode res = CURLE_OK; | |
| - | |
| global_init(CURL_GLOBAL_ALL); | |
| - | |
| return res; | |
| } | |
| @@ -75,8 +68,10 @@ Test: | |
| expected result: cached address has zero timestamp and new address | |
| */ | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1609(char *arg) |
| { | |
| + | UNITTEST_BEGIN(t1609_setup()) |
| + | |
| struct testcase { | |
| /* host:port:address[,address]... */ | |
| const char *optval; | |
| @@ -217,5 +212,6 @@ error: | |
| curl_easy_cleanup(easy); | |
| curl_multi_cleanup(multi); | |
| curl_slist_free_all(list); | |
| + | |
| + | UNITTEST_END(curl_global_cleanup()) |
| } | |
| - | UNITTEST_STOP |
| @@ -25,19 +25,16 @@ | |
| #include "curl_sha256.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1610_setup(void) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static CURLcode test_unit1610(char *arg) |
| { | |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN(t1610_setup()) |
| #if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \ | |
| || defined(USE_LIBSSH2) | |
| @@ -62,5 +59,5 @@ UNITTEST_START | |
| "\x15\xae", CURL_SHA256_DIGEST_LENGTH); | |
| #endif | |
| - | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(curl_global_cleanup()) |
| + | } |
| @@ -25,17 +25,9 @@ | |
| #include "curl_md4.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1611(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| #ifdef USE_CURL_NTLM_CORE | |
| const char string1[] = "1"; | |
| @@ -56,5 +48,5 @@ UNITTEST_START | |
| "\x0b", MD4_DIGEST_LENGTH); | |
| #endif | |
| - | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -26,17 +26,9 @@ | |
| #include "curl_hmac.h" | |
| #include "curl_md5.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1612(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| #if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \ | |
| || !defined(CURL_DISABLE_DIGEST_AUTH) | |
| @@ -66,5 +58,5 @@ UNITTEST_START | |
| "\xd0", HMAC_MD5_LENGTH); | |
| #endif | |
| - | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -25,34 +25,20 @@ | |
| #include "noproxy.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1614(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| - | struct check { |
| - | const char *a; |
| - | const char *n; |
| - | unsigned int bits; |
| - | bool match; |
| - | }; |
| - | |
| - | struct noproxy { |
| - | const char *a; |
| - | const char *n; |
| - | bool match; |
| - | }; |
| + | UNITTEST_BEGIN_SIMPLE |
| - | UNITTEST_START |
| #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_PROXY) | |
| - | { |
| int i; | |
| int err = 0; | |
| + | |
| + | struct check { |
| + | const char *a; |
| + | const char *n; |
| + | unsigned int bits; |
| + | bool match; |
| + | }; |
| struct check list4[]= { | |
| { "192.160.0.1", "192.160.0.1", 33, FALSE}, | |
| { "192.160.0.1", "192.160.0.1", 32, TRUE}, | |
| @@ -78,6 +64,11 @@ UNITTEST_START | |
| { NULL, NULL, 0, FALSE} /* end marker */ | |
| }; | |
| #endif | |
| + | struct noproxy { |
| + | const char *a; |
| + | const char *n; |
| + | bool match; |
| + | }; |
| struct noproxy list[]= { | |
| { "www.example.com", "localhost .example.com .example.de", FALSE}, | |
| { "www.example.com", "localhost,.example.com,.example.de", TRUE}, | |
| @@ -161,6 +152,7 @@ UNITTEST_START | |
| } | |
| } | |
| fail_if(err, "errors"); | |
| - | } |
| #endif | |
| - | UNITTEST_STOP |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -26,17 +26,9 @@ | |
| #include "curl_sha512_256.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1615(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| #ifdef CURL_HAVE_SHA512_256 | |
| @@ -155,5 +147,5 @@ UNITTEST_START | |
| #endif /* CURL_HAVE_SHA512_256 */ | |
| - | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -27,8 +27,6 @@ | |
| #include <uint-hash.h> | |
| #include <memdebug.h> /* LAST include file */ | |
| - | static struct uint_hash t1616_hash_static; |
| - | |
| static void t1616_mydtor(unsigned int id, void *elem) | |
| { | |
| int *ptr = (int *)elem; | |
| @@ -36,18 +34,23 @@ static void t1616_mydtor(unsigned int id, void *elem) | |
| free(ptr); | |
| } | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1616_setup(struct uint_hash *hash) |
| { | |
| - | Curl_uint_hash_init(&t1616_hash_static, 15, t1616_mydtor); |
| + | Curl_uint_hash_init(hash, 15, t1616_mydtor); |
| return CURLE_OK; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1616_stop(struct uint_hash *hash) |
| { | |
| - | Curl_uint_hash_destroy(&t1616_hash_static); |
| + | Curl_uint_hash_destroy(hash); |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1616(char *arg) |
| + | { |
| + | struct uint_hash hash; |
| + | |
| + | UNITTEST_BEGIN(t1616_setup(&hash)) |
| + | |
| int *value, *v; | |
| int *value2; | |
| bool ok; | |
| @@ -55,31 +58,31 @@ UNITTEST_START | |
| unsigned int key = 20; | |
| unsigned int key2 = 25; | |
| - | |
| value = malloc(sizeof(int)); | |
| abort_unless(value != NULL, "Out of memory"); | |
| *value = 199; | |
| - | ok = Curl_uint_hash_set(&t1616_hash_static, key, value); |
| + | ok = Curl_uint_hash_set(&hash, key, value); |
| if(!ok) | |
| free(value); | |
| abort_unless(ok, "insertion into hash failed"); | |
| - | v = Curl_uint_hash_get(&t1616_hash_static, key); |
| + | v = Curl_uint_hash_get(&hash, key); |
| abort_unless(v == value, "lookup present entry failed"); | |
| - | v = Curl_uint_hash_get(&t1616_hash_static, key2); |
| + | v = Curl_uint_hash_get(&hash, key2); |
| abort_unless(!v, "lookup missing entry failed"); | |
| - | Curl_uint_hash_clear(&t1616_hash_static); |
| + | Curl_uint_hash_clear(&hash); |
| /* 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(&t1616_hash_static, key2, value2); |
| + | ok = Curl_uint_hash_set(&hash, key2, value2); |
| if(!ok) | |
| free(value2); | |
| abort_unless(ok, "insertion into hash failed"); | |
| - | v = Curl_uint_hash_get(&t1616_hash_static, key2); |
| + | v = Curl_uint_hash_get(&hash, key2); |
| abort_unless(v == value2, "lookup present entry failed"); | |
| - | v = Curl_uint_hash_get(&t1616_hash_static, key); |
| + | v = Curl_uint_hash_get(&hash, key); |
| abort_unless(!v, "lookup missing entry failed"); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t1616_stop(&hash)) |
| + | } |
| @@ -28,18 +28,13 @@ | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1620_setup(void) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| static void t1620_parse( | |
| const char *input, | |
| const char *exp_username, | |
| @@ -74,8 +69,10 @@ static void t1620_parse( | |
| free(options); | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1620(char *arg) |
| { | |
| + | UNITTEST_BEGIN(t1620_setup()) |
| + | |
| CURLcode rc; | |
| struct Curl_easy *empty; | |
| enum dupstring i; | |
| @@ -131,5 +128,5 @@ UNITTEST_START | |
| rc = Curl_close(&empty); | |
| fail_unless(rc == CURLE_OK, "Curl_close() failed"); | |
| + | UNITTEST_END(curl_global_cleanup()) |
| } | |
| - | UNITTEST_STOP |
| @@ -26,17 +26,12 @@ | |
| #include "doh.h" | |
| #include "dynbuf.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1650(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| #ifndef CURL_DISABLE_DOH | |
| + | |
| #define DNS_PREAMBLE "\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00" | |
| #define LABEL_TEST "\x04\x74\x65\x73\x74" | |
| #define LABEL_HOST "\x04\x68\x6f\x73\x74" | |
| @@ -49,36 +44,35 @@ static void unit_stop(void) | |
| #define DNS_Q1 DNS_PREAMBLE LABEL_TEST LABEL_HOST LABEL_NAME DNSA_EPILOGUE | |
| #define DNS_Q2 DNS_PREAMBLE LABEL_TEST LABEL_HOST LABEL_NAME DNSAAAA_EPILOGUE | |
| - | struct dohrequest { |
| - | /* input */ |
| - | const char *name; |
| - | DNStype type; |
| - | |
| - | /* output */ |
| - | const char *packet; |
| - | size_t size; |
| - | DOHcode rc; |
| - | }; |
| - | |
| - | |
| - | static const struct dohrequest req[] = { |
| - | {"test.host.name", DNS_TYPE_A, DNS_Q1, sizeof(DNS_Q1)-1, DOH_OK }, |
| - | {"test.host.name", DNS_TYPE_AAAA, DNS_Q2, sizeof(DNS_Q2)-1, DOH_OK }, |
| - | {"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" |
| - | ".host.name", |
| - | DNS_TYPE_AAAA, NULL, 0, DOH_DNS_BAD_LABEL } |
| - | }; |
| - | |
| - | struct dohresp { |
| - | /* input */ |
| - | const char *packet; |
| - | size_t size; |
| - | DNStype type; |
| + | struct dohrequest { |
| + | /* input */ |
| + | const char *name; |
| + | DNStype type; |
| - | /* output */ |
| - | DOHcode rc; |
| - | const char *out; |
| - | }; |
| + | /* output */ |
| + | const char *packet; |
| + | size_t size; |
| + | DOHcode rc; |
| + | }; |
| + | |
| + | static const struct dohrequest req[] = { |
| + | {"test.host.name", DNS_TYPE_A, DNS_Q1, sizeof(DNS_Q1)-1, DOH_OK }, |
| + | {"test.host.name", DNS_TYPE_AAAA, DNS_Q2, sizeof(DNS_Q2)-1, DOH_OK }, |
| + | {"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" |
| + | ".host.name", |
| + | DNS_TYPE_AAAA, NULL, 0, DOH_DNS_BAD_LABEL } |
| + | }; |
| + | |
| + | struct dohresp { |
| + | /* input */ |
| + | const char *packet; |
| + | size_t size; |
| + | DNStype type; |
| + | |
| + | /* output */ |
| + | DOHcode rc; |
| + | const char *out; |
| + | }; |
| #define DNS_FOO_EXAMPLE_COM \ | |
| "\x00\x00\x01\x00\x00\x01\x00\x01\x00\x00\x00\x00\x03\x66\x6f\x6f" \ | |
| @@ -86,9 +80,9 @@ struct dohresp { | |
| "\x01\xc0\x0c\x00\x01\x00\x01\x00\x00\x00\x37\x00\x04\x7f\x00\x00" \ | |
| "\x01" | |
| - | static const char full49[] = DNS_FOO_EXAMPLE_COM; |
| + | static const char full49[] = DNS_FOO_EXAMPLE_COM; |
| - | static const struct dohresp resp[] = { |
| + | static const struct dohresp resp[] = { |
| {"\x00\x00", 2, DNS_TYPE_A, DOH_TOO_SMALL_BUFFER, NULL }, | |
| {"\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01", 12, | |
| DNS_TYPE_A, DOH_DNS_BAD_ID, NULL }, | |
| @@ -151,10 +145,8 @@ static const struct dohresp resp[] = { | |
| DNS_TYPE_AAAA, DOH_OK, | |
| "2020:2020:0000:0000:0000:0000:0000:2020 " }, | |
| - | }; |
| + | }; |
| - | UNITTEST_START |
| - | { |
| size_t size = 0; | |
| unsigned char buffer[256]; | |
| size_t i; | |
| @@ -285,13 +277,7 @@ UNITTEST_START | |
| } | |
| fail_if(d.numcname, "bad cname counter"); | |
| } | |
| - | } |
| - | UNITTEST_STOP |
| - | |
| - | #else /* CURL_DISABLE_DOH */ |
| - | UNITTEST_START |
| - | /* nothing to do, just succeed */ |
| - | UNITTEST_STOP |
| - | |
| - | |
| #endif | |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -25,20 +25,15 @@ | |
| #include "vtls/x509asn1.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| + | static CURLcode test_unit1651(char *arg) |
| { | |
| + | UNITTEST_BEGIN_SIMPLE |
| - | } |
| #if defined(USE_GNUTLS) || defined(USE_SCHANNEL) | |
| - | /* cert captured from gdb when connecting to curl.se on October 26 |
| - | 2018 */ |
| - | static unsigned char cert[] = { |
| + | /* cert captured from gdb when connecting to curl.se on October 26 |
| + | 2018 */ |
| + | static unsigned char cert[] = { |
| 0x30, 0x82, 0x0F, 0x5B, 0x30, 0x82, 0x0E, 0x43, 0xA0, 0x03, 0x02, 0x01, 0x02, | |
| 0x02, 0x0C, 0x08, 0x77, 0x99, 0x2C, 0x6B, 0x67, 0xE1, 0x18, 0xD6, 0x66, 0x66, | |
| 0x9E, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, | |
| @@ -342,10 +337,8 @@ static unsigned char cert[] = { | |
| 0x70, 0x77, 0x54, 0x57, 0x09, 0x03, 0x56, 0x4A, 0x33, 0x60, 0x00, 0x27, 0xFE, | |
| 0xA7, 0xD7, 0xA9, 0xC4, 0xEC, 0x17, 0x17, 0x8D, 0x87, 0x70, 0x6B, 0x48, 0x88, | |
| 0x61, 0x54, 0x4A, 0x2B, 0xB7, 0x6A, 0x12, 0x08, 0xFB, | |
| - | }; |
| + | }; |
| - | UNITTEST_START |
| - | { |
| CURLcode result; | |
| const char *beg = (const char *)&cert[0]; | |
| const char *end = (const char *)&cert[sizeof(cert)]; | |
| @@ -378,15 +371,9 @@ UNITTEST_START | |
| curl_easy_cleanup(data); | |
| } | |
| curl_global_cleanup(); | |
| - | } |
| - | UNITTEST_STOP |
| - | |
| #else | |
| + | puts("not tested since Curl_extract_certinfo() is not built in"); |
| + | #endif |
| - | UNITTEST_START |
| - | { |
| - | puts("not tested since Curl_extract_certinfo() is not built-in"); |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| - | |
| - | #endif |
| @@ -32,21 +32,16 @@ | |
| * updated to still be valid. | |
| */ | |
| - | static struct Curl_easy *t1652_easy; |
| - | |
| static char input[4096]; | |
| static char output[4096]; | |
| - | int debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size, |
| - | void *userptr); |
| - | |
| /* | |
| * This debugf callback is simply dumping the string into the static buffer | |
| * 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) |
| + | static int debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size, |
| + | void *userptr) |
| { | |
| (void)handle; | |
| (void)type; | |
| @@ -57,24 +52,24 @@ int debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size, | |
| return 0; | |
| } | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1652_setup(struct Curl_easy **easy) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| - | t1652_easy = curl_easy_init(); |
| - | if(!t1652_easy) { |
| + | *easy = curl_easy_init(); |
| + | if(!*easy) { |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| - | curl_easy_setopt(t1652_easy, CURLOPT_DEBUGFUNCTION, debugf_cb); |
| - | curl_easy_setopt(t1652_easy, CURLOPT_VERBOSE, 1L); |
| + | curl_easy_setopt(*easy, CURLOPT_DEBUGFUNCTION, debugf_cb); |
| + | curl_easy_setopt(*easy, CURLOPT_VERBOSE, 1L); |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1652_stop(struct Curl_easy *easy) |
| { | |
| - | curl_easy_cleanup(t1652_easy); |
| + | curl_easy_cleanup(easy); |
| curl_global_cleanup(); | |
| } | |
| @@ -87,7 +82,11 @@ static int verify(const char *info, const char *two) | |
| return strncmp(info, two, nl - info); | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1652(char *arg) |
| + | { |
| + | struct Curl_easy *easy; |
| + | |
| + | UNITTEST_BEGIN(t1652_setup(&easy)) |
| #if defined(CURL_GNUC_DIAG) && !defined(__clang__) | |
| #pragma GCC diagnostic push | |
| @@ -100,18 +99,18 @@ UNITTEST_START | |
| /* Injecting a simple short string via a format */ | |
| curl_msnprintf(input, sizeof(input), "Simple Test"); | |
| - | Curl_infof(t1652_easy, "%s", input); |
| + | Curl_infof(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); |
| + | Curl_infof(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, ""); |
| + | Curl_infof(easy, ""); |
| fail_unless(strlen(output) == 1, "Empty string"); | |
| - | Curl_infof(t1652_easy, "%s", (char *)NULL); |
| + | Curl_infof(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 | |
| @@ -124,7 +123,7 @@ UNITTEST_START | |
| /* A string just long enough to not be truncated */ | |
| memset(input, '\0', sizeof(input)); | |
| memset(input, 'A', 2045); | |
| - | Curl_infof(t1652_easy, "%s", input); |
| + | Curl_infof(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"); | |
| @@ -134,7 +133,7 @@ UNITTEST_START | |
| /* Just over the limit without newline for truncation via '...' */ | |
| memset(input + 2045, 'A', 4); | |
| - | Curl_infof(t1652_easy, "%s", input); |
| + | Curl_infof(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', | |
| @@ -143,7 +142,7 @@ UNITTEST_START | |
| /* 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); |
| + | Curl_infof(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', | |
| @@ -152,7 +151,7 @@ UNITTEST_START | |
| /* Way over the limit for truncation via '...' */ | |
| memset(input, '\0', sizeof(input)); | |
| memset(input, 'A', sizeof(input) - 1); | |
| - | Curl_infof(t1652_easy, "%s", input); |
| + | Curl_infof(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', | |
| @@ -162,4 +161,5 @@ UNITTEST_START | |
| #pragma GCC diagnostic pop | |
| #endif | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t1652_stop(easy)) |
| + | } |
| @@ -27,23 +27,9 @@ | |
| #include "curl/urlapi.h" | |
| #include "urlapi-int.h" | |
| - | |
| - | static CURLU *u; |
| - | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| #define free_and_clear(x) free(x); x = NULL | |
| - | static CURLUcode parse_port(CURLU *url, |
| - | char *h, bool has_scheme) |
| + | static CURLUcode parse_port(CURLU *url, char *h, bool has_scheme) |
| { | |
| struct dynbuf host; | |
| CURLUcode ret; | |
| @@ -55,8 +41,12 @@ static CURLUcode parse_port(CURLU *url, | |
| return ret; | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1653(char *arg) |
| { | |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| + | CURLU *u; |
| + | |
| CURLUcode ret; | |
| char *ipv6port = NULL; | |
| char *portnum; | |
| @@ -226,5 +216,5 @@ fail: | |
| free(ipv6port); | |
| curl_url_cleanup(u); | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| @@ -26,19 +26,11 @@ | |
| #include "urldata.h" | |
| #include "altsvc.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1654(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_global_cleanup(); |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| - | UNITTEST_START |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_ALTSVC) | |
| - | { |
| char outname[256]; | |
| CURL *curl; | |
| CURLcode result; | |
| @@ -132,6 +124,7 @@ UNITTEST_START | |
| curl_easy_cleanup(curl); | |
| fail: | |
| Curl_altsvc_cleanup(&asi); | |
| - | } |
| #endif | |
| - | UNITTEST_STOP |
| + | |
| + | UNITTEST_END(curl_global_cleanup()) |
| + | } |
| @@ -25,166 +25,153 @@ | |
| #include "doh.h" /* from the lib dir */ | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1655(char *arg) |
| { | |
| - | /* whatever you want done first */ |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | /* done before shutting down and exiting */ |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| #ifndef CURL_DISABLE_DOH | |
| - | |
| - | UNITTEST_START |
| - | |
| - | /* |
| - | * Prove detection of write overflow using a short buffer and a name |
| - | * of maximal valid length. |
| - | * |
| - | * Prove detection of other invalid input. |
| - | */ |
| - | do { |
| - | static const char max[] = |
| - | /* ..|....1.........2.........3.........4.........5.........6... */ |
| - | /* 3456789012345678901234567890123456789012345678901234567890123 */ |
| - | "this.is.a.maximum-length.hostname." /* 34: 34 */ |
| - | "with-no-label-of-greater-length-than-the-sixty-three-characters." |
| - | /* 64: 98 */ |
| - | "specified.in.the.RFCs." /* 22: 120 */ |
| - | "and.with.a.QNAME.encoding.whose.length.is.exactly." /* 50: 170 */ |
| - | "the.maximum.length.allowed." /* 27: 197 */ |
| - | "that.is.two-hundred.and.fifty-six." /* 34: 231 */ |
| - | "including.the.last.null." /* 24: 255 */ |
| - | ""; |
| - | static const char toolong[] = |
| - | /* ..|....1.........2.........3.........4.........5.........6... */ |
| - | /* 3456789012345678901234567890123456789012345678901234567890123 */ |
| - | "here.is.a.hostname.which.is.just.barely.too.long." /* 49: 49 */ |
| - | "to.be.encoded.as.a.QNAME.of.the.maximum.allowed.length." |
| - | /* 55: 104 */ |
| - | "which.is.256.including.a.final.zero-length.label." /* 49: 153 */ |
| - | "representing.the.root.node.so.that.a.name.with." /* 47: 200 */ |
| - | "a.trailing.dot.may.have.up.to." /* 30: 230 */ |
| - | "255.characters.never.more." /* 26: 256 */ |
| - | ""; |
| - | static const char emptylabel[] = |
| - | "this.is.an.otherwise-valid.hostname." |
| - | ".with.an.empty.label."; |
| - | static const char outsizelabel[] = |
| - | "this.is.an.otherwise-valid.hostname." |
| - | "with-a-label-of-greater-length-than-the-sixty-three-characters-" |
| - | "specified.in.the.RFCs."; |
| - | int i; |
| - | |
| - | struct test { |
| - | const char *name; |
| - | const DOHcode expected_result; |
| - | }; |
| - | |
| - | /* plays the role of struct dnsprobe in urldata.h */ |
| - | struct demo { |
| - | unsigned char dohbuffer[255 + 16]; /* deliberately short buffer */ |
| - | unsigned char canary1; |
| - | unsigned char canary2; |
| - | unsigned char canary3; |
| - | }; |
| - | |
| - | const struct test playlist[4] = { |
| - | { toolong, DOH_DNS_NAME_TOO_LONG }, /* expect early failure */ |
| - | { emptylabel, DOH_DNS_BAD_LABEL }, /* also */ |
| - | { outsizelabel, DOH_DNS_BAD_LABEL }, /* also */ |
| - | { max, DOH_OK } /* expect buffer overwrite */ |
| - | }; |
| - | |
| - | for(i = 0; i < (int)(CURL_ARRAYSIZE(playlist)); i++) { |
| - | const char *name = playlist[i].name; |
| - | size_t olen = 100000; |
| - | struct demo victim; |
| - | DOHcode d; |
| - | |
| - | victim.canary1 = 87; /* magic numbers, arbitrarily picked */ |
| - | victim.canary2 = 35; |
| - | victim.canary3 = 41; |
| - | d = doh_req_encode(name, DNS_TYPE_A, victim.dohbuffer, |
| - | sizeof(struct demo), /* allow room for overflow */ |
| - | &olen); |
| - | |
| - | fail_unless(d == playlist[i].expected_result, |
| - | "result returned was not as expected"); |
| - | if(d == playlist[i].expected_result) { |
| - | if(name == max) { |
| - | fail_if(victim.canary1 == 87, |
| - | "demo one-byte buffer overwrite did not happen"); |
| + | /* |
| + | * Prove detection of write overflow using a short buffer and a name |
| + | * of maximal valid length. |
| + | * |
| + | * Prove detection of other invalid input. |
| + | */ |
| + | do { |
| + | static const char max[] = |
| + | /* ..|....1.........2.........3.........4.........5.........6... */ |
| + | /* 3456789012345678901234567890123456789012345678901234567890123 */ |
| + | "this.is.a.maximum-length.hostname." /* 34: 34 */ |
| + | "with-no-label-of-greater-length-than-the-sixty-three-characters." |
| + | /* 64: 98 */ |
| + | "specified.in.the.RFCs." /* 22: 120 */ |
| + | "and.with.a.QNAME.encoding.whose.length.is.exactly." /* 50: 170 */ |
| + | "the.maximum.length.allowed." /* 27: 197 */ |
| + | "that.is.two-hundred.and.fifty-six." /* 34: 231 */ |
| + | "including.the.last.null." /* 24: 255 */ |
| + | ""; |
| + | static const char toolong[] = |
| + | /* ..|....1.........2.........3.........4.........5.........6... */ |
| + | /* 3456789012345678901234567890123456789012345678901234567890123 */ |
| + | "here.is.a.hostname.which.is.just.barely.too.long." /* 49: 49 */ |
| + | "to.be.encoded.as.a.QNAME.of.the.maximum.allowed.length." |
| + | /* 55: 104 */ |
| + | "which.is.256.including.a.final.zero-length.label." /* 49: 153 */ |
| + | "representing.the.root.node.so.that.a.name.with." /* 47: 200 */ |
| + | "a.trailing.dot.may.have.up.to." /* 30: 230 */ |
| + | "255.characters.never.more." /* 26: 256 */ |
| + | ""; |
| + | static const char emptylabel[] = |
| + | "this.is.an.otherwise-valid.hostname." |
| + | ".with.an.empty.label."; |
| + | static const char outsizelabel[] = |
| + | "this.is.an.otherwise-valid.hostname." |
| + | "with-a-label-of-greater-length-than-the-sixty-three-characters-" |
| + | "specified.in.the.RFCs."; |
| + | int i; |
| + | |
| + | struct test { |
| + | const char *name; |
| + | const DOHcode expected_result; |
| + | }; |
| + | |
| + | /* plays the role of struct dnsprobe in urldata.h */ |
| + | struct demo { |
| + | unsigned char dohbuffer[255 + 16]; /* deliberately short buffer */ |
| + | unsigned char canary1; |
| + | unsigned char canary2; |
| + | unsigned char canary3; |
| + | }; |
| + | |
| + | const struct test playlist[4] = { |
| + | { toolong, DOH_DNS_NAME_TOO_LONG }, /* expect early failure */ |
| + | { emptylabel, DOH_DNS_BAD_LABEL }, /* also */ |
| + | { outsizelabel, DOH_DNS_BAD_LABEL }, /* also */ |
| + | { max, DOH_OK } /* expect buffer overwrite */ |
| + | }; |
| + | |
| + | for(i = 0; i < (int)(CURL_ARRAYSIZE(playlist)); i++) { |
| + | const char *name = playlist[i].name; |
| + | size_t olen = 100000; |
| + | struct demo victim; |
| + | DOHcode d; |
| + | |
| + | victim.canary1 = 87; /* magic numbers, arbitrarily picked */ |
| + | victim.canary2 = 35; |
| + | victim.canary3 = 41; |
| + | d = doh_req_encode(name, DNS_TYPE_A, victim.dohbuffer, |
| + | sizeof(struct demo), /* allow room for overflow */ |
| + | &olen); |
| + | |
| + | fail_unless(d == playlist[i].expected_result, |
| + | "result returned was not as expected"); |
| + | if(d == playlist[i].expected_result) { |
| + | if(name == max) { |
| + | fail_if(victim.canary1 == 87, |
| + | "demo one-byte buffer overwrite did not happen"); |
| + | } |
| + | else { |
| + | fail_unless(victim.canary1 == 87, |
| + | "one-byte buffer overwrite has happened"); |
| + | } |
| + | fail_unless(victim.canary2 == 35, |
| + | "two-byte buffer overwrite has happened"); |
| + | fail_unless(victim.canary3 == 41, |
| + | "three-byte buffer overwrite has happened"); |
| } | |
| else { | |
| - | fail_unless(victim.canary1 == 87, |
| - | "one-byte buffer overwrite has happened"); |
| + | if(d == DOH_OK) { |
| + | fail_unless(olen <= sizeof(victim.dohbuffer), |
| + | "wrote outside bounds"); |
| + | fail_unless(olen > strlen(name), "unrealistic low size"); |
| + | } |
| } | |
| - | fail_unless(victim.canary2 == 35, |
| - | "two-byte buffer overwrite has happened"); |
| - | fail_unless(victim.canary3 == 41, |
| - | "three-byte buffer overwrite has happened"); |
| } | |
| - | else { |
| - | if(d == DOH_OK) { |
| - | fail_unless(olen <= sizeof(victim.dohbuffer), "wrote outside bounds"); |
| - | fail_unless(olen > strlen(name), "unrealistic low size"); |
| - | } |
| - | } |
| - | } |
| - | } while(0); |
| - | |
| - | /* run normal cases and try to trigger buffer length related errors */ |
| - | do { |
| - | DNStype dnstype = DNS_TYPE_A; |
| - | unsigned char buffer[128]; |
| - | const size_t buflen = sizeof(buffer); |
| - | const size_t magic1 = 9765; |
| - | size_t olen1 = magic1; |
| - | const char *sunshine1 = "a.com"; |
| - | const char *dotshine1 = "a.com."; |
| - | const char *sunshine2 = "aa.com"; |
| - | size_t olen2; |
| - | DOHcode ret2; |
| - | size_t olen; |
| - | |
| - | DOHcode ret = doh_req_encode(sunshine1, dnstype, buffer, buflen, &olen1); |
| - | fail_unless(ret == DOH_OK, "sunshine case 1 should pass fine"); |
| - | fail_if(olen1 == magic1, "olen has not been assigned properly"); |
| - | fail_unless(olen1 > strlen(sunshine1), "bad out length"); |
| - | |
| - | /* with a trailing dot, the response should have the same length */ |
| - | olen2 = magic1; |
| - | ret2 = doh_req_encode(dotshine1, dnstype, buffer, buflen, &olen2); |
| - | fail_unless(ret2 == DOH_OK, "dotshine case should pass fine"); |
| - | fail_if(olen2 == magic1, "olen has not been assigned properly"); |
| - | fail_unless(olen1 == olen2, "olen should not grow for a trailing dot"); |
| - | |
| - | /* add one letter, the response should be one longer */ |
| - | olen2 = magic1; |
| - | ret2 = doh_req_encode(sunshine2, dnstype, buffer, buflen, &olen2); |
| - | fail_unless(ret2 == DOH_OK, "sunshine case 2 should pass fine"); |
| - | fail_if(olen2 == magic1, "olen has not been assigned properly"); |
| - | fail_unless(olen1 + 1 == olen2, "olen should grow with the hostname"); |
| - | |
| - | /* pass a short buffer, should fail */ |
| - | ret = doh_req_encode(sunshine1, dnstype, buffer, olen1 - 1, &olen); |
| - | fail_if(ret == DOH_OK, "short buffer should have been noticed"); |
| - | |
| - | /* pass a minimum buffer, should succeed */ |
| - | ret = doh_req_encode(sunshine1, dnstype, buffer, olen1, &olen); |
| - | fail_unless(ret == DOH_OK, "minimal length buffer should be long enough"); |
| - | fail_unless(olen == olen1, "bad buffer length"); |
| - | } while(0); |
| - | UNITTEST_STOP |
| - | |
| - | #else /* CURL_DISABLE_DOH */ |
| - | |
| - | UNITTEST_START |
| - | /* nothing to do, just succeed */ |
| - | UNITTEST_STOP |
| - | |
| - | #endif |
| + | } while(0); |
| + | |
| + | /* run normal cases and try to trigger buffer length related errors */ |
| + | do { |
| + | DNStype dnstype = DNS_TYPE_A; |
| + | unsigned char buffer[128]; |
| + | const size_t buflen = sizeof(buffer); |
| + | const size_t magic1 = 9765; |
| + | size_t olen1 = magic1; |
| + | const char *sunshine1 = "a.com"; |
| + | const char *dotshine1 = "a.com."; |
| + | const char *sunshine2 = "aa.com"; |
| + | size_t olen2; |
| + | DOHcode ret2; |
| + | size_t olen; |
| + | |
| + | DOHcode ret = doh_req_encode(sunshine1, dnstype, buffer, buflen, &olen1); |
| + | fail_unless(ret == DOH_OK, "sunshine case 1 should pass fine"); |
| + | fail_if(olen1 == magic1, "olen has not been assigned properly"); |
| + | fail_unless(olen1 > strlen(sunshine1), "bad out length"); |
| + | |
| + | /* with a trailing dot, the response should have the same length */ |
| + | olen2 = magic1; |
| + | ret2 = doh_req_encode(dotshine1, dnstype, buffer, buflen, &olen2); |
| + | fail_unless(ret2 == DOH_OK, "dotshine case should pass fine"); |
| + | fail_if(olen2 == magic1, "olen has not been assigned properly"); |
| + | fail_unless(olen1 == olen2, "olen should not grow for a trailing dot"); |
| + | |
| + | /* add one letter, the response should be one longer */ |
| + | olen2 = magic1; |
| + | ret2 = doh_req_encode(sunshine2, dnstype, buffer, buflen, &olen2); |
| + | fail_unless(ret2 == DOH_OK, "sunshine case 2 should pass fine"); |
| + | fail_if(olen2 == magic1, "olen has not been assigned properly"); |
| + | fail_unless(olen1 + 1 == olen2, "olen should grow with the hostname"); |
| + | |
| + | /* pass a short buffer, should fail */ |
| + | ret = doh_req_encode(sunshine1, dnstype, buffer, olen1 - 1, &olen); |
| + | fail_if(ret == DOH_OK, "short buffer should have been noticed"); |
| + | |
| + | /* pass a minimum buffer, should succeed */ |
| + | ret = doh_req_encode(sunshine1, dnstype, buffer, olen1, &olen); |
| + | fail_unless(ret == DOH_OK, "minimal length buffer should be long enough"); |
| + | fail_unless(olen == olen1, "bad buffer length"); |
| + | } while(0); |
| + | |
| + | #endif /* CURL_DISABLE_DOH */ |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -25,16 +25,6 @@ | |
| #include "vtls/x509asn1.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| #if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_MBEDTLS) | |
| struct test_spec { | |
| @@ -43,7 +33,34 @@ struct test_spec { | |
| CURLcode exp_result; | |
| }; | |
| - | static struct test_spec test_specs[] = { |
| + | static bool do_test(const struct test_spec *spec, size_t i, |
| + | struct dynbuf *dbuf) |
| + | { |
| + | CURLcode result; |
| + | const char *in = spec->input; |
| + | |
| + | curlx_dyn_reset(dbuf); |
| + | result = Curl_x509_GTime2str(dbuf, in, in + strlen(in)); |
| + | if(result != spec->exp_result) { |
| + | curl_mfprintf(stderr, "test %zu: expect result %d, got %d\n", |
| + | i, spec->exp_result, result); |
| + | return FALSE; |
| + | } |
| + | else if(!result && strcmp(spec->exp_output, curlx_dyn_ptr(dbuf))) { |
| + | curl_mfprintf(stderr, |
| + | "test %zu: input '%s', expected output '%s', got '%s'\n", |
| + | i, in, spec->exp_output, curlx_dyn_ptr(dbuf)); |
| + | return FALSE; |
| + | } |
| + | |
| + | return TRUE; |
| + | } |
| + | |
| + | static CURLcode test_unit1656(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| + | static const struct test_spec test_specs[] = { |
| { "190321134340", "1903-21-13 43:40:00", CURLE_OK }, | |
| { "", NULL, CURLE_BAD_FUNCTION_ARGUMENT }, | |
| { "WTF", NULL, CURLE_BAD_FUNCTION_ARGUMENT }, | |
| @@ -70,32 +87,8 @@ static struct test_spec test_specs[] = { | |
| { "190321134340-3", "1903-21-13 43:40:00 UTC-3", CURLE_OK }, | |
| { "19032113434017.0-04", "1903-21-13 43:40:17 UTC-04", CURLE_OK }, | |
| { "19032113434017.01-01:10", "1903-21-13 43:40:17.01 UTC-01:10", CURLE_OK }, | |
| - | }; |
| - | |
| - | static bool do_test(struct test_spec *spec, size_t i, struct dynbuf *dbuf) |
| - | { |
| - | CURLcode result; |
| - | const char *in = spec->input; |
| + | }; |
| - | curlx_dyn_reset(dbuf); |
| - | result = Curl_x509_GTime2str(dbuf, in, in + strlen(in)); |
| - | if(result != spec->exp_result) { |
| - | curl_mfprintf(stderr, "test %zu: expect result %d, got %d\n", |
| - | i, spec->exp_result, result); |
| - | return FALSE; |
| - | } |
| - | else if(!result && strcmp(spec->exp_output, curlx_dyn_ptr(dbuf))) { |
| - | curl_mfprintf(stderr, |
| - | "test %zu: input '%s', expected output '%s', got '%s'\n", |
| - | i, in, spec->exp_output, curlx_dyn_ptr(dbuf)); |
| - | return FALSE; |
| - | } |
| - | |
| - | return TRUE; |
| - | } |
| - | |
| - | UNITTEST_START |
| - | { |
| size_t i; | |
| struct dynbuf dbuf; | |
| bool all_ok = TRUE; | |
| @@ -115,15 +108,17 @@ UNITTEST_START | |
| curlx_dyn_free(&dbuf); | |
| curl_global_cleanup(); | |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| #else | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1656(char *arg) |
| { | |
| - | puts("not tested since Curl_x509_GTime2str() is not built-in"); |
| + | UNITTEST_BEGIN_SIMPLE |
| + | puts("not tested since Curl_x509_GTime2str() is not built in"); |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| #endif | |
| @@ -25,30 +25,21 @@ | |
| #include "vtls/x509asn1.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | |
| - | } |
| - | |
| #if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_MBEDTLS) | |
| struct test1657_spec { | |
| - | CURLcode (*setbuf)(struct test1657_spec *spec, struct dynbuf *buf); |
| + | CURLcode (*setbuf)(const struct test1657_spec *spec, struct dynbuf *buf); |
| size_t n; | |
| CURLcode exp_result; | |
| }; | |
| - | static CURLcode make1657_nested(struct test1657_spec *spec, struct dynbuf *buf) |
| + | static CURLcode make1657_nested(const struct test1657_spec *spec, |
| + | struct dynbuf *buf) |
| { | |
| CURLcode r; | |
| size_t i; | |
| - | unsigned char open_undef[] = { 0x32, 0x80 }; |
| - | unsigned char close_undef[] = { 0x00, 0x00 }; |
| + | unsigned char open_undef[] = { 0x32, 0x80 }; |
| + | unsigned char close_undef[] = { 0x00, 0x00 }; |
| for(i = 0; i < spec->n; ++i) { | |
| r = curlx_dyn_addn(buf, open_undef, sizeof(open_undef)); | |
| @@ -63,14 +54,14 @@ static CURLcode make1657_nested(struct test1657_spec *spec, struct dynbuf *buf) | |
| return CURLE_OK; | |
| } | |
| - | static struct test1657_spec test1657_specs[] = { |
| + | static const struct test1657_spec test1657_specs[] = { |
| { make1657_nested, 3, CURLE_OK }, | |
| { make1657_nested, 16, CURLE_OK }, | |
| { make1657_nested, 17, CURLE_BAD_FUNCTION_ARGUMENT }, | |
| { make1657_nested, 1024, CURLE_BAD_FUNCTION_ARGUMENT }, | |
| }; | |
| - | static bool do_test1657(struct test1657_spec *spec, size_t i, |
| + | static bool do_test1657(const struct test1657_spec *spec, size_t i, |
| struct dynbuf *buf) | |
| { | |
| CURLcode result; | |
| @@ -94,8 +85,10 @@ static bool do_test1657(struct test1657_spec *spec, size_t i, | |
| return TRUE; | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1657(char *arg) |
| { | |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| size_t i; | |
| bool all_ok = TRUE; | |
| struct dynbuf dbuf; | |
| @@ -115,15 +108,17 @@ UNITTEST_START | |
| curlx_dyn_free(&dbuf); | |
| curl_global_cleanup(); | |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| #else | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1657(char *arg) |
| { | |
| - | puts("not tested since Curl_x509_getASN1Element() is not built-in"); |
| + | UNITTEST_BEGIN_SIMPLE |
| + | puts("not tested since Curl_x509_getASN1Element() is not built in"); |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| #endif | |
| @@ -25,35 +25,22 @@ | |
| #include "doh.h" /* from the lib dir */ | |
| - | static CURLcode unit_setup(void) |
| + | /* DoH + HTTPSRR are required */ |
| + | #if !defined(CURL_DISABLE_DOH) && defined(USE_HTTPSRR) |
| + | |
| + | static CURLcode t1658_setup(void) |
| { | |
| /* whatever you want done first */ | |
| curl_global_init(CURL_GLOBAL_ALL); | |
| return CURLE_OK; | |
| } | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_global_cleanup(); |
| - | /* done before shutting down and exiting */ |
| - | } |
| - | |
| - | /* DoH + HTTPSRR are required */ |
| - | #if !defined(CURL_DISABLE_DOH) && defined(USE_HTTPSRR) |
| - | |
| extern CURLcode doh_resp_decode_httpsrr(struct Curl_easy *data, | |
| const unsigned char *cp, size_t len, | |
| struct Curl_https_rrinfo **hrr); | |
| extern void doh_print_httpsrr(struct Curl_easy *data, | |
| struct Curl_https_rrinfo *hrr); | |
| - | struct test { |
| - | const char *name; |
| - | const unsigned char *dns; |
| - | size_t len; /* size of the dns packet */ |
| - | const char *expect; |
| - | }; |
| - | |
| /* | |
| * The idea here is that we pass one DNS packet at the time to the decoder. we | |
| * then generate a string output with the results and compare if it matches | |
| @@ -127,12 +114,21 @@ static void rrresults(struct Curl_https_rrinfo *rr, CURLcode result) | |
| } | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1658(char *arg) |
| { | |
| + | UNITTEST_BEGIN(t1658_setup()) |
| + | |
| /* The "SvcParamKeys" specified within the HTTPS RR packet *must* be | |
| provided in numerical order. */ | |
| - | static struct test t[] = { |
| + | struct test { |
| + | const char *name; |
| + | const unsigned char *dns; |
| + | size_t len; /* size of the dns packet */ |
| + | const char *expect; |
| + | }; |
| + | |
| + | static const struct test t[] = { |
| { | |
| "single h2 alpn", | |
| (const unsigned char *)"\x00\x00" /* 16-bit prio */ | |
| @@ -541,13 +537,16 @@ UNITTEST_START | |
| } | |
| curl_easy_cleanup(easy); | |
| } | |
| + | |
| + | UNITTEST_END(curl_global_cleanup()) |
| } | |
| - | UNITTEST_STOP |
| #else /* CURL_DISABLE_DOH or not HTTPSRR enabled */ | |
| - | UNITTEST_START |
| - | /* nothing to do, just succeed */ |
| - | UNITTEST_STOP |
| + | static CURLcode test_unit1658(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | UNITTEST_END_SIMPLE |
| + | } |
| #endif | |
| @@ -26,32 +26,38 @@ | |
| #include "urldata.h" | |
| #include "hsts.h" | |
| - | static CURLcode unit_setup(void) |
| + | #if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_HSTS) |
| + | static CURLcode test_unit1660(char *arg) |
| { | |
| - | return CURLE_OK; |
| + | UNITTEST_BEGIN_SIMPLE |
| + | puts("nothing to do when HTTP or HSTS are disabled"); |
| + | UNITTEST_END_SIMPLE |
| } | |
| + | #else |
| - | static void unit_stop(void) |
| + | static void showsts(struct stsentry *e, const char *chost) |
| { | |
| - | curl_global_cleanup(); |
| + | if(!e) |
| + | printf("'%s' is not HSTS\n", chost); |
| + | else { |
| + | curl_mprintf("%s [%s]: %" CURL_FORMAT_CURL_OFF_T "%s\n", |
| + | chost, e->host, e->expires, |
| + | e->includeSubDomains ? " includeSubDomains" : ""); |
| + | } |
| } | |
| - | #if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_HSTS) |
| - | UNITTEST_START |
| + | static CURLcode test_unit1660(char *arg) |
| { | |
| - | puts("nothing to do when HTTP or HSTS are disabled"); |
| - | } |
| - | UNITTEST_STOP |
| - | #else |
| + | UNITTEST_BEGIN_SIMPLE |
| - | struct testit { |
| - | const char *host; |
| - | const char *chost; /* if non-NULL, use to lookup with */ |
| - | const char *hdr; /* if NULL, just do the lookup */ |
| - | const CURLcode result; /* parse result */ |
| - | }; |
| + | struct testit { |
| + | const char *host; |
| + | const char *chost; /* if non-NULL, use to lookup with */ |
| + | const char *hdr; /* if NULL, just do the lookup */ |
| + | const CURLcode result; /* parse result */ |
| + | }; |
| - | static const struct testit headers[] = { |
| + | static const struct testit headers[] = { |
| /* two entries read from disk cache, verify first */ | |
| { "-", "readfrom.example", NULL, CURLE_OK}, | |
| { "-", "old.example", NULL, CURLE_OK}, | |
| @@ -102,21 +108,8 @@ static const struct testit headers[] = { | |
| /* make this live for 7 seconds */ | |
| { "expire.example", NULL, "max-age=\"7\"\r\n", CURLE_OK }, | |
| { NULL, NULL, NULL, CURLE_OK } | |
| - | }; |
| - | |
| - | static void showsts(struct stsentry *e, const char *chost) |
| - | { |
| - | if(!e) |
| - | printf("'%s' is not HSTS\n", chost); |
| - | else { |
| - | curl_mprintf("%s [%s]: %" CURL_FORMAT_CURL_OFF_T "%s\n", |
| - | chost, e->host, e->expires, |
| - | e->includeSubDomains ? " includeSubDomains" : ""); |
| - | } |
| - | } |
| + | }; |
| - | UNITTEST_START |
| - | { |
| CURLcode result; | |
| struct stsentry *e; | |
| struct hsts *h = Curl_hsts_init(); | |
| @@ -173,6 +166,7 @@ UNITTEST_START | |
| Curl_hsts_cleanup(&h); | |
| curl_easy_cleanup(easy); | |
| curl_global_cleanup(); | |
| + | |
| + | UNITTEST_END(curl_global_cleanup()) |
| } | |
| - | UNITTEST_STOP |
| #endif | |
| @@ -25,8 +25,6 @@ | |
| #include "bufref.h" | |
| #include "memdebug.h" | |
| - | static struct bufref bufref; |
| - | |
| static int freecount = 0; | |
| static void test_free(void *p) | |
| @@ -36,19 +34,23 @@ static void test_free(void *p) | |
| free(p); | |
| } | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1661_setup(struct bufref *bufref) |
| { | |
| - | Curl_bufref_init(&bufref); |
| + | Curl_bufref_init(bufref); |
| return CURLE_OK; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t1661_stop(struct bufref *bufref) |
| { | |
| - | Curl_bufref_free(&bufref); |
| + | Curl_bufref_free(bufref); |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1661(char *arg) |
| { | |
| + | struct bufref bufref; |
| + | |
| + | UNITTEST_BEGIN(t1661_setup(&bufref)) |
| + | |
| const char *buffer = NULL; | |
| CURLcode result = CURLE_OK; | |
| @@ -59,7 +61,6 @@ UNITTEST_START | |
| * 2: reference will be NULL | |
| * 3: destructor will be NULL | |
| */ | |
| - | |
| fail_unless(!bufref.ptr, "Initial reference must be NULL"); | |
| fail_unless(!bufref.len, "Initial length must be NULL"); | |
| fail_unless(!bufref.dtor, "Destructor must be NULL"); | |
| @@ -67,7 +68,6 @@ UNITTEST_START | |
| /** | |
| * testing Curl_bufref_set | |
| */ | |
| - | |
| buffer = malloc(13); | |
| abort_unless(buffer, "Out of memory"); | |
| Curl_bufref_set(&bufref, buffer, 13, test_free); | |
| @@ -79,20 +79,17 @@ UNITTEST_START | |
| /** | |
| * testing Curl_bufref_ptr | |
| */ | |
| - | |
| fail_unless((const char *) Curl_bufref_ptr(&bufref) == buffer, | |
| "Wrong pointer value returned"); | |
| /** | |
| * testing Curl_bufref_len | |
| */ | |
| - | |
| fail_unless(Curl_bufref_len(&bufref) == 13, "Wrong data size returned"); | |
| /** | |
| * testing Curl_bufref_memdup | |
| */ | |
| - | |
| result = Curl_bufref_memdup(&bufref, "1661", 3); | |
| abort_unless(result == CURLE_OK, curl_easy_strerror(result)); | |
| fail_unless(freecount == 1, "Destructor not called"); | |
| @@ -108,11 +105,11 @@ UNITTEST_START | |
| /** | |
| * testing Curl_bufref_free | |
| */ | |
| - | |
| Curl_bufref_free(&bufref); | |
| fail_unless(freecount == 1, "Wrong destructor called"); | |
| fail_unless(!bufref.ptr, "Initial reference must be NULL"); | |
| fail_unless(!bufref.len, "Initial length must be NULL"); | |
| fail_unless(!bufref.dtor, "Destructor must be NULL"); | |
| + | |
| + | UNITTEST_END(t1661_stop(&bufref)) |
| } | |
| - | UNITTEST_STOP |
| @@ -30,24 +30,17 @@ | |
| #include <netinet/in6.h> | |
| #endif | |
| - | #include <curl/curl.h> |
| - | |
| #include "cf-socket.h" | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1663_setup(void) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| - | { |
| - | curl_global_cleanup(); |
| - | } |
| - | |
| static void t1663_parse( | |
| const char *input_data, | |
| const char *exp_dev, | |
| @@ -79,8 +72,10 @@ static void t1663_parse( | |
| free(host); | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit1663(char *arg) |
| { | |
| + | UNITTEST_BEGIN(t1663_setup()) |
| + | |
| 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); | |
| @@ -93,5 +88,6 @@ UNITTEST_START | |
| 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_END(curl_global_cleanup()) |
| } | |
| - | UNITTEST_STOP |
| @@ -30,26 +30,21 @@ | |
| #include <netinet/in6.h> | |
| #endif | |
| - | #include <curl/curl.h> |
| - | |
| #include "curlx/strparse.h" | |
| #include "memdebug.h" /* LAST include file */ | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t1664_setup(void) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static CURLcode test_unit1664(char *arg) |
| { | |
| - | curl_global_cleanup(); |
| - | } |
| + | UNITTEST_BEGIN(t1664_setup()) |
| - | UNITTEST_START |
| - | { |
| static const char *wordparse[] = { | |
| "word", | |
| "word ", | |
| @@ -487,5 +482,5 @@ UNITTEST_START | |
| } | |
| } | |
| + | UNITTEST_END(curl_global_cleanup()) |
| } | |
| - | UNITTEST_STOP |
| @@ -26,17 +26,10 @@ | |
| #include "http_aws_sigv4.h" | |
| #include "dynbuf.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1979(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| - | UNITTEST_START |
| - | { |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_AWS) | |
| struct testcase { | |
| const char *testname; | |
| @@ -140,5 +133,6 @@ UNITTEST_START | |
| curlx_dyn_free(&canonical_path); | |
| } | |
| #endif /* !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_AWS) */ | |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| @@ -26,17 +26,10 @@ | |
| #include "http_aws_sigv4.h" | |
| #include "dynbuf.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit1980(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| - | UNITTEST_START |
| - | { |
| #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_AWS) | |
| struct testcase { | |
| const char *testname; | |
| @@ -111,5 +104,6 @@ UNITTEST_START | |
| curlx_dyn_free(&canonical_query); | |
| } | |
| #endif /* !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_AWS) */ | |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_STOP |
| @@ -48,26 +48,24 @@ | |
| #include "curl_trc.h" | |
| #include "memdebug.h" | |
| - | static CURL *t2600_easy; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t2600_setup(CURL **easy) |
| { | |
| CURLcode res = CURLE_OK; | |
| global_init(CURL_GLOBAL_ALL); | |
| - | t2600_easy = curl_easy_init(); |
| - | if(!t2600_easy) { |
| + | *easy = curl_easy_init(); |
| + | if(!*easy) { |
| curl_global_cleanup(); | |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| curl_global_trace("all"); | |
| - | curl_easy_setopt(t2600_easy, CURLOPT_VERBOSE, 1L); |
| + | curl_easy_setopt(*easy, CURLOPT_VERBOSE, 1L); |
| return res; | |
| } | |
| - | static void unit_stop(void) |
| + | static void t2600_stop(CURL *easy) |
| { | |
| - | curl_easy_cleanup(t2600_easy); |
| + | curl_easy_cleanup(easy); |
| curl_global_cleanup(); | |
| } | |
| @@ -104,7 +102,7 @@ struct test_result { | |
| struct ai_family_stats cf6; | |
| }; | |
| - | static struct test_case *current_tc; |
| + | static const struct test_case *current_tc; |
| static struct test_result *current_tr; | |
| struct cf_test_ctx { | |
| @@ -161,31 +159,31 @@ static void cf_test_adjust_pollset(struct Curl_cfilter *cf, | |
| Curl_pollset_set(data, ps, 1, TRUE, TRUE); | |
| } | |
| - | static struct Curl_cftype cft_test = { |
| - | "TEST", |
| - | CF_TYPE_IP_CONNECT, |
| - | CURL_LOG_LVL_NONE, |
| - | cf_test_destroy, |
| - | cf_test_connect, |
| - | Curl_cf_def_close, |
| - | Curl_cf_def_shutdown, |
| - | Curl_cf_def_get_host, |
| - | cf_test_adjust_pollset, |
| - | Curl_cf_def_data_pending, |
| - | Curl_cf_def_send, |
| - | Curl_cf_def_recv, |
| - | Curl_cf_def_cntrl, |
| - | Curl_cf_def_conn_is_alive, |
| - | Curl_cf_def_conn_keep_alive, |
| - | Curl_cf_def_query, |
| - | }; |
| - | |
| static CURLcode cf_test_create(struct Curl_cfilter **pcf, | |
| struct Curl_easy *data, | |
| struct connectdata *conn, | |
| const struct Curl_addrinfo *ai, | |
| int transport) | |
| { | |
| + | static const struct Curl_cftype cft_test = { |
| + | "TEST", |
| + | CF_TYPE_IP_CONNECT, |
| + | CURL_LOG_LVL_NONE, |
| + | cf_test_destroy, |
| + | cf_test_connect, |
| + | Curl_cf_def_close, |
| + | Curl_cf_def_shutdown, |
| + | Curl_cf_def_get_host, |
| + | cf_test_adjust_pollset, |
| + | Curl_cf_def_data_pending, |
| + | Curl_cf_def_send, |
| + | Curl_cf_def_recv, |
| + | Curl_cf_def_cntrl, |
| + | Curl_cf_def_conn_is_alive, |
| + | Curl_cf_def_conn_keep_alive, |
| + | Curl_cf_def_query, |
| + | }; |
| + | |
| struct cf_test_ctx *ctx = NULL; | |
| struct Curl_cfilter *cf = NULL; | |
| timediff_t created_at; | |
| @@ -238,7 +236,7 @@ out: | |
| return result; | |
| } | |
| - | static void check_result(struct test_case *tc, |
| + | static void check_result(const struct test_case *tc, |
| struct test_result *tr) | |
| { | |
| char msg[256]; | |
| @@ -301,7 +299,7 @@ static void check_result(struct test_case *tc, | |
| } | |
| } | |
| - | static void test_connect(struct test_case *tc) |
| + | static void test_connect(CURL *easy, const struct test_case *tc) |
| { | |
| struct test_result tr; | |
| struct curl_slist *list = NULL; | |
| @@ -312,23 +310,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(t2600_easy, CURLOPT_RESOLVE, list); |
| - | curl_easy_setopt(t2600_easy, CURLOPT_IPRESOLVE, (long)tc->ip_version); |
| - | curl_easy_setopt(t2600_easy, CURLOPT_CONNECTTIMEOUT_MS, |
| + | curl_easy_setopt(easy, CURLOPT_RESOLVE, list); |
| + | curl_easy_setopt(easy, CURLOPT_IPRESOLVE, (long)tc->ip_version); |
| + | curl_easy_setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, |
| (long)tc->connect_timeout_ms); | |
| - | curl_easy_setopt(t2600_easy, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, |
| + | curl_easy_setopt(easy, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, |
| (long)tc->he_timeout_ms); | |
| - | curl_easy_setopt(t2600_easy, CURLOPT_URL, tc->url); |
| + | curl_easy_setopt(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(t2600_easy); |
| + | tr.result = curl_easy_perform(easy); |
| tr.ended = curlx_now(); | |
| - | curl_easy_setopt(t2600_easy, CURLOPT_RESOLVE, NULL); |
| + | curl_easy_setopt(easy, CURLOPT_RESOLVE, NULL); |
| curl_slist_free_all(list); | |
| list = NULL; | |
| current_tc = NULL; | |
| @@ -355,46 +353,51 @@ static void test_connect(struct test_case *tc) | |
| #define TC_TMOT 90000 /* 90 sec max test duration */ | |
| #define CNCT_TMOT 60000 /* 60sec connect timeout */ | |
| - | static struct test_case TEST_CASES[] = { |
| - | /* TIMEOUT_MS, FAIL_MS CREATED DURATION Result, HE_PREF */ |
| - | /* CNCT HE v4 v6 v4 v6 MIN MAX */ |
| - | { 1, TURL, "test.com:123:192.0.2.1", CURL_IPRESOLVE_WHATEVER, |
| - | CNCT_TMOT, 150, 200, 200, 1, 0, 200, TC_TMOT, R_FAIL, NULL }, |
| - | /* 1 ipv4, fails after ~200ms, reports COULDNT_CONNECT */ |
| - | { 2, TURL, "test.com:123:192.0.2.1,192.0.2.2", CURL_IPRESOLVE_WHATEVER, |
| - | CNCT_TMOT, 150, 200, 200, 2, 0, 400, TC_TMOT, R_FAIL, NULL }, |
| - | /* 2 ipv4, fails after ~400ms, reports COULDNT_CONNECT */ |
| + | static CURLcode test_unit2600(char *arg) |
| + | { |
| + | CURL *easy; |
| + | |
| + | UNITTEST_BEGIN(t2600_setup(&easy)) |
| + | |
| + | static const struct test_case TEST_CASES[] = { |
| + | /* TIMEOUT_MS, FAIL_MS CREATED DURATION Result, HE_PREF */ |
| + | /* CNCT HE v4 v6 v4 v6 MIN MAX */ |
| + | { 1, TURL, "test.com:123:192.0.2.1", CURL_IPRESOLVE_WHATEVER, |
| + | CNCT_TMOT, 150, 200, 200, 1, 0, 200, TC_TMOT, R_FAIL, NULL }, |
| + | /* 1 ipv4, fails after ~200ms, reports COULDNT_CONNECT */ |
| + | { 2, TURL, "test.com:123:192.0.2.1,192.0.2.2", CURL_IPRESOLVE_WHATEVER, |
| + | CNCT_TMOT, 150, 200, 200, 2, 0, 400, TC_TMOT, R_FAIL, NULL }, |
| + | /* 2 ipv4, fails after ~400ms, reports COULDNT_CONNECT */ |
| #ifdef USE_IPV6 | |
| - | { 3, TURL, "test.com:123:::1", CURL_IPRESOLVE_WHATEVER, |
| - | CNCT_TMOT, 150, 200, 200, 0, 1, 200, TC_TMOT, R_FAIL, NULL }, |
| - | /* 1 ipv6, fails after ~200ms, reports COULDNT_CONNECT */ |
| - | { 4, TURL, "test.com:123:::1,::2", CURL_IPRESOLVE_WHATEVER, |
| - | CNCT_TMOT, 150, 200, 200, 0, 2, 400, TC_TMOT, R_FAIL, NULL }, |
| - | /* 2 ipv6, fails after ~400ms, reports COULDNT_CONNECT */ |
| - | |
| - | { 5, TURL, "test.com:123:192.0.2.1,::1", CURL_IPRESOLVE_WHATEVER, |
| - | CNCT_TMOT, 150, 200, 200, 1, 1, 350, TC_TMOT, R_FAIL, "v6" }, |
| - | /* mixed ip4+6, v6 always first, v4 kicks in on HE, fails after ~350ms */ |
| - | { 6, TURL, "test.com:123:::1,192.0.2.1", CURL_IPRESOLVE_WHATEVER, |
| - | CNCT_TMOT, 150, 200, 200, 1, 1, 350, TC_TMOT, R_FAIL, "v6" }, |
| - | /* mixed ip6+4, v6 starts, v4 never starts due to high HE, TIMEOUT */ |
| - | { 7, TURL, "test.com:123:192.0.2.1,::1", CURL_IPRESOLVE_V4, |
| - | CNCT_TMOT, 150, 500, 500, 1, 0, 400, TC_TMOT, R_FAIL, NULL }, |
| - | /* mixed ip4+6, but only use v4, check it uses full connect timeout, |
| - | although another address of the 'wrong' family is available */ |
| - | { 8, TURL, "test.com:123:::1,192.0.2.1", CURL_IPRESOLVE_V6, |
| - | CNCT_TMOT, 150, 500, 500, 0, 1, 400, TC_TMOT, R_FAIL, NULL }, |
| - | /* mixed ip4+6, but only use v6, check it uses full connect timeout, |
| - | although another address of the 'wrong' family is available */ |
| + | { 3, TURL, "test.com:123:::1", CURL_IPRESOLVE_WHATEVER, |
| + | CNCT_TMOT, 150, 200, 200, 0, 1, 200, TC_TMOT, R_FAIL, NULL }, |
| + | /* 1 ipv6, fails after ~200ms, reports COULDNT_CONNECT */ |
| + | { 4, TURL, "test.com:123:::1,::2", CURL_IPRESOLVE_WHATEVER, |
| + | CNCT_TMOT, 150, 200, 200, 0, 2, 400, TC_TMOT, R_FAIL, NULL }, |
| + | /* 2 ipv6, fails after ~400ms, reports COULDNT_CONNECT */ |
| + | |
| + | { 5, TURL, "test.com:123:192.0.2.1,::1", CURL_IPRESOLVE_WHATEVER, |
| + | CNCT_TMOT, 150, 200, 200, 1, 1, 350, TC_TMOT, R_FAIL, "v6" }, |
| + | /* mixed ip4+6, v6 always first, v4 kicks in on HE, fails after ~350ms */ |
| + | { 6, TURL, "test.com:123:::1,192.0.2.1", CURL_IPRESOLVE_WHATEVER, |
| + | CNCT_TMOT, 150, 200, 200, 1, 1, 350, TC_TMOT, R_FAIL, "v6" }, |
| + | /* mixed ip6+4, v6 starts, v4 never starts due to high HE, TIMEOUT */ |
| + | { 7, TURL, "test.com:123:192.0.2.1,::1", CURL_IPRESOLVE_V4, |
| + | CNCT_TMOT, 150, 500, 500, 1, 0, 400, TC_TMOT, R_FAIL, NULL }, |
| + | /* mixed ip4+6, but only use v4, check it uses full connect timeout, |
| + | although another address of the 'wrong' family is available */ |
| + | { 8, TURL, "test.com:123:::1,192.0.2.1", CURL_IPRESOLVE_V6, |
| + | CNCT_TMOT, 150, 500, 500, 0, 1, 400, TC_TMOT, R_FAIL, NULL }, |
| + | /* mixed ip4+6, but only use v6, check it uses full connect timeout, |
| + | although another address of the 'wrong' family is available */ |
| #endif | |
| - | }; |
| - | |
| - | UNITTEST_START |
| + | }; |
| size_t i; | |
| for(i = 0; i < CURL_ARRAYSIZE(TEST_CASES); ++i) { | |
| - | test_connect(&TEST_CASES[i]); |
| + | test_connect(easy, &TEST_CASES[i]); |
| } | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t2600_stop(easy)) |
| + | } |
| @@ -27,16 +27,6 @@ | |
| #include "bufq.h" | |
| #include "curl_trc.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | CURLcode res = CURLE_OK; |
| - | return res; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| - | |
| static const char *tail_err(struct bufq *q) | |
| { | |
| struct buf_chunk *chunk; | |
| @@ -86,12 +76,12 @@ static void dump_bufq(struct bufq *q, const char *msg) | |
| curl_mfprintf(stderr, "- spares: %zu\n", n); | |
| } | |
| - | static unsigned char test_data[32*1024]; |
| - | |
| static void check_bufq(size_t pool_spares, | |
| size_t chunk_size, size_t max_chunks, | |
| size_t wsize, size_t rsize, int opts) | |
| { | |
| + | static unsigned char test_data[32*1024]; |
| + | |
| struct bufq q; | |
| struct bufc_pool pool; | |
| size_t max_len = chunk_size * max_chunks; | |
| @@ -250,7 +240,10 @@ static void check_bufq(size_t pool_spares, | |
| Curl_bufcp_free(&pool); | |
| } | |
| - | UNITTEST_START |
| + | static CURLcode test_unit2601(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| struct bufq q; | |
| ssize_t n; | |
| CURLcode result; | |
| @@ -278,4 +271,5 @@ UNITTEST_START | |
| check_bufq(8, 8000, 10, 1234, 1234, BUFQ_OPT_NONE); | |
| check_bufq(8, 1024, 4, 129, 127, BUFQ_OPT_NO_SPARES); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -28,17 +28,9 @@ | |
| #include "dynhds.h" | |
| #include "curl_trc.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit2602(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| - | |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| struct dynhds hds; | |
| struct dynbuf dbuf; | |
| @@ -145,4 +137,5 @@ UNITTEST_START | |
| Curl_dynhds_free(&hds); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -28,27 +28,7 @@ | |
| #include "http1.h" | |
| #include "curl_trc.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| - | |
| #ifndef CURL_DISABLE_HTTP | |
| - | struct tcase { |
| - | const char **input; |
| - | const char *default_scheme; |
| - | const char *method; |
| - | const char *scheme; |
| - | const char *authority; |
| - | const char *path; |
| - | size_t header_count; |
| - | size_t input_remain; |
| - | }; |
| - | |
| static void check_eq(const char *s, const char *exp_s, const char *name) | |
| { | |
| if(s && exp_s) { | |
| @@ -68,7 +48,18 @@ static void check_eq(const char *s, const char *exp_s, const char *name) | |
| } | |
| } | |
| - | static void parse_success(struct tcase *t) |
| + | struct tcase { |
| + | const char **input; |
| + | const char *default_scheme; |
| + | const char *method; |
| + | const char *scheme; |
| + | const char *authority; |
| + | const char *path; |
| + | size_t header_count; |
| + | size_t input_remain; |
| + | }; |
| + | |
| + | static void parse_success(const struct tcase *t) |
| { | |
| struct h1_req_parser p; | |
| const char *buf; | |
| @@ -119,70 +110,72 @@ static void parse_success(struct tcase *t) | |
| Curl_h1_req_parse_free(&p); | |
| } | |
| - | |
| - | static const char *T1_INPUT[] = { |
| - | "GET /path HTTP/1.1\r\nHost: test.curl.se\r\n\r\n", |
| - | NULL, |
| - | }; |
| - | static struct tcase TEST1a = { |
| - | T1_INPUT, NULL, "GET", NULL, NULL, "/path", 1, 0 |
| - | }; |
| - | static struct tcase TEST1b = { |
| - | T1_INPUT, "https", "GET", "https", NULL, "/path", 1, 0 |
| - | }; |
| - | |
| - | static const char *T2_INPUT[] = { |
| - | "GET /path HTT", |
| - | "P/1.1\r\nHost: te", |
| - | "st.curl.se\r\n\r", |
| - | "\n12345678", |
| - | NULL, |
| - | }; |
| - | static struct tcase TEST2 = { |
| - | T2_INPUT, NULL, "GET", NULL, NULL, "/path", 1, 8 |
| - | }; |
| - | |
| - | static const char *T3_INPUT[] = { |
| - | "GET ftp://ftp.curl.se/xxx?a=2 HTTP/1.1\r\nContent-Length: 0\r", |
| - | "\nUser-Agent: xxx\r\n\r\n", |
| - | NULL, |
| - | }; |
| - | static struct tcase TEST3a = { |
| - | T3_INPUT, NULL, "GET", "ftp", "ftp.curl.se", "/xxx?a=2", 2, 0 |
| - | }; |
| - | |
| - | static const char *T4_INPUT[] = { |
| - | "CONNECT ftp.curl.se:123 HTTP/1.1\r\nContent-Length: 0\r\n", |
| - | "User-Agent: xxx\r\n", |
| - | "nothing: \r\n\r\n\n\n", |
| - | NULL, |
| - | }; |
| - | static struct tcase TEST4a = { |
| - | T4_INPUT, NULL, "CONNECT", NULL, "ftp.curl.se:123", NULL, 3, 2 |
| - | }; |
| - | |
| - | static const char *T5_INPUT[] = { |
| - | "OPTIONS * HTTP/1.1\r\nContent-Length: 0\r\nBlabla: xxx.yyy\r", |
| - | "\n\tzzzzzz\r\n\r\n", |
| - | "123", |
| - | NULL, |
| - | }; |
| - | static struct tcase TEST5a = { |
| - | T5_INPUT, NULL, "OPTIONS", NULL, NULL, "*", 2, 3 |
| - | }; |
| - | |
| - | static const char *T6_INPUT[] = { |
| - | "PUT /path HTTP/1.1\nHost: test.curl.se\n\n123", |
| - | NULL, |
| - | }; |
| - | static struct tcase TEST6a = { |
| - | T6_INPUT, NULL, "PUT", NULL, NULL, "/path", 1, 3 |
| - | }; |
| #endif | |
| - | UNITTEST_START |
| + | static CURLcode test_unit2603(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| #ifndef CURL_DISABLE_HTTP | |
| + | static const char *T1_INPUT[] = { |
| + | "GET /path HTTP/1.1\r\nHost: test.curl.se\r\n\r\n", |
| + | NULL, |
| + | }; |
| + | static const struct tcase TEST1a = { |
| + | T1_INPUT, NULL, "GET", NULL, NULL, "/path", 1, 0 |
| + | }; |
| + | static const struct tcase TEST1b = { |
| + | T1_INPUT, "https", "GET", "https", NULL, "/path", 1, 0 |
| + | }; |
| + | |
| + | static const char *T2_INPUT[] = { |
| + | "GET /path HTT", |
| + | "P/1.1\r\nHost: te", |
| + | "st.curl.se\r\n\r", |
| + | "\n12345678", |
| + | NULL, |
| + | }; |
| + | static const struct tcase TEST2 = { |
| + | T2_INPUT, NULL, "GET", NULL, NULL, "/path", 1, 8 |
| + | }; |
| + | |
| + | static const char *T3_INPUT[] = { |
| + | "GET ftp://ftp.curl.se/xxx?a=2 HTTP/1.1\r\nContent-Length: 0\r", |
| + | "\nUser-Agent: xxx\r\n\r\n", |
| + | NULL, |
| + | }; |
| + | static const struct tcase TEST3a = { |
| + | T3_INPUT, NULL, "GET", "ftp", "ftp.curl.se", "/xxx?a=2", 2, 0 |
| + | }; |
| + | |
| + | static const char *T4_INPUT[] = { |
| + | "CONNECT ftp.curl.se:123 HTTP/1.1\r\nContent-Length: 0\r\n", |
| + | "User-Agent: xxx\r\n", |
| + | "nothing: \r\n\r\n\n\n", |
| + | NULL, |
| + | }; |
| + | static const struct tcase TEST4a = { |
| + | T4_INPUT, NULL, "CONNECT", NULL, "ftp.curl.se:123", NULL, 3, 2 |
| + | }; |
| + | |
| + | static const char *T5_INPUT[] = { |
| + | "OPTIONS * HTTP/1.1\r\nContent-Length: 0\r\nBlabla: xxx.yyy\r", |
| + | "\n\tzzzzzz\r\n\r\n", |
| + | "123", |
| + | NULL, |
| + | }; |
| + | static const struct tcase TEST5a = { |
| + | T5_INPUT, NULL, "OPTIONS", NULL, NULL, "*", 2, 3 |
| + | }; |
| + | |
| + | static const char *T6_INPUT[] = { |
| + | "PUT /path HTTP/1.1\nHost: test.curl.se\n\n123", |
| + | NULL, |
| + | }; |
| + | static const struct tcase TEST6a = { |
| + | T6_INPUT, NULL, "PUT", NULL, NULL, "/path", 1, 3 |
| + | }; |
| + | |
| parse_success(&TEST1a); | |
| parse_success(&TEST1b); | |
| parse_success(&TEST2); | |
| @@ -192,4 +185,5 @@ UNITTEST_START | |
| parse_success(&TEST6a); | |
| #endif | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -25,27 +25,20 @@ | |
| #include "vssh/curl_path.h" | |
| #include "memdebug.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit2604(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| + | #ifdef USE_SSH |
| - | struct set { |
| - | const char *cp; |
| - | const char *expect; /* the returned content */ |
| - | const char *next; /* what cp points to after the call */ |
| - | const char *home; |
| - | CURLcode result; |
| - | }; |
| + | struct set { |
| + | const char *cp; |
| + | const char *expect; /* the returned content */ |
| + | const char *next; /* what cp points to after the call */ |
| + | const char *home; |
| + | CURLcode result; |
| + | }; |
| - | UNITTEST_START |
| - | #ifdef USE_SSH |
| - | { |
| #if defined(CURL_GNUC_DIAG) || defined(__clang__) | |
| #pragma GCC diagnostic push | |
| #pragma GCC diagnostic ignored "-Woverlength-strings" | |
| @@ -79,7 +72,7 @@ UNITTEST_START | |
| }; | |
| #if defined(CURL_GNUC_DIAG) || defined(__clang__) | |
| - | #pragma GCC diagnostic warning "-Woverlength-strings" |
| + | #pragma GCC diagnostic pop |
| #endif | |
| list[0].cp = calloc(1, too_long + 1); | |
| @@ -113,11 +106,8 @@ UNITTEST_START | |
| } | |
| free(CURL_UNCONST(list[0].cp)); | |
| - | } |
| - | #if defined(CURL_GNUC_DIAG) || defined(__clang__) |
| - | #pragma GCC diagnostic pop |
| - | #endif |
| #endif | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -25,67 +25,59 @@ | |
| #include "curl_get_line.h" | |
| #include "memdebug.h" | |
| + | static CURLcode test_unit3200(char *arg) |
| + | { |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| #if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) || \ | |
| !defined(CURL_DISABLE_HSTS) || !defined(CURL_DISABLE_NETRC) | |
| - | /* The test XML does not supply a way to write files without newlines |
| - | * so we write our own |
| - | */ |
| + | #if defined(CURL_GNUC_DIAG) || defined(__clang__) |
| + | #pragma GCC diagnostic push |
| + | #pragma GCC diagnostic ignored "-Woverlength-strings" |
| + | #endif |
| + | |
| + | /* The test XML does not supply a way to write files without newlines |
| + | * so we write our own |
| + | */ |
| #define C64 "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" | |
| #define C256 C64 C64 C64 C64 | |
| #define C1024 C256 C256 C256 C256 | |
| #define C4096 C1024 C1024 C1024 C1024 | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| + | static const char *filecontents[] = { |
| + | /* Both should be read */ |
| + | "LINE1\n" |
| + | "LINE2 NEWLINE\n", |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | /* Both should be read */ |
| + | "LINE1\n" |
| + | "LINE2 NONEWLINE", |
| - | #if defined(CURL_GNUC_DIAG) || defined(__clang__) |
| - | #pragma GCC diagnostic push |
| - | #pragma GCC diagnostic ignored "-Woverlength-strings" |
| - | #endif |
| - | |
| - | #define NUMTESTS 6 |
| - | static const char *filecontents[] = { |
| - | /* Both should be read */ |
| - | "LINE1\n" |
| - | "LINE2 NEWLINE\n", |
| - | |
| - | /* Both should be read */ |
| - | "LINE1\n" |
| - | "LINE2 NONEWLINE", |
| - | |
| - | /* Only first should be read */ |
| - | "LINE1\n" |
| - | C4096, |
| + | /* Only first should be read */ |
| + | "LINE1\n" |
| + | C4096, |
| - | /* First line should be read */ |
| - | "LINE1\n" |
| - | C4096 "SOME EXTRA TEXT", |
| + | /* First line should be read */ |
| + | "LINE1\n" |
| + | C4096 "SOME EXTRA TEXT", |
| - | /* Only first should be read */ |
| - | "LINE1\n" |
| - | C4096 "SOME EXTRA TEXT\n" |
| - | "LINE3\n", |
| + | /* Only first should be read */ |
| + | "LINE1\n" |
| + | C4096 "SOME EXTRA TEXT\n" |
| + | "LINE3\n", |
| - | "LINE1\x1aTEST" |
| - | }; |
| + | "LINE1\x1aTEST" |
| + | }; |
| #if defined(CURL_GNUC_DIAG) || defined(__clang__) | |
| - | #pragma GCC diagnostic warning "-Woverlength-strings" |
| + | #pragma GCC diagnostic pop |
| #endif | |
| - | |
| - | UNITTEST_START |
| size_t i; | |
| int rc = 0; | |
| - | for(i = 0; i < NUMTESTS; i++) { |
| + | for(i = 0; i < CURL_ARRAYSIZE(filecontents); i++) { |
| FILE *fp; | |
| struct dynbuf buf; | |
| size_t len = 4096; | |
| @@ -170,21 +162,8 @@ UNITTEST_START | |
| curl_mfprintf(stderr, "OK\n"); | |
| } | |
| return (CURLcode)rc; | |
| - | UNITTEST_STOP |
| - | #if defined(CURL_GNUC_DIAG) || defined(__clang__) |
| - | #pragma GCC diagnostic pop |
| #endif | |
| - | #else |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | static void unit_stop(void) |
| - | { |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | UNITTEST_START |
| - | UNITTEST_STOP |
| - | |
| - | #endif |
| @@ -25,511 +25,492 @@ | |
| #include "vtls/cipher_suite.h" | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode test_unit3205(char *arg) |
| { | |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static void unit_stop(void) |
| - | { |
| - | } |
| + | UNITTEST_BEGIN_SIMPLE |
| #if defined(USE_MBEDTLS) || defined(USE_RUSTLS) | |
| - | struct test_cs_entry { |
| - | uint16_t id; |
| - | const char *rfc; |
| - | const char *openssl; |
| - | }; |
| - | static const struct test_cs_entry test_cs_list[] = { |
| - | #if defined(USE_MBEDTLS) || defined(USE_RUSTLS) |
| - | { 0x1301, "TLS_AES_128_GCM_SHA256", |
| - | NULL }, |
| - | { 0x1302, "TLS_AES_256_GCM_SHA384", |
| - | NULL }, |
| - | { 0x1303, "TLS_CHACHA20_POLY1305_SHA256", |
| - | NULL }, |
| - | { 0x1304, "TLS_AES_128_CCM_SHA256", |
| - | NULL }, |
| - | { 0x1305, "TLS_AES_128_CCM_8_SHA256", |
| - | NULL }, |
| - | #endif |
| - | { 0xC02B, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", |
| - | "ECDHE-ECDSA-AES128-GCM-SHA256" }, |
| - | { 0xC02C, "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", |
| - | "ECDHE-ECDSA-AES256-GCM-SHA384" }, |
| - | { 0xC02F, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", |
| - | "ECDHE-RSA-AES128-GCM-SHA256" }, |
| - | { 0xC030, "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", |
| - | "ECDHE-RSA-AES256-GCM-SHA384" }, |
| - | { 0xCCA8, "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", |
| - | "ECDHE-RSA-CHACHA20-POLY1305" }, |
| - | { 0xCCA9, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", |
| - | "ECDHE-ECDSA-CHACHA20-POLY1305" }, |
| - | #if defined(USE_MBEDTLS) |
| - | { 0x002F, "TLS_RSA_WITH_AES_128_CBC_SHA", |
| - | "AES128-SHA" }, |
| - | { 0x0035, "TLS_RSA_WITH_AES_256_CBC_SHA", |
| - | "AES256-SHA" }, |
| - | { 0x003C, "TLS_RSA_WITH_AES_128_CBC_SHA256", |
| - | "AES128-SHA256" }, |
| - | { 0x003D, "TLS_RSA_WITH_AES_256_CBC_SHA256", |
| - | "AES256-SHA256" }, |
| - | { 0x009C, "TLS_RSA_WITH_AES_128_GCM_SHA256", |
| - | "AES128-GCM-SHA256" }, |
| - | { 0x009D, "TLS_RSA_WITH_AES_256_GCM_SHA384", |
| - | "AES256-GCM-SHA384" }, |
| - | { 0xC004, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", |
| - | "ECDH-ECDSA-AES128-SHA" }, |
| - | { 0xC005, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", |
| - | "ECDH-ECDSA-AES256-SHA" }, |
| - | { 0xC009, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", |
| - | "ECDHE-ECDSA-AES128-SHA" }, |
| - | { 0xC00A, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", |
| - | "ECDHE-ECDSA-AES256-SHA" }, |
| - | { 0xC00E, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", |
| - | "ECDH-RSA-AES128-SHA" }, |
| - | { 0xC00F, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", |
| - | "ECDH-RSA-AES256-SHA" }, |
| - | { 0xC013, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", |
| - | "ECDHE-RSA-AES128-SHA" }, |
| - | { 0xC014, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", |
| - | "ECDHE-RSA-AES256-SHA" }, |
| - | { 0xC023, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", |
| - | "ECDHE-ECDSA-AES128-SHA256" }, |
| - | { 0xC024, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", |
| - | "ECDHE-ECDSA-AES256-SHA384" }, |
| - | { 0xC025, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", |
| - | "ECDH-ECDSA-AES128-SHA256" }, |
| - | { 0xC026, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", |
| - | "ECDH-ECDSA-AES256-SHA384" }, |
| - | { 0xC027, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", |
| - | "ECDHE-RSA-AES128-SHA256" }, |
| - | { 0xC028, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", |
| - | "ECDHE-RSA-AES256-SHA384" }, |
| - | { 0xC029, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", |
| - | "ECDH-RSA-AES128-SHA256" }, |
| - | { 0xC02A, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", |
| - | "ECDH-RSA-AES256-SHA384" }, |
| - | { 0xC02D, "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", |
| - | "ECDH-ECDSA-AES128-GCM-SHA256" }, |
| - | { 0xC02E, "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", |
| - | "ECDH-ECDSA-AES256-GCM-SHA384" }, |
| - | { 0xC031, "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", |
| - | "ECDH-RSA-AES128-GCM-SHA256" }, |
| - | { 0xC032, "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", |
| - | "ECDH-RSA-AES256-GCM-SHA384" }, |
| - | #endif |
| - | #if defined(USE_MBEDTLS) |
| - | { 0x0001, "TLS_RSA_WITH_NULL_MD5", |
| - | "NULL-MD5" }, |
| - | { 0x0002, "TLS_RSA_WITH_NULL_SHA", |
| - | "NULL-SHA" }, |
| - | { 0x002C, "TLS_PSK_WITH_NULL_SHA", |
| - | "PSK-NULL-SHA" }, |
| - | { 0x002D, "TLS_DHE_PSK_WITH_NULL_SHA", |
| - | "DHE-PSK-NULL-SHA" }, |
| - | { 0x002E, "TLS_RSA_PSK_WITH_NULL_SHA", |
| - | "RSA-PSK-NULL-SHA" }, |
| - | { 0x0033, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", |
| - | "DHE-RSA-AES128-SHA" }, |
| - | { 0x0039, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", |
| - | "DHE-RSA-AES256-SHA" }, |
| - | { 0x003B, "TLS_RSA_WITH_NULL_SHA256", |
| - | "NULL-SHA256" }, |
| - | { 0x0067, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", |
| - | "DHE-RSA-AES128-SHA256" }, |
| - | { 0x006B, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", |
| - | "DHE-RSA-AES256-SHA256" }, |
| - | { 0x008C, "TLS_PSK_WITH_AES_128_CBC_SHA", |
| - | "PSK-AES128-CBC-SHA" }, |
| - | { 0x008D, "TLS_PSK_WITH_AES_256_CBC_SHA", |
| - | "PSK-AES256-CBC-SHA" }, |
| - | { 0x0090, "TLS_DHE_PSK_WITH_AES_128_CBC_SHA", |
| - | "DHE-PSK-AES128-CBC-SHA" }, |
| - | { 0x0091, "TLS_DHE_PSK_WITH_AES_256_CBC_SHA", |
| - | "DHE-PSK-AES256-CBC-SHA" }, |
| - | { 0x0094, "TLS_RSA_PSK_WITH_AES_128_CBC_SHA", |
| - | "RSA-PSK-AES128-CBC-SHA" }, |
| - | { 0x0095, "TLS_RSA_PSK_WITH_AES_256_CBC_SHA", |
| - | "RSA-PSK-AES256-CBC-SHA" }, |
| - | { 0x009E, "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", |
| - | "DHE-RSA-AES128-GCM-SHA256" }, |
| - | { 0x009F, "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", |
| - | "DHE-RSA-AES256-GCM-SHA384" }, |
| - | { 0x00A8, "TLS_PSK_WITH_AES_128_GCM_SHA256", |
| - | "PSK-AES128-GCM-SHA256" }, |
| - | { 0x00A9, "TLS_PSK_WITH_AES_256_GCM_SHA384", |
| - | "PSK-AES256-GCM-SHA384" }, |
| - | { 0x00AA, "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256", |
| - | "DHE-PSK-AES128-GCM-SHA256" }, |
| - | { 0x00AB, "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384", |
| - | "DHE-PSK-AES256-GCM-SHA384" }, |
| - | { 0x00AC, "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256", |
| - | "RSA-PSK-AES128-GCM-SHA256" }, |
| - | { 0x00AD, "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384", |
| - | "RSA-PSK-AES256-GCM-SHA384" }, |
| - | { 0x00AE, "TLS_PSK_WITH_AES_128_CBC_SHA256", |
| - | "PSK-AES128-CBC-SHA256" }, |
| - | { 0x00AF, "TLS_PSK_WITH_AES_256_CBC_SHA384", |
| - | "PSK-AES256-CBC-SHA384" }, |
| - | { 0x00B0, "TLS_PSK_WITH_NULL_SHA256", |
| - | "PSK-NULL-SHA256" }, |
| - | { 0x00B1, "TLS_PSK_WITH_NULL_SHA384", |
| - | "PSK-NULL-SHA384" }, |
| - | { 0x00B2, "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256", |
| - | "DHE-PSK-AES128-CBC-SHA256" }, |
| - | { 0x00B3, "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384", |
| - | "DHE-PSK-AES256-CBC-SHA384" }, |
| - | { 0x00B4, "TLS_DHE_PSK_WITH_NULL_SHA256", |
| - | "DHE-PSK-NULL-SHA256" }, |
| - | { 0x00B5, "TLS_DHE_PSK_WITH_NULL_SHA384", |
| - | "DHE-PSK-NULL-SHA384" }, |
| - | { 0x00B6, "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256", |
| - | "RSA-PSK-AES128-CBC-SHA256" }, |
| - | { 0x00B7, "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384", |
| - | "RSA-PSK-AES256-CBC-SHA384" }, |
| - | { 0x00B8, "TLS_RSA_PSK_WITH_NULL_SHA256", |
| - | "RSA-PSK-NULL-SHA256" }, |
| - | { 0x00B9, "TLS_RSA_PSK_WITH_NULL_SHA384", |
| - | "RSA-PSK-NULL-SHA384" }, |
| - | { 0xC001, "TLS_ECDH_ECDSA_WITH_NULL_SHA", |
| - | "ECDH-ECDSA-NULL-SHA" }, |
| - | { 0xC006, "TLS_ECDHE_ECDSA_WITH_NULL_SHA", |
| - | "ECDHE-ECDSA-NULL-SHA" }, |
| - | { 0xC00B, "TLS_ECDH_RSA_WITH_NULL_SHA", |
| - | "ECDH-RSA-NULL-SHA" }, |
| - | { 0xC010, "TLS_ECDHE_RSA_WITH_NULL_SHA", |
| - | "ECDHE-RSA-NULL-SHA" }, |
| - | { 0xC035, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA", |
| - | "ECDHE-PSK-AES128-CBC-SHA" }, |
| - | { 0xC036, "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA", |
| - | "ECDHE-PSK-AES256-CBC-SHA" }, |
| - | { 0xCCAB, "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| - | "PSK-CHACHA20-POLY1305" }, |
| - | #endif |
| - | #if defined(USE_MBEDTLS) |
| - | { 0xC09C, "TLS_RSA_WITH_AES_128_CCM", |
| - | "AES128-CCM" }, |
| - | { 0xC09D, "TLS_RSA_WITH_AES_256_CCM", |
| - | "AES256-CCM" }, |
| - | { 0xC0A0, "TLS_RSA_WITH_AES_128_CCM_8", |
| - | "AES128-CCM8" }, |
| - | { 0xC0A1, "TLS_RSA_WITH_AES_256_CCM_8", |
| - | "AES256-CCM8" }, |
| - | { 0xC0AC, "TLS_ECDHE_ECDSA_WITH_AES_128_CCM", |
| - | "ECDHE-ECDSA-AES128-CCM" }, |
| - | { 0xC0AD, "TLS_ECDHE_ECDSA_WITH_AES_256_CCM", |
| - | "ECDHE-ECDSA-AES256-CCM" }, |
| - | { 0xC0AE, "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8", |
| - | "ECDHE-ECDSA-AES128-CCM8" }, |
| - | { 0xC0AF, "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8", |
| - | "ECDHE-ECDSA-AES256-CCM8" }, |
| - | #endif |
| + | struct test_cs_entry { |
| + | uint16_t id; |
| + | const char *rfc; |
| + | const char *openssl; |
| + | }; |
| + | |
| + | static const struct test_cs_entry test_cs_list[] = { |
| + | { 0x1301, "TLS_AES_128_GCM_SHA256", |
| + | NULL }, |
| + | { 0x1302, "TLS_AES_256_GCM_SHA384", |
| + | NULL }, |
| + | { 0x1303, "TLS_CHACHA20_POLY1305_SHA256", |
| + | NULL }, |
| + | { 0x1304, "TLS_AES_128_CCM_SHA256", |
| + | NULL }, |
| + | { 0x1305, "TLS_AES_128_CCM_8_SHA256", |
| + | NULL }, |
| + | { 0xC02B, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", |
| + | "ECDHE-ECDSA-AES128-GCM-SHA256" }, |
| + | { 0xC02C, "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", |
| + | "ECDHE-ECDSA-AES256-GCM-SHA384" }, |
| + | { 0xC02F, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", |
| + | "ECDHE-RSA-AES128-GCM-SHA256" }, |
| + | { 0xC030, "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", |
| + | "ECDHE-RSA-AES256-GCM-SHA384" }, |
| + | { 0xCCA8, "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", |
| + | "ECDHE-RSA-CHACHA20-POLY1305" }, |
| + | { 0xCCA9, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", |
| + | "ECDHE-ECDSA-CHACHA20-POLY1305" }, |
| #if defined(USE_MBEDTLS) | |
| - | /* entries marked ns are non-"standard", they are not in OpenSSL */ |
| - | { 0x0041, "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA", |
| - | "CAMELLIA128-SHA" }, |
| - | { 0x0045, "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA", |
| - | "DHE-RSA-CAMELLIA128-SHA" }, |
| - | { 0x0084, "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA", |
| - | "CAMELLIA256-SHA" }, |
| - | { 0x0088, "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA", |
| - | "DHE-RSA-CAMELLIA256-SHA" }, |
| - | { 0x00BA, "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "CAMELLIA128-SHA256" }, |
| - | { 0x00BE, "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "DHE-RSA-CAMELLIA128-SHA256" }, |
| - | { 0x00C0, "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256", |
| - | "CAMELLIA256-SHA256" }, |
| - | { 0x00C4, "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256", |
| - | "DHE-RSA-CAMELLIA256-SHA256" }, |
| - | { 0xC037, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256", |
| - | "ECDHE-PSK-AES128-CBC-SHA256" }, |
| - | { 0xC038, "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384", |
| - | "ECDHE-PSK-AES256-CBC-SHA384" }, |
| - | { 0xC039, "TLS_ECDHE_PSK_WITH_NULL_SHA", |
| - | "ECDHE-PSK-NULL-SHA" }, |
| - | { 0xC03A, "TLS_ECDHE_PSK_WITH_NULL_SHA256", |
| - | "ECDHE-PSK-NULL-SHA256" }, |
| - | { 0xC03B, "TLS_ECDHE_PSK_WITH_NULL_SHA384", |
| - | "ECDHE-PSK-NULL-SHA384" }, |
| - | { 0xC03C, "TLS_RSA_WITH_ARIA_128_CBC_SHA256", |
| - | "ARIA128-SHA256" /* ns */ }, |
| - | { 0xC03D, "TLS_RSA_WITH_ARIA_256_CBC_SHA384", |
| - | "ARIA256-SHA384" /* ns */ }, |
| - | { 0xC044, "TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256", |
| - | "DHE-RSA-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC045, "TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384", |
| - | "DHE-RSA-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC048, "TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256", |
| - | "ECDHE-ECDSA-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC049, "TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384", |
| - | "ECDHE-ECDSA-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC04A, "TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256", |
| - | "ECDH-ECDSA-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC04B, "TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384", |
| - | "ECDH-ECDSA-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC04C, "TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256", |
| - | "ECDHE-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC04D, "TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384", |
| - | "ECDHE-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC04E, "TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256", |
| - | "ECDH-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC04F, "TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384", |
| - | "ECDH-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC050, "TLS_RSA_WITH_ARIA_128_GCM_SHA256", |
| - | "ARIA128-GCM-SHA256" }, |
| - | { 0xC051, "TLS_RSA_WITH_ARIA_256_GCM_SHA384", |
| - | "ARIA256-GCM-SHA384" }, |
| - | { 0xC052, "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256", |
| - | "DHE-RSA-ARIA128-GCM-SHA256" }, |
| - | { 0xC053, "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384", |
| - | "DHE-RSA-ARIA256-GCM-SHA384" }, |
| - | { 0xC05C, "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256", |
| - | "ECDHE-ECDSA-ARIA128-GCM-SHA256" }, |
| - | { 0xC05D, "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384", |
| - | "ECDHE-ECDSA-ARIA256-GCM-SHA384" }, |
| - | { 0xC05E, "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256", |
| - | "ECDH-ECDSA-ARIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC05F, "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384", |
| - | "ECDH-ECDSA-ARIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC060, "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256", |
| - | "ECDHE-ARIA128-GCM-SHA256" }, |
| - | { 0xC061, "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384", |
| - | "ECDHE-ARIA256-GCM-SHA384" }, |
| - | { 0xC062, "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256", |
| - | "ECDH-ARIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC063, "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384", |
| - | "ECDH-ARIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC064, "TLS_PSK_WITH_ARIA_128_CBC_SHA256", |
| - | "PSK-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC065, "TLS_PSK_WITH_ARIA_256_CBC_SHA384", |
| - | "PSK-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC066, "TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256", |
| - | "DHE-PSK-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC067, "TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384", |
| - | "DHE-PSK-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC068, "TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256", |
| - | "RSA-PSK-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC069, "TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384", |
| - | "RSA-PSK-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC06A, "TLS_PSK_WITH_ARIA_128_GCM_SHA256", |
| - | "PSK-ARIA128-GCM-SHA256" }, |
| - | { 0xC06B, "TLS_PSK_WITH_ARIA_256_GCM_SHA384", |
| - | "PSK-ARIA256-GCM-SHA384" }, |
| - | { 0xC06C, "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256", |
| - | "DHE-PSK-ARIA128-GCM-SHA256" }, |
| - | { 0xC06D, "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384", |
| - | "DHE-PSK-ARIA256-GCM-SHA384" }, |
| - | { 0xC06E, "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256", |
| - | "RSA-PSK-ARIA128-GCM-SHA256" }, |
| - | { 0xC06F, "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384", |
| - | "RSA-PSK-ARIA256-GCM-SHA384" }, |
| - | { 0xC070, "TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256", |
| - | "ECDHE-PSK-ARIA128-SHA256" /* ns */ }, |
| - | { 0xC071, "TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384", |
| - | "ECDHE-PSK-ARIA256-SHA384" /* ns */ }, |
| - | { 0xC072, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "ECDHE-ECDSA-CAMELLIA128-SHA256" }, |
| - | { 0xC073, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "ECDHE-ECDSA-CAMELLIA256-SHA384" }, |
| - | { 0xC074, "TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "ECDH-ECDSA-CAMELLIA128-SHA256" /* ns */ }, |
| - | { 0xC075, "TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "ECDH-ECDSA-CAMELLIA256-SHA384" /* ns */ }, |
| - | { 0xC076, "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "ECDHE-RSA-CAMELLIA128-SHA256" }, |
| - | { 0xC077, "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "ECDHE-RSA-CAMELLIA256-SHA384" }, |
| - | { 0xC078, "TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "ECDH-CAMELLIA128-SHA256" /* ns */ }, |
| - | { 0xC079, "TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "ECDH-CAMELLIA256-SHA384" /* ns */ }, |
| - | { 0xC07A, "TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC07B, "TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC07C, "TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "DHE-RSA-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC07D, "TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "DHE-RSA-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC086, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "ECDHE-ECDSA-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC087, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "ECDHE-ECDSA-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC088, "TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "ECDH-ECDSA-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC089, "TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "ECDH-ECDSA-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC08A, "TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "ECDHE-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC08B, "TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "ECDHE-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC08C, "TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "ECDH-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC08D, "TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "ECDH-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC08E, "TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "PSK-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC08F, "TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "PSK-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC090, "TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "DHE-PSK-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC091, "TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "DHE-PSK-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC092, "TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256", |
| - | "RSA-PSK-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| - | { 0xC093, "TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384", |
| - | "RSA-PSK-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| - | { 0xC094, "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "PSK-CAMELLIA128-SHA256" }, |
| - | { 0xC095, "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "PSK-CAMELLIA256-SHA384" }, |
| - | { 0xC096, "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "DHE-PSK-CAMELLIA128-SHA256" }, |
| - | { 0xC097, "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "DHE-PSK-CAMELLIA256-SHA384" }, |
| - | { 0xC098, "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "RSA-PSK-CAMELLIA128-SHA256" }, |
| - | { 0xC099, "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "RSA-PSK-CAMELLIA256-SHA384" }, |
| - | { 0xC09A, "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| - | "ECDHE-PSK-CAMELLIA128-SHA256" }, |
| - | { 0xC09B, "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| - | "ECDHE-PSK-CAMELLIA256-SHA384" }, |
| - | { 0xC09E, "TLS_DHE_RSA_WITH_AES_128_CCM", |
| - | "DHE-RSA-AES128-CCM" }, |
| - | { 0xC09F, "TLS_DHE_RSA_WITH_AES_256_CCM", |
| - | "DHE-RSA-AES256-CCM" }, |
| - | { 0xC0A2, "TLS_DHE_RSA_WITH_AES_128_CCM_8", |
| - | "DHE-RSA-AES128-CCM8" }, |
| - | { 0xC0A3, "TLS_DHE_RSA_WITH_AES_256_CCM_8", |
| - | "DHE-RSA-AES256-CCM8" }, |
| - | { 0xC0A4, "TLS_PSK_WITH_AES_128_CCM", |
| - | "PSK-AES128-CCM" }, |
| - | { 0xC0A5, "TLS_PSK_WITH_AES_256_CCM", |
| - | "PSK-AES256-CCM" }, |
| - | { 0xC0A6, "TLS_DHE_PSK_WITH_AES_128_CCM", |
| - | "DHE-PSK-AES128-CCM" }, |
| - | { 0xC0A7, "TLS_DHE_PSK_WITH_AES_256_CCM", |
| - | "DHE-PSK-AES256-CCM" }, |
| - | { 0xC0A8, "TLS_PSK_WITH_AES_128_CCM_8", |
| - | "PSK-AES128-CCM8" }, |
| - | { 0xC0A9, "TLS_PSK_WITH_AES_256_CCM_8", |
| - | "PSK-AES256-CCM8" }, |
| - | { 0xC0AA, "TLS_PSK_DHE_WITH_AES_128_CCM_8", |
| - | "DHE-PSK-AES128-CCM8" }, |
| - | { 0xC0AB, "TLS_PSK_DHE_WITH_AES_256_CCM_8", |
| - | "DHE-PSK-AES256-CCM8" }, |
| - | { 0xCCAA, "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", |
| - | "DHE-RSA-CHACHA20-POLY1305" }, |
| - | { 0xCCAC, "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| - | "ECDHE-PSK-CHACHA20-POLY1305" }, |
| - | { 0xCCAD, "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| - | "DHE-PSK-CHACHA20-POLY1305" }, |
| - | { 0xCCAE, "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| - | "RSA-PSK-CHACHA20-POLY1305" }, |
| + | { 0x002F, "TLS_RSA_WITH_AES_128_CBC_SHA", |
| + | "AES128-SHA" }, |
| + | { 0x0035, "TLS_RSA_WITH_AES_256_CBC_SHA", |
| + | "AES256-SHA" }, |
| + | { 0x003C, "TLS_RSA_WITH_AES_128_CBC_SHA256", |
| + | "AES128-SHA256" }, |
| + | { 0x003D, "TLS_RSA_WITH_AES_256_CBC_SHA256", |
| + | "AES256-SHA256" }, |
| + | { 0x009C, "TLS_RSA_WITH_AES_128_GCM_SHA256", |
| + | "AES128-GCM-SHA256" }, |
| + | { 0x009D, "TLS_RSA_WITH_AES_256_GCM_SHA384", |
| + | "AES256-GCM-SHA384" }, |
| + | { 0xC004, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", |
| + | "ECDH-ECDSA-AES128-SHA" }, |
| + | { 0xC005, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", |
| + | "ECDH-ECDSA-AES256-SHA" }, |
| + | { 0xC009, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", |
| + | "ECDHE-ECDSA-AES128-SHA" }, |
| + | { 0xC00A, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", |
| + | "ECDHE-ECDSA-AES256-SHA" }, |
| + | { 0xC00E, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", |
| + | "ECDH-RSA-AES128-SHA" }, |
| + | { 0xC00F, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", |
| + | "ECDH-RSA-AES256-SHA" }, |
| + | { 0xC013, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", |
| + | "ECDHE-RSA-AES128-SHA" }, |
| + | { 0xC014, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", |
| + | "ECDHE-RSA-AES256-SHA" }, |
| + | { 0xC023, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", |
| + | "ECDHE-ECDSA-AES128-SHA256" }, |
| + | { 0xC024, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", |
| + | "ECDHE-ECDSA-AES256-SHA384" }, |
| + | { 0xC025, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", |
| + | "ECDH-ECDSA-AES128-SHA256" }, |
| + | { 0xC026, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", |
| + | "ECDH-ECDSA-AES256-SHA384" }, |
| + | { 0xC027, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", |
| + | "ECDHE-RSA-AES128-SHA256" }, |
| + | { 0xC028, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", |
| + | "ECDHE-RSA-AES256-SHA384" }, |
| + | { 0xC029, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", |
| + | "ECDH-RSA-AES128-SHA256" }, |
| + | { 0xC02A, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", |
| + | "ECDH-RSA-AES256-SHA384" }, |
| + | { 0xC02D, "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", |
| + | "ECDH-ECDSA-AES128-GCM-SHA256" }, |
| + | { 0xC02E, "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", |
| + | "ECDH-ECDSA-AES256-GCM-SHA384" }, |
| + | { 0xC031, "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", |
| + | "ECDH-RSA-AES128-GCM-SHA256" }, |
| + | { 0xC032, "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", |
| + | "ECDH-RSA-AES256-GCM-SHA384" }, |
| + | { 0x0001, "TLS_RSA_WITH_NULL_MD5", |
| + | "NULL-MD5" }, |
| + | { 0x0002, "TLS_RSA_WITH_NULL_SHA", |
| + | "NULL-SHA" }, |
| + | { 0x002C, "TLS_PSK_WITH_NULL_SHA", |
| + | "PSK-NULL-SHA" }, |
| + | { 0x002D, "TLS_DHE_PSK_WITH_NULL_SHA", |
| + | "DHE-PSK-NULL-SHA" }, |
| + | { 0x002E, "TLS_RSA_PSK_WITH_NULL_SHA", |
| + | "RSA-PSK-NULL-SHA" }, |
| + | { 0x0033, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", |
| + | "DHE-RSA-AES128-SHA" }, |
| + | { 0x0039, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", |
| + | "DHE-RSA-AES256-SHA" }, |
| + | { 0x003B, "TLS_RSA_WITH_NULL_SHA256", |
| + | "NULL-SHA256" }, |
| + | { 0x0067, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", |
| + | "DHE-RSA-AES128-SHA256" }, |
| + | { 0x006B, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", |
| + | "DHE-RSA-AES256-SHA256" }, |
| + | { 0x008C, "TLS_PSK_WITH_AES_128_CBC_SHA", |
| + | "PSK-AES128-CBC-SHA" }, |
| + | { 0x008D, "TLS_PSK_WITH_AES_256_CBC_SHA", |
| + | "PSK-AES256-CBC-SHA" }, |
| + | { 0x0090, "TLS_DHE_PSK_WITH_AES_128_CBC_SHA", |
| + | "DHE-PSK-AES128-CBC-SHA" }, |
| + | { 0x0091, "TLS_DHE_PSK_WITH_AES_256_CBC_SHA", |
| + | "DHE-PSK-AES256-CBC-SHA" }, |
| + | { 0x0094, "TLS_RSA_PSK_WITH_AES_128_CBC_SHA", |
| + | "RSA-PSK-AES128-CBC-SHA" }, |
| + | { 0x0095, "TLS_RSA_PSK_WITH_AES_256_CBC_SHA", |
| + | "RSA-PSK-AES256-CBC-SHA" }, |
| + | { 0x009E, "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", |
| + | "DHE-RSA-AES128-GCM-SHA256" }, |
| + | { 0x009F, "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", |
| + | "DHE-RSA-AES256-GCM-SHA384" }, |
| + | { 0x00A8, "TLS_PSK_WITH_AES_128_GCM_SHA256", |
| + | "PSK-AES128-GCM-SHA256" }, |
| + | { 0x00A9, "TLS_PSK_WITH_AES_256_GCM_SHA384", |
| + | "PSK-AES256-GCM-SHA384" }, |
| + | { 0x00AA, "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256", |
| + | "DHE-PSK-AES128-GCM-SHA256" }, |
| + | { 0x00AB, "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384", |
| + | "DHE-PSK-AES256-GCM-SHA384" }, |
| + | { 0x00AC, "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256", |
| + | "RSA-PSK-AES128-GCM-SHA256" }, |
| + | { 0x00AD, "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384", |
| + | "RSA-PSK-AES256-GCM-SHA384" }, |
| + | { 0x00AE, "TLS_PSK_WITH_AES_128_CBC_SHA256", |
| + | "PSK-AES128-CBC-SHA256" }, |
| + | { 0x00AF, "TLS_PSK_WITH_AES_256_CBC_SHA384", |
| + | "PSK-AES256-CBC-SHA384" }, |
| + | { 0x00B0, "TLS_PSK_WITH_NULL_SHA256", |
| + | "PSK-NULL-SHA256" }, |
| + | { 0x00B1, "TLS_PSK_WITH_NULL_SHA384", |
| + | "PSK-NULL-SHA384" }, |
| + | { 0x00B2, "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256", |
| + | "DHE-PSK-AES128-CBC-SHA256" }, |
| + | { 0x00B3, "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384", |
| + | "DHE-PSK-AES256-CBC-SHA384" }, |
| + | { 0x00B4, "TLS_DHE_PSK_WITH_NULL_SHA256", |
| + | "DHE-PSK-NULL-SHA256" }, |
| + | { 0x00B5, "TLS_DHE_PSK_WITH_NULL_SHA384", |
| + | "DHE-PSK-NULL-SHA384" }, |
| + | { 0x00B6, "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256", |
| + | "RSA-PSK-AES128-CBC-SHA256" }, |
| + | { 0x00B7, "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384", |
| + | "RSA-PSK-AES256-CBC-SHA384" }, |
| + | { 0x00B8, "TLS_RSA_PSK_WITH_NULL_SHA256", |
| + | "RSA-PSK-NULL-SHA256" }, |
| + | { 0x00B9, "TLS_RSA_PSK_WITH_NULL_SHA384", |
| + | "RSA-PSK-NULL-SHA384" }, |
| + | { 0xC001, "TLS_ECDH_ECDSA_WITH_NULL_SHA", |
| + | "ECDH-ECDSA-NULL-SHA" }, |
| + | { 0xC006, "TLS_ECDHE_ECDSA_WITH_NULL_SHA", |
| + | "ECDHE-ECDSA-NULL-SHA" }, |
| + | { 0xC00B, "TLS_ECDH_RSA_WITH_NULL_SHA", |
| + | "ECDH-RSA-NULL-SHA" }, |
| + | { 0xC010, "TLS_ECDHE_RSA_WITH_NULL_SHA", |
| + | "ECDHE-RSA-NULL-SHA" }, |
| + | { 0xC035, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA", |
| + | "ECDHE-PSK-AES128-CBC-SHA" }, |
| + | { 0xC036, "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA", |
| + | "ECDHE-PSK-AES256-CBC-SHA" }, |
| + | { 0xCCAB, "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| + | "PSK-CHACHA20-POLY1305" }, |
| + | { 0xC09C, "TLS_RSA_WITH_AES_128_CCM", |
| + | "AES128-CCM" }, |
| + | { 0xC09D, "TLS_RSA_WITH_AES_256_CCM", |
| + | "AES256-CCM" }, |
| + | { 0xC0A0, "TLS_RSA_WITH_AES_128_CCM_8", |
| + | "AES128-CCM8" }, |
| + | { 0xC0A1, "TLS_RSA_WITH_AES_256_CCM_8", |
| + | "AES256-CCM8" }, |
| + | { 0xC0AC, "TLS_ECDHE_ECDSA_WITH_AES_128_CCM", |
| + | "ECDHE-ECDSA-AES128-CCM" }, |
| + | { 0xC0AD, "TLS_ECDHE_ECDSA_WITH_AES_256_CCM", |
| + | "ECDHE-ECDSA-AES256-CCM" }, |
| + | { 0xC0AE, "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8", |
| + | "ECDHE-ECDSA-AES128-CCM8" }, |
| + | { 0xC0AF, "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8", |
| + | "ECDHE-ECDSA-AES256-CCM8" }, |
| + | /* entries marked ns are non-"standard", they are not in OpenSSL */ |
| + | { 0x0041, "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA", |
| + | "CAMELLIA128-SHA" }, |
| + | { 0x0045, "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA", |
| + | "DHE-RSA-CAMELLIA128-SHA" }, |
| + | { 0x0084, "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA", |
| + | "CAMELLIA256-SHA" }, |
| + | { 0x0088, "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA", |
| + | "DHE-RSA-CAMELLIA256-SHA" }, |
| + | { 0x00BA, "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "CAMELLIA128-SHA256" }, |
| + | { 0x00BE, "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "DHE-RSA-CAMELLIA128-SHA256" }, |
| + | { 0x00C0, "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256", |
| + | "CAMELLIA256-SHA256" }, |
| + | { 0x00C4, "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256", |
| + | "DHE-RSA-CAMELLIA256-SHA256" }, |
| + | { 0xC037, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256", |
| + | "ECDHE-PSK-AES128-CBC-SHA256" }, |
| + | { 0xC038, "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384", |
| + | "ECDHE-PSK-AES256-CBC-SHA384" }, |
| + | { 0xC039, "TLS_ECDHE_PSK_WITH_NULL_SHA", |
| + | "ECDHE-PSK-NULL-SHA" }, |
| + | { 0xC03A, "TLS_ECDHE_PSK_WITH_NULL_SHA256", |
| + | "ECDHE-PSK-NULL-SHA256" }, |
| + | { 0xC03B, "TLS_ECDHE_PSK_WITH_NULL_SHA384", |
| + | "ECDHE-PSK-NULL-SHA384" }, |
| + | { 0xC03C, "TLS_RSA_WITH_ARIA_128_CBC_SHA256", |
| + | "ARIA128-SHA256" /* ns */ }, |
| + | { 0xC03D, "TLS_RSA_WITH_ARIA_256_CBC_SHA384", |
| + | "ARIA256-SHA384" /* ns */ }, |
| + | { 0xC044, "TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256", |
| + | "DHE-RSA-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC045, "TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384", |
| + | "DHE-RSA-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC048, "TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256", |
| + | "ECDHE-ECDSA-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC049, "TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384", |
| + | "ECDHE-ECDSA-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC04A, "TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256", |
| + | "ECDH-ECDSA-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC04B, "TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384", |
| + | "ECDH-ECDSA-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC04C, "TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256", |
| + | "ECDHE-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC04D, "TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384", |
| + | "ECDHE-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC04E, "TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256", |
| + | "ECDH-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC04F, "TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384", |
| + | "ECDH-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC050, "TLS_RSA_WITH_ARIA_128_GCM_SHA256", |
| + | "ARIA128-GCM-SHA256" }, |
| + | { 0xC051, "TLS_RSA_WITH_ARIA_256_GCM_SHA384", |
| + | "ARIA256-GCM-SHA384" }, |
| + | { 0xC052, "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256", |
| + | "DHE-RSA-ARIA128-GCM-SHA256" }, |
| + | { 0xC053, "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384", |
| + | "DHE-RSA-ARIA256-GCM-SHA384" }, |
| + | { 0xC05C, "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256", |
| + | "ECDHE-ECDSA-ARIA128-GCM-SHA256" }, |
| + | { 0xC05D, "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384", |
| + | "ECDHE-ECDSA-ARIA256-GCM-SHA384" }, |
| + | { 0xC05E, "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256", |
| + | "ECDH-ECDSA-ARIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC05F, "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384", |
| + | "ECDH-ECDSA-ARIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC060, "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256", |
| + | "ECDHE-ARIA128-GCM-SHA256" }, |
| + | { 0xC061, "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384", |
| + | "ECDHE-ARIA256-GCM-SHA384" }, |
| + | { 0xC062, "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256", |
| + | "ECDH-ARIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC063, "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384", |
| + | "ECDH-ARIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC064, "TLS_PSK_WITH_ARIA_128_CBC_SHA256", |
| + | "PSK-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC065, "TLS_PSK_WITH_ARIA_256_CBC_SHA384", |
| + | "PSK-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC066, "TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256", |
| + | "DHE-PSK-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC067, "TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384", |
| + | "DHE-PSK-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC068, "TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256", |
| + | "RSA-PSK-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC069, "TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384", |
| + | "RSA-PSK-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC06A, "TLS_PSK_WITH_ARIA_128_GCM_SHA256", |
| + | "PSK-ARIA128-GCM-SHA256" }, |
| + | { 0xC06B, "TLS_PSK_WITH_ARIA_256_GCM_SHA384", |
| + | "PSK-ARIA256-GCM-SHA384" }, |
| + | { 0xC06C, "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256", |
| + | "DHE-PSK-ARIA128-GCM-SHA256" }, |
| + | { 0xC06D, "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384", |
| + | "DHE-PSK-ARIA256-GCM-SHA384" }, |
| + | { 0xC06E, "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256", |
| + | "RSA-PSK-ARIA128-GCM-SHA256" }, |
| + | { 0xC06F, "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384", |
| + | "RSA-PSK-ARIA256-GCM-SHA384" }, |
| + | { 0xC070, "TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256", |
| + | "ECDHE-PSK-ARIA128-SHA256" /* ns */ }, |
| + | { 0xC071, "TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384", |
| + | "ECDHE-PSK-ARIA256-SHA384" /* ns */ }, |
| + | { 0xC072, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "ECDHE-ECDSA-CAMELLIA128-SHA256" }, |
| + | { 0xC073, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "ECDHE-ECDSA-CAMELLIA256-SHA384" }, |
| + | { 0xC074, "TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "ECDH-ECDSA-CAMELLIA128-SHA256" /* ns */ }, |
| + | { 0xC075, "TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "ECDH-ECDSA-CAMELLIA256-SHA384" /* ns */ }, |
| + | { 0xC076, "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "ECDHE-RSA-CAMELLIA128-SHA256" }, |
| + | { 0xC077, "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "ECDHE-RSA-CAMELLIA256-SHA384" }, |
| + | { 0xC078, "TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "ECDH-CAMELLIA128-SHA256" /* ns */ }, |
| + | { 0xC079, "TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "ECDH-CAMELLIA256-SHA384" /* ns */ }, |
| + | { 0xC07A, "TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC07B, "TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC07C, "TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "DHE-RSA-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC07D, "TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "DHE-RSA-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC086, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "ECDHE-ECDSA-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC087, "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "ECDHE-ECDSA-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC088, "TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "ECDH-ECDSA-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC089, "TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "ECDH-ECDSA-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC08A, "TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "ECDHE-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC08B, "TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "ECDHE-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC08C, "TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "ECDH-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC08D, "TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "ECDH-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC08E, "TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "PSK-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC08F, "TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "PSK-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC090, "TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "DHE-PSK-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC091, "TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "DHE-PSK-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC092, "TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256", |
| + | "RSA-PSK-CAMELLIA128-GCM-SHA256" /* ns */ }, |
| + | { 0xC093, "TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384", |
| + | "RSA-PSK-CAMELLIA256-GCM-SHA384" /* ns */ }, |
| + | { 0xC094, "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "PSK-CAMELLIA128-SHA256" }, |
| + | { 0xC095, "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "PSK-CAMELLIA256-SHA384" }, |
| + | { 0xC096, "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "DHE-PSK-CAMELLIA128-SHA256" }, |
| + | { 0xC097, "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "DHE-PSK-CAMELLIA256-SHA384" }, |
| + | { 0xC098, "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "RSA-PSK-CAMELLIA128-SHA256" }, |
| + | { 0xC099, "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "RSA-PSK-CAMELLIA256-SHA384" }, |
| + | { 0xC09A, "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", |
| + | "ECDHE-PSK-CAMELLIA128-SHA256" }, |
| + | { 0xC09B, "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", |
| + | "ECDHE-PSK-CAMELLIA256-SHA384" }, |
| + | { 0xC09E, "TLS_DHE_RSA_WITH_AES_128_CCM", |
| + | "DHE-RSA-AES128-CCM" }, |
| + | { 0xC09F, "TLS_DHE_RSA_WITH_AES_256_CCM", |
| + | "DHE-RSA-AES256-CCM" }, |
| + | { 0xC0A2, "TLS_DHE_RSA_WITH_AES_128_CCM_8", |
| + | "DHE-RSA-AES128-CCM8" }, |
| + | { 0xC0A3, "TLS_DHE_RSA_WITH_AES_256_CCM_8", |
| + | "DHE-RSA-AES256-CCM8" }, |
| + | { 0xC0A4, "TLS_PSK_WITH_AES_128_CCM", |
| + | "PSK-AES128-CCM" }, |
| + | { 0xC0A5, "TLS_PSK_WITH_AES_256_CCM", |
| + | "PSK-AES256-CCM" }, |
| + | { 0xC0A6, "TLS_DHE_PSK_WITH_AES_128_CCM", |
| + | "DHE-PSK-AES128-CCM" }, |
| + | { 0xC0A7, "TLS_DHE_PSK_WITH_AES_256_CCM", |
| + | "DHE-PSK-AES256-CCM" }, |
| + | { 0xC0A8, "TLS_PSK_WITH_AES_128_CCM_8", |
| + | "PSK-AES128-CCM8" }, |
| + | { 0xC0A9, "TLS_PSK_WITH_AES_256_CCM_8", |
| + | "PSK-AES256-CCM8" }, |
| + | { 0xC0AA, "TLS_PSK_DHE_WITH_AES_128_CCM_8", |
| + | "DHE-PSK-AES128-CCM8" }, |
| + | { 0xC0AB, "TLS_PSK_DHE_WITH_AES_256_CCM_8", |
| + | "DHE-PSK-AES256-CCM8" }, |
| + | { 0xCCAA, "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", |
| + | "DHE-RSA-CHACHA20-POLY1305" }, |
| + | { 0xCCAC, "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| + | "ECDHE-PSK-CHACHA20-POLY1305" }, |
| + | { 0xCCAD, "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| + | "DHE-PSK-CHACHA20-POLY1305" }, |
| + | { 0xCCAE, "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256", |
| + | "RSA-PSK-CHACHA20-POLY1305" }, |
| #endif | |
| - | }; |
| + | }; |
| - | static const char *cs_test_string = |
| - | "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:" |
| - | "TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:" |
| - | "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:" |
| - | "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:" |
| - | "ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:" |
| - | "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:" |
| - | "ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:" |
| - | "ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:" |
| - | "ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:" |
| - | "DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:" |
| - | "AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:" |
| - | "DES-CBC3-SHA:" |
| - | ":: GIBBERISH ::" |
| - | ; |
| + | static const char *cs_test_string = |
| + | "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:" |
| + | "TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:" |
| + | "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:" |
| + | "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:" |
| + | "ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:" |
| + | "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:" |
| + | "ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:" |
| + | "ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:" |
| + | "ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:" |
| + | "DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:" |
| + | "AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:" |
| + | "DES-CBC3-SHA:" |
| + | ":: GIBBERISH ::" |
| + | ; |
| - | struct test_str_entry { |
| - | uint16_t id; |
| - | const char *str; |
| - | }; |
| - | static const struct test_str_entry test_str_list[] = { |
| - | #if defined(USE_MBEDTLS) || defined(USE_RUSTLS) |
| - | { 0x1301, "TLS_AES_128_GCM_SHA256"}, |
| - | { 0x1302, "TLS_AES_256_GCM_SHA384"}, |
| - | { 0x1303, "TLS_CHACHA20_POLY1305_SHA256"}, |
| - | #else |
| - | { 0x0000, "TLS_AES_128_GCM_SHA256"}, |
| - | { 0x0000, "TLS_AES_256_GCM_SHA384"}, |
| - | { 0x0000, "TLS_CHACHA20_POLY1305_SHA256"}, |
| - | #endif |
| - | { 0xC02B, "ECDHE-ECDSA-AES128-GCM-SHA256"}, |
| - | { 0xC02F, "ECDHE-RSA-AES128-GCM-SHA256"}, |
| - | { 0xC02C, "ECDHE-ECDSA-AES256-GCM-SHA384"}, |
| - | { 0xC030, "ECDHE-RSA-AES256-GCM-SHA384"}, |
| - | { 0xCCA9, "ECDHE-ECDSA-CHACHA20-POLY1305"}, |
| - | { 0xCCA8, "ECDHE-RSA-CHACHA20-POLY1305"}, |
| + | struct test_str_entry { |
| + | uint16_t id; |
| + | const char *str; |
| + | }; |
| + | static const struct test_str_entry test_str_list[] = { |
| + | { 0x1301, "TLS_AES_128_GCM_SHA256"}, |
| + | { 0x1302, "TLS_AES_256_GCM_SHA384"}, |
| + | { 0x1303, "TLS_CHACHA20_POLY1305_SHA256"}, |
| + | { 0xC02B, "ECDHE-ECDSA-AES128-GCM-SHA256"}, |
| + | { 0xC02F, "ECDHE-RSA-AES128-GCM-SHA256"}, |
| + | { 0xC02C, "ECDHE-ECDSA-AES256-GCM-SHA384"}, |
| + | { 0xC030, "ECDHE-RSA-AES256-GCM-SHA384"}, |
| + | { 0xCCA9, "ECDHE-ECDSA-CHACHA20-POLY1305"}, |
| + | { 0xCCA8, "ECDHE-RSA-CHACHA20-POLY1305"}, |
| #if defined(USE_MBEDTLS) | |
| - | { 0x009E, "DHE-RSA-AES128-GCM-SHA256"}, |
| - | { 0x009F, "DHE-RSA-AES256-GCM-SHA384"}, |
| + | { 0x009E, "DHE-RSA-AES128-GCM-SHA256"}, |
| + | { 0x009F, "DHE-RSA-AES256-GCM-SHA384"}, |
| #else | |
| - | { 0x0000, "DHE-RSA-AES128-GCM-SHA256"}, |
| - | { 0x0000, "DHE-RSA-AES256-GCM-SHA384"}, |
| + | { 0x0000, "DHE-RSA-AES128-GCM-SHA256"}, |
| + | { 0x0000, "DHE-RSA-AES256-GCM-SHA384"}, |
| #endif | |
| #if defined(USE_MBEDTLS) | |
| - | { 0xCCAA, "DHE-RSA-CHACHA20-POLY1305"}, |
| + | { 0xCCAA, "DHE-RSA-CHACHA20-POLY1305"}, |
| #else | |
| - | { 0x0000, "DHE-RSA-CHACHA20-POLY1305"}, |
| + | { 0x0000, "DHE-RSA-CHACHA20-POLY1305"}, |
| #endif | |
| #if defined(USE_MBEDTLS) | |
| - | { 0xC023, "ECDHE-ECDSA-AES128-SHA256" }, |
| - | { 0xC027, "ECDHE-RSA-AES128-SHA256" }, |
| - | { 0xC009, "ECDHE-ECDSA-AES128-SHA" }, |
| - | { 0xC013, "ECDHE-RSA-AES128-SHA" }, |
| - | { 0xC024, "ECDHE-ECDSA-AES256-SHA384" }, |
| - | { 0xC028, "ECDHE-RSA-AES256-SHA384" }, |
| - | { 0xC00A, "ECDHE-ECDSA-AES256-SHA" }, |
| - | { 0xC014, "ECDHE-RSA-AES256-SHA" }, |
| + | { 0xC023, "ECDHE-ECDSA-AES128-SHA256" }, |
| + | { 0xC027, "ECDHE-RSA-AES128-SHA256" }, |
| + | { 0xC009, "ECDHE-ECDSA-AES128-SHA" }, |
| + | { 0xC013, "ECDHE-RSA-AES128-SHA" }, |
| + | { 0xC024, "ECDHE-ECDSA-AES256-SHA384" }, |
| + | { 0xC028, "ECDHE-RSA-AES256-SHA384" }, |
| + | { 0xC00A, "ECDHE-ECDSA-AES256-SHA" }, |
| + | { 0xC014, "ECDHE-RSA-AES256-SHA" }, |
| #else | |
| - | { 0x0000, "ECDHE-ECDSA-AES128-SHA256" }, |
| - | { 0x0000, "ECDHE-RSA-AES128-SHA256" }, |
| - | { 0x0000, "ECDHE-ECDSA-AES128-SHA" }, |
| - | { 0x0000, "ECDHE-RSA-AES128-SHA" }, |
| - | { 0x0000, "ECDHE-ECDSA-AES256-SHA384" }, |
| - | { 0x0000, "ECDHE-RSA-AES256-SHA384" }, |
| - | { 0x0000, "ECDHE-ECDSA-AES256-SHA" }, |
| - | { 0x0000, "ECDHE-RSA-AES256-SHA" }, |
| + | { 0x0000, "ECDHE-ECDSA-AES128-SHA256" }, |
| + | { 0x0000, "ECDHE-RSA-AES128-SHA256" }, |
| + | { 0x0000, "ECDHE-ECDSA-AES128-SHA" }, |
| + | { 0x0000, "ECDHE-RSA-AES128-SHA" }, |
| + | { 0x0000, "ECDHE-ECDSA-AES256-SHA384" }, |
| + | { 0x0000, "ECDHE-RSA-AES256-SHA384" }, |
| + | { 0x0000, "ECDHE-ECDSA-AES256-SHA" }, |
| + | { 0x0000, "ECDHE-RSA-AES256-SHA" }, |
| #endif | |
| #if defined(USE_MBEDTLS) | |
| - | { 0x0067, "DHE-RSA-AES128-SHA256" }, |
| - | { 0x006B, "DHE-RSA-AES256-SHA256" }, |
| + | { 0x0067, "DHE-RSA-AES128-SHA256" }, |
| + | { 0x006B, "DHE-RSA-AES256-SHA256" }, |
| #else | |
| - | { 0x0000, "DHE-RSA-AES128-SHA256" }, |
| - | { 0x0000, "DHE-RSA-AES256-SHA256" }, |
| + | { 0x0000, "DHE-RSA-AES128-SHA256" }, |
| + | { 0x0000, "DHE-RSA-AES256-SHA256" }, |
| #endif | |
| #if defined(USE_MBEDTLS) | |
| - | { 0x009C, "AES128-GCM-SHA256" }, |
| - | { 0x009D, "AES256-GCM-SHA384" }, |
| - | { 0x003C, "AES128-SHA256" }, |
| - | { 0x003D, "AES256-SHA256" }, |
| - | { 0x002F, "AES128-SHA" }, |
| - | { 0x0035, "AES256-SHA" }, |
| + | { 0x009C, "AES128-GCM-SHA256" }, |
| + | { 0x009D, "AES256-GCM-SHA384" }, |
| + | { 0x003C, "AES128-SHA256" }, |
| + | { 0x003D, "AES256-SHA256" }, |
| + | { 0x002F, "AES128-SHA" }, |
| + | { 0x0035, "AES256-SHA" }, |
| #else | |
| - | { 0x0000, "AES128-GCM-SHA256" }, |
| - | { 0x0000, "AES256-GCM-SHA384" }, |
| - | { 0x0000, "AES128-SHA256" }, |
| - | { 0x0000, "AES256-SHA256" }, |
| - | { 0x0000, "AES128-SHA" }, |
| - | { 0x0000, "AES256-SHA" }, |
| + | { 0x0000, "AES128-GCM-SHA256" }, |
| + | { 0x0000, "AES256-GCM-SHA384" }, |
| + | { 0x0000, "AES128-SHA256" }, |
| + | { 0x0000, "AES256-SHA256" }, |
| + | { 0x0000, "AES128-SHA" }, |
| + | { 0x0000, "AES256-SHA" }, |
| #endif | |
| - | { 0x0000, "DES-CBC3-SHA" }, |
| - | { 0x0000, "GIBBERISH" }, |
| - | { 0x0000, "" }, |
| - | }; |
| + | { 0x0000, "DES-CBC3-SHA" }, |
| + | { 0x0000, "GIBBERISH" }, |
| + | { 0x0000, "" }, |
| + | }; |
| - | UNITTEST_START |
| - | { |
| - | for(size_t i = 0; i < CURL_ARRAYSIZE(test_cs_list); i++) { |
| + | size_t i; |
| + | for(i = 0; i < CURL_ARRAYSIZE(test_cs_list); i++) { |
| const struct test_cs_entry *test = &test_cs_list[i]; | |
| const char *expect; | |
| char buf[64] = ""; | |
| @@ -596,13 +577,13 @@ UNITTEST_START | |
| /* test Curl_cipher_suite_walk_str() */ | |
| { | |
| const char *ptr, *end = cs_test_string; | |
| - | int i = 0; |
| + | int j = 0; |
| uint16_t id; | |
| size_t len; | |
| for(ptr = cs_test_string; ptr[0] != '\0'; ptr = end) { | |
| - | const struct test_str_entry *test = &test_str_list[i]; |
| - | abort_if(i == CURL_ARRAYSIZE(test_str_list), "should have been done"); |
| + | const struct test_str_entry *test = &test_str_list[j]; |
| + | abort_if(j == CURL_ARRAYSIZE(test_str_list), "should have been done"); |
| id = Curl_cipher_suite_walk_str(&ptr, &end); | |
| len = end - ptr; | |
| @@ -621,15 +602,10 @@ UNITTEST_START | |
| unitfail++; | |
| goto unit_test_abort; | |
| } | |
| - | i++; |
| + | j++; |
| } | |
| } | |
| - | } |
| - | UNITTEST_STOP |
| - | |
| - | #else /* defined(USE_MBEDTLS) */ |
| - | |
| - | UNITTEST_START |
| - | UNITTEST_STOP |
| - | |
| #endif /* defined(USE_MBEDTLS) || defined(USE_RUSTLS) */ | |
| + | |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -27,28 +27,8 @@ | |
| #include "uint-bset.h" | |
| #include "curl_trc.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static unsigned int s1[] = { /* spread numbers, some at slot edges */ |
| - | 0, 1, 4, 17, 63, 64, 65, 66, |
| - | 90, 99, |
| - | }; |
| - | static unsigned int s2[] = { /* set with all bits in slot1 set */ |
| - | 64, 65, 66, 67, 68, 69, 70, 71, |
| - | 72, 73, 74, 75, 76, 77, 78, 79, |
| - | 80, 81, 82, 83, 84, 85, 86, 87, |
| - | 88, 89, 90, 91, 92, 93, 94, 95, |
| - | 96, 97, 98, 99, 100, 101, 102, 103, |
| - | 104, 105, 106, 107, 108, 109, 110, 111, |
| - | 112, 113, 114, 115, 116, 117, 118, 119, |
| - | 120, 121, 122, 123, 124, 125, 126, 127, |
| - | }; |
| - | |
| static void check_set(const char *name, unsigned int capacity, | |
| - | unsigned int *s, size_t slen) |
| + | const unsigned int *s, size_t slen) |
| { | |
| struct uint_bset bset; | |
| size_t i, j; | |
| @@ -140,14 +120,27 @@ static void check_set(const char *name, unsigned int capacity, | |
| Curl_uint_bset_destroy(&bset); | |
| } | |
| - | static void unit_stop(void) |
| + | static CURLcode test_unit3211(char *arg) |
| { | |
| - | } |
| - | |
| - | |
| - | UNITTEST_START |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| + | static const unsigned int s1[] = { /* spread numbers, some at slot edges */ |
| + | 0, 1, 4, 17, 63, 64, 65, 66, |
| + | 90, 99, |
| + | }; |
| + | static const unsigned int s2[] = { /* set with all bits in slot1 set */ |
| + | 64, 65, 66, 67, 68, 69, 70, 71, |
| + | 72, 73, 74, 75, 76, 77, 78, 79, |
| + | 80, 81, 82, 83, 84, 85, 86, 87, |
| + | 88, 89, 90, 91, 92, 93, 94, 95, |
| + | 96, 97, 98, 99, 100, 101, 102, 103, |
| + | 104, 105, 106, 107, 108, 109, 110, 111, |
| + | 112, 113, 114, 115, 116, 117, 118, 119, |
| + | 120, 121, 122, 123, 124, 125, 126, 127, |
| + | }; |
| check_set("s1", 100, s1, CURL_ARRAYSIZE(s1)); | |
| check_set("s2", 1000, s2, CURL_ARRAYSIZE(s2)); | |
| - | UNITTEST_STOP |
| + | UNITTEST_END_SIMPLE |
| + | } |
| @@ -29,23 +29,24 @@ | |
| #define TBL_SIZE 100 | |
| - | static struct uint_tbl tbl; |
| - | |
| - | static int dummy; |
| - | |
| - | static CURLcode unit_setup(void) |
| + | static CURLcode t3212_setup(struct uint_tbl *tbl) |
| { | |
| - | Curl_uint_tbl_init(&tbl, NULL); |
| - | return Curl_uint_tbl_resize(&tbl, TBL_SIZE); |
| + | Curl_uint_tbl_init(tbl, NULL); |
| + | return Curl_uint_tbl_resize(tbl, TBL_SIZE); |
| } | |
| - | static void unit_stop(void) |
| + | static void t3212_stop(struct uint_tbl *tbl) |
| { | |
| - | Curl_uint_tbl_destroy(&tbl); |
| + | Curl_uint_tbl_destroy(tbl); |
| } | |
| - | static void check3212(void) |
| + | static CURLcode test_unit3212(char *arg) |
| { | |
| + | struct uint_tbl tbl; |
| + | int dummy; |
| + | |
| + | UNITTEST_BEGIN(t3212_setup(&tbl)) |
| + | |
| unsigned int i, key, n; | |
| void *entry; | |
| @@ -127,10 +128,6 @@ static void check3212(void) | |
| Curl_uint_tbl_remove(&tbl, 17); | |
| fail_unless(Curl_uint_tbl_add(&tbl, &dummy, &key), "failed to add again"); | |
| fail_unless(key == 17, "unexpected key assigned"); | |
| - | } |
| - | |
| - | UNITTEST_START |
| - | check3212(); |
| - | |
| - | UNITTEST_STOP |
| + | UNITTEST_END(t3212_stop(&tbl)) |
| + | } |
| @@ -27,31 +27,7 @@ | |
| #include "uint-spbset.h" | |
| #include "curl_trc.h" | |
| - | static CURLcode unit_setup(void) |
| - | { |
| - | return CURLE_OK; |
| - | } |
| - | |
| - | static unsigned int s1_3213[] = { /* spread numbers, some at slot edges */ |
| - | 0, 1, 4, 17, 63, 64, 65, 66, |
| - | 90, 99, |
| - | }; |
| - | static unsigned int s2_3213[] = { /* set with all bits in slot1 set */ |
| - | 64, 65, 66, 67, 68, 69, 70, 71, |
| - | 72, 73, 74, 75, 76, 77, 78, 79, |
| - | 80, 81, 82, 83, 84, 85, 86, 87, |
| - | 88, 89, 90, 91, 92, 93, 94, 95, |
| - | 96, 97, 98, 99, 100, 101, 102, 103, |
| - | 104, 105, 106, 107, 108, 109, 110, 111, |
| - | 112, 113, 114, 115, 116, 117, 118, 119, |
| - | 120, 121, 122, 123, 124, 125, 126, 127, |
| - | }; |
| - | static unsigned int s3_3213[] = { /* very spread numbers */ |
| - | 2232, 5167, 8204, 8526, 8641, 10056, 10140, 10611, |
| - | 10998, 11626, 13735, 15539, 17947, 24295, 27833, 30318, |
| - | }; |
| - | |
| - | static void check_spbset(const char *name, unsigned int *s, size_t slen) |
| + | static void check_spbset(const char *name, const unsigned int *s, size_t slen) |
| { | |
| struct uint_spbset bset; | |
| size_t i, j; | |
| @@ -113,15 +89,32 @@ static void check_spbset(const char *name, unsigned int *s, size_t slen) | |
| Curl_uint_spbset_destroy(&bset); | |
| } | |
| - | static void unit_stop(void) |
| + | static CURLcode test_unit3213(char *arg) |
| { | |
| + | UNITTEST_BEGIN_SIMPLE |
| + | |
| + | static const unsigned int s1[] = { /* spread numbers, some at slot edges */ |
| + | 0, 1, 4, 17, 63, 64, 65, 66, |
| + | 90, 99, |
| + | }; |
| + | static const unsigned int s2[] = { /* set with all bits in slot1 set */ |
| + | 64, 65, 66, 67, 68, 69, 70, 71, |
| + | 72, 73, 74, 75, 76, 77, 78, 79, |
| + | 80, 81, 82, 83, 84, 85, 86, 87, |
| + | 88, 89, 90, 91, 92, 93, 94, 95, |
| + | 96, 97, 98, 99, 100, 101, 102, 103, |
| + | 104, 105, 106, 107, 108, 109, 110, 111, |
| + | 112, 113, 114, 115, 116, 117, 118, 119, |
| + | 120, 121, 122, 123, 124, 125, 126, 127, |
| + | }; |
| + | static const unsigned int s3[] = { /* very spread numbers */ |
| + | 2232, 5167, 8204, 8526, 8641, 10056, 10140, 10611, |
| + | 10998, 11626, 13735, 15539, 17947, 24295, 27833, 30318, |
| + | }; |
| + | |
| + | check_spbset("s1", s1, CURL_ARRAYSIZE(s1)); |
| + | check_spbset("s2", s2, CURL_ARRAYSIZE(s2)); |
| + | check_spbset("s3", s3, CURL_ARRAYSIZE(s3)); |
| + | |
| + | UNITTEST_END_SIMPLE |
| } | |
| - | |
| - | |
| - | UNITTEST_START |
| - | |
| - | check_spbset("s1", s1_3213, CURL_ARRAYSIZE(s1_3213)); |
| - | check_spbset("s2", s2_3213, CURL_ARRAYSIZE(s2_3213)); |
| - | check_spbset("s3", s3_3213, CURL_ARRAYSIZE(s3_3213)); |
| - | |
| - | UNITTEST_STOP |