wireshark/test
Gerald Combs f300676bec Dumpcap: Fix writing SHBs and IDBs.
If we have a single capture source and that capture source is pcapng and
we're writing a pcapng file, do the following:

- Pass its SHB and IDBs through unmodified. Don't save or write command
  line interface IDBs.

- Save the most recent SHB and IDBs so that we can write them when we're
  writing multiple output files.

If we have multiple capture sources, do the following:

- Write Dumpcap's SHB.

- Keep a global list of IDBs, consisting of both command line interfaces
  and IDBs read from pcapng sources.

- When reading an EPB or ISB, remap its local interface number to its
  corresponding global number.

Add Dumpcap pcapng section tests. Make the application IDs in the
"many_interfaces" captures unique.

Change-Id: I2005934c1f83d839727421960005f106d6c682dd
Reviewed-on: https://code.wireshark.org/review/30085
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-16 19:28:11 +00:00
..
baseline Test: Add fileformats and I/O. 2018-04-27 19:52:04 +00:00
captures Dumpcap: Fix writing SHBs and IDBs. 2018-11-16 19:28:11 +00:00
config ssl,http: rename http-over-ssl to http-over-tls 2016-09-04 13:18:54 +00:00
keys KNX-IP: new KNXnet/IP dissector 2018-10-16 09:03:43 +00:00
lua lua: add support for ethernet addresses to the Address class 2018-10-18 07:51:36 +00:00
suite_dfilter test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
README.test Test: Remove the Bash test scripts. 2018-05-02 04:09:26 +00:00
conftest.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
fixtures.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
fixtures_ws.py test: finalize suite_capture conversion to fixtures, drop config.py 2018-11-16 13:55:40 +00:00
hosts.custom Continue to remove $Id$ from top of file 2014-03-31 18:48:06 +00:00
hosts.global Continue to remove $Id$ from top of file 2014-03-31 18:48:06 +00:00
hosts.personal Continue to remove $Id$ from top of file 2014-03-31 18:48:06 +00:00
pytest.ini Tests: add minimal pytest support 2018-07-17 09:04:01 +00:00
subprocesstest.py Dumpcap: Fix writing SHBs and IDBs. 2018-11-16 19:28:11 +00:00
suite_capture.py Dumpcap: Fix writing SHBs and IDBs. 2018-11-16 19:28:11 +00:00
suite_clopts.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
suite_decryption.py test: convert some more tests to use fixtures 2018-11-14 05:00:37 +00:00
suite_dissection.py test: convert some more tests to use fixtures 2018-11-14 05:00:37 +00:00
suite_fileformats.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
suite_follow.py test: convert some more tests to use fixtures 2018-11-14 05:00:37 +00:00
suite_io.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
suite_mergecap.py test: convert some more tests to use fixtures 2018-11-14 05:00:37 +00:00
suite_nameres.py test: convert suite_nameres to use fixtures 2018-11-15 22:56:47 +00:00
suite_sharkd.py test: convert some more tests to use fixtures 2018-11-14 05:00:37 +00:00
suite_text2pcap.py test: convert suite_text2pcap to use fixtures 2018-11-15 22:56:23 +00:00
suite_unittests.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
suite_wslua.py test: convert some more tests to use fixtures 2018-11-14 05:00:37 +00:00
test.py test: convert capture tests to use fixtures, fix tests without dumpcap 2018-11-16 13:55:28 +00:00
util_dump_dhcp_pcap.py Dumpcap+Qt: Add support for `-a packets:NUM` and `-b packets:NUM`. 2018-11-09 05:55:11 +00:00

README.test

Wireshark Tests

The main testing script is `test.py`. It will attempt to test as much as
possible by default, including packet capture. This means that you will
probably either have to supply a capture interface (`--capture-interface
<interface>`) or disable capture tests (`--disable-capture`). You must
also build the test-programs target in order for the unittests suite to
pass.

To run all tests from CMake do the following:
- Pass `-DTEST_EXTRA_ARGS=--disable-capture` or
  `-DTEST_EXTRA_ARGS=--capture-interface=<interface>`
  as needed for your system.
- Build the “test” target or run ctest, e.g. `ctest --force-new-ctest-process -j 4 --verbose`.

To run all tests directly, run `test.py -p
/path/to/wireshark-build/run-directory <capture args>`.

To see a list of all options, run `test.py -h` or `test.py --help`.

To see a list of all tests, run `test.py -l`.

See the “Wireshark Tests” chapter of the Developer's Guide for details.