All the tests in tests/ are part of Wget2 the binary, not libwget. Fix
the license and copyright information accordingly.
* tests/libtest.c: libwget -> Wget. LGPLv3+ -> GPLv3+
* tests/test--accept.c: Same
* tests/test--filter-mime-type.c: Same
* tests/test--follow-tags.c: Same
* tests/test--https-enforce-hard1.c: Same
* tests/test--https-enforce-hard2.c: Same
* tests/test--https-enforce-hard3.c: Same
* tests/test--https-enforce-soft1.c: Same
* tests/test--https-enforce-soft2.c: Same
* tests/test--https-enforce-soft3.c: Same
* tests/test--page-requisites.c: Same
* tests/test--post-file.c: Same
* tests/test--save-content-on.c: Same
* tests/test--spider-r.c: Same
* tests/test-E-k.c: Same
* tests/test-auth-basic.c: Same
* tests/test-auth-digest.c: Same
* tests/test-bad-chunk.c: Same
* tests/test-base.c: Same
* tests/test-c-r.c: Same
* tests/test-chunked.c: Same
* tests/test-compression.c: Same
* tests/test-cut-dirs.c: Same
* tests/test-cut-get-vars.c: Same
* tests/test-directory-clash.c: Same
* tests/test-ftp.c: Same
* tests/test-ftps.c: Same
* tests/test-gpg-bad.c: Same
* tests/test-gpg-invalid.c: Same
* tests/test-gpg-missing.c: Same
* tests/test-gpg-save-failed.c: Same
* tests/test-gpg-styles.c: Same
* tests/test-gpg-valid.c: Same
* tests/test-gpg-verify-no-file.c: Same
* tests/test-gzip.c: Same
* tests/test-i-http.c: Same
* tests/test-i-https.c: Same
* tests/test-idn-cmd.c: Same
* tests/test-idn-meta.c: Same
* tests/test-idn-robots.c: Same
* tests/test-include-and-exclude-directories.c: Same
* tests/test-iri-disabled.c: Same
* tests/test-iri-forced-remote.c: Same
* tests/test-iri-list.c: Same
* tests/test-iri-percent.c: Same
* tests/test-iri-subdir.c: Same
* tests/test-iri.c: Same
* tests/test-k.c: Same
* tests/test-limit-rate-http2.c: Same
* tests/test-limit-rate.c: Same
* tests/test-meta-robots.c: Same
* tests/test-metalink.c: Same
* tests/test-np.c: Same
* tests/test-ocsp-server.c: Same
* tests/test-ocsp-stap.c: Same
* tests/test-p-nc.c: Same
* tests/test-parse-css.c: Same
* tests/test-parse-html-css.c: Same
* tests/test-parse-rss.c: Same
* tests/test-plugin-dummy.c: Same
* tests/test-plugin-failure.c: Same
* tests/test-plugin-interception.c: Same
* tests/test-plugin-nonexistance.c: Same
* tests/test-plugin.c: Same
* tests/test-post-handhshake-auth.c: Same
* tests/test-redirection.c: Same
* tests/test-restrict-ascii.c: Same
* tests/test-robots.c: Same
* tests/test-stats-dns.c: Same
* tests/test-stats-ocsp.c: Same
* tests/test-stats-server.c: Same
* tests/test-stats-site.c: Same
* tests/test-stats-tls.c: Same
* tests/test-timestamping.c: Same
* tests/test-unlink.c: Same
* tests/test-wget-1.c: Same
* cfg.mk: Multiple changes.
(sc_GPL_version): Don't exclude all files when only one has a parsing
issue
(sc_po_check): Tests should always output English. Their output is for
developers, not users
(sc_prohibit_magic_number_exit): tests/test-plugin.c has a parsing
issue that has been reported to gnulib. Others should be checked.
(sc_trailing_blank): Fixed the relevant files instead of ignoring them
(sc_two_space_separator_in_usage): Doesn't seem to trigger on removal
(sc_prohibit_empty_lines_at_EOF): Same
(sc_prohibit_sprintf): Same
(sc_prohibit_printf): Re-arrange within file
(sc_prohibit_free): Same
(sc_prohibit_alloc): Same
(sc_gettext_printf): Same
* docs/DoxygenLayout.xml: Remove trailing whitespaces
* docs/libwget.doxy.in: Same
* tests/libtest.c: Don't internationalize test suite strings
* tests/test-*.c: Use EXIT_FAILURE and EXIT_SUCCESS instead of 1 and 0
* tests/test_plugin.h: Add the OBJECT_DIR and other defines in a single
common file for all plugin tests
* tests/test-plugin*.c: Remove boilerplate code and include
"test_plugin.h"
* tests/Makefile.am: Add new files
* tests/test-plugin-failure.c: New file with tests based on invalid input
* tests/test-plugin-interception.c: New file for testing the various things
plugins can intercept
* tests/test-plugin-nonexistance.c: New file for tests with plugins that don't exist)
* tests/test-plugin.c: Moved tests to the above new files
* Makefile.am: Fix make target 'fuzz-coverage'
* configure.ac: Enable building static library by default,
add option --enable-fuzzing
* fuzz/Makefile.am: Add wget_options_fuzzer,
check for FUZZING (set with --enable-fuzzing)
* fuzz/README.md: Amend the text
* fuzz/main.c: Use printf() instead of wget_info_printf()
* fuzz/run-clang.sh: Use fuzzer binaries built by 'make'
* fuzz/wget_options_fuzzer.c: New fuzzer
* fuzz/wget_options_fuzzer.dict: New fuzzer dictionary
* fuzz/wget_options_fuzzer.in/*: Initial fuzz corpora
* libwget/net.c: Skip IP address resolution when fuzzing
* src/log.c: Don't create files when fuzzing,
don't print to console when fuzzing
* src/options.c: Add set_exit_status() and get_exit_status(),
don't print --help / --version to console when fuzzing,
do not call exit() - return error instead,
fix recursion level in _read_config(),
don't create files when fuzzing,
fix memory leaks in deinit()
* src/stats.c: Don't create files when fuzzing
* src/wget.c: Remove set_exit_status()
* src/wget_main.h: Remove exit_status_t
* src/wget_options.h: Add exit_status_t
* tests/test-plugin.c: Fix expected exit codes from 1 to 2
This is for application fuzzing (namely code from src/).
The code in src/ had to be prepared in certain ways, but it
doesn't add significant overhead, even makes the code cleaner
in some ways. Several of these changes have already been committed
into the master branch.
The use of -shared in the LDFLAGS for the plugins does not work
with './configure --disable-shared'. Instead of failing the build
this patch SKIPs the plugin tests.
* src/dl.c: Add PATTERN for CygWin
* tests/test-plugin.c: Define LOCAL_NAME for CygWin
* unit-tests/test-dl.c: Define BUILD_NAME and LOCAL_NAME for CygWin
* tests/libtest.{c,h}: Add support for feature flags during test
startup. Check if Wget2 is compiled with the feature and conditionally
SKIP the tests
* tests/test-*.c: Pass the right feature flags for each test. MHD for
HTTP, FTP for FTP, IDN and PLUGIN when applicable
* include/wget/wget.h: Add plugin API declarations
* libwget/hsts.c: Make wget_hsts_db_t extensible
* libwget/hpkp.c: Make wget_hpkp_db_t extensible
* libwget/ocsp.c: Make wget_ocsp_db_t extensible
* libwget/plugin.c: Add virtual functions for plugin API
* src/plugin.c: Add plugin API implementation
* src/wget_plugin.h: Likewise
* src/option.c: Add code to call the implementation
* src/wget.c: Likewise
* tests/test-plugin-dummy: Add plugin with dummy databases for testing
* tests/Makefile.am: Add target libplugindb.la
* tests/test-plugin.c: Add tests for custom databases
* unit-tests/test.c: Add tests for new HPKP functions
* libwget/ssl_gnutls.c: Adapt to API changes
* examples/http_multi_get.c: Likewise
* fuzz/libwget_hpkp_fuzzer.c: Likewise
* fuzz/libwget_hsts_fuzzer.c: Likewise
* fuzz/libwget_ocsp_fuzzer.c: Likewise
This feature implemented as per the specifications at
https://gitlab.com/akash_rawal/wget2/wikis/Stage-4
Merged from branch tmp-akash_rawal-stage3 into master
* include/wget/wget.h: Add function declarations
* libwget/plugin.c: Add virtual functions
* configure.ac: Check for fmemopen()
* src/plugin.c: Add implementation
* src/wget_plugin.h: Likewise
* src/wget.c: Add code that calls the implementation
* tests/test-plugin-dummy.c (pluginapi): Add option 'parse-rot13',
'only-rot13' and 'test-pp'
* tests/test-plugin.c: Add tests
* tests/libtest.c: Load files into dynamic memory instead of stack,
enables testing with large files.
Plugin APIs for intercepting downloaded files have been implemented
as per specifications at https://gitlab.com/akash_rawal/wget2/wikis/Stage-3
* include/wget/wget.h: Add function declarations
* libwget/plugin.c: Add virtual functions
* src/plugin.c: Add implementation
* src/wget_plugin.h: Likewise
* src/wget.c: Add code that calls the implementation
* src/wget_job.h: Add a variable to store 'accept' action
* tests/Makefile.am: Add libpluginapi.la
* tests/test-plugin-dummy.c: Add a test plugin for testing
* tests/test-plugin.c: Add tests
Plugin API for intercepting URLs has been implemented as per
specifications at https://gitlab.com/akash_rawal/wget2/wikis/Stage-2
* include/wget/wget.h: Add API for command line option forwarding
* libwget/plugin.c: Likewise
* libwget/test_linking: Add function from libwget/plugin.c
* src/dl.c: Remove unused dl_search1() and dl_list1(),
use wget_vector_t for pointer arrays
* src/wget_dl.h: Likewise
* src/plugin.c: Implement option forwarding
* src/wget_plugin.h: Likewise
* src/options.c: Add options '--plugin-opt=', '--plugin-help'
* unit-tests/test-dl.c: Use dl_list() instead of dl_list1()
* tests/Makefile.am: Add test plugins pluginoption, pluginfaulty1,
pluginfaulty2
* tests/test-plugin-dummy.c: Implement additional test plugins
* tests/test-plugin.c: Extend tests for testing option processing
Command line option forwarding has been implemented as per
specifications at https://gitlab.com/akash_rawal/wget2/wikis/Stage-1
Several style issues were also fixed (Thanks Ander Juaristi)
* tests/test-plugin.c: Rename setenv and unsetenv to setenv_rpl
and unsetenv_rpl respectively.
* unit-tests/test-dl.c: Rename rpl_remove to remove_rpl.
Reported by @gvanem
* configure.ac: Add configure time tests for plugin support backend.
* include/wget/wget.h: Add basic plugin API
* libwget/Makefile.am: Add new file plugin.c to libwget.la
* libwget/plugin.c: Add plugin API functions (new file)
* src/Makefile.am: Add new files dl.c, wget_dl.h, plugin.c, wget_plugin.h
to wget2
* src/dl.c: Add abstraction for dynamic loading of object files
* src/wget_dl.h: Likewise
* src/plugin.c: Add implementation for loading plugins
* src/wget_plugin.h: likewise
* src/options.c: Add options `--plugin=`, `--local-plugin=`,
`--plugin-dirs=`, `--list-plugins`
* src/wget.c: Add function calls to initialize and finalize plugin
support system
* unit-tests/Makefile.am: Add test-dl, libalpha.la, and libbeta.la
* unit-tests/test-dl.c: Add unit test for src/dl.c
* unit-tests/test-dl-dummy.c: Likewise
* tests/Makefile.am: Add test-plugin, libpluginname.la, and
libpluginexit.la
* tests/test-plugin.c: Add tests for plugin support
* tests/test-plugin-dummy.c: Likewise
* libwget/test-linking.c: Fix warnings with --enable-manywarnings
* unit-tests/test.c: likewise
Plugin loading mechanism has been implemented as per specifications
at https://gitlab.com/akash_rawal/wget2/wikis/Stage-0