]>
git.ipfire.org Git - thirdparty/suricata-verify.git/log
Mats Klepsland [Wed, 15 May 2019 12:57:09 +0000 (14:57 +0200)]
tests/tls: add testcases for tls.certs keyword
Victor Julien [Mon, 6 May 2019 11:26:32 +0000 (13:26 +0200)]
tests: add missing magic dep to filestore
Andreas Herz [Fri, 3 May 2019 08:46:30 +0000 (10:46 +0200)]
filestore: add testcases for filecontainer with http and smb
Victor Julien [Mon, 29 Apr 2019 10:06:04 +0000 (12:06 +0200)]
tests/anomaly: fix for mingw
Victor Julien [Mon, 29 Apr 2019 10:04:59 +0000 (12:04 +0200)]
tests: fix wrong jansson test
Jeff Lucovsky [Wed, 17 Apr 2019 23:34:36 +0000 (16:34 -0700)]
Adds test case for JSON anomaly logging
Victor Julien [Fri, 26 Apr 2019 08:27:14 +0000 (10:27 +0200)]
tests: fix test requirements for 4.1.x and 4.0.x
Shivani Bhardwaj [Thu, 25 Apr 2019 15:46:39 +0000 (21:16 +0530)]
run: Make test result output compact
The new sub test routine causes the test result output cluttered. In
order to avoid that, only print the information of any sub-tests being
skipped or failed.
Before
```
===> alert-testmyids:
|
--> Sub test #1: OK
|
--> Sub test #2: SKIPPED : Suricata v6.0 not found
|
--> Sub test #3: SKIPPED : Suricata v2.0 not found
OK
```
After this patch
```
===> alert-testmyids: Sub test #2: SKIPPED : Suricata v6.0 not found
Sub test #3: SKIPPED : Suricata v2.0 not found
OK
```
Giuseppe Longo [Tue, 23 Apr 2019 18:42:37 +0000 (20:42 +0200)]
detect-http-protocol: test inspect/mpm v2 apis
Philippe Antoine [Wed, 6 Mar 2019 07:57:48 +0000 (08:57 +0100)]
Adds a test case for http auth unrecognized
Mark Janssen [Thu, 28 Feb 2019 15:15:25 +0000 (16:15 +0100)]
eve/flow: add vlan and double-tagged vlan test
Jeff Lucovsky [Sat, 2 Mar 2019 17:21:30 +0000 (09:21 -0800)]
Suricata-verify tests for http.{location,server}
Add test cases to suricata-verify for new HTTP sticky buffers: location and server
jason taylor [Thu, 4 Apr 2019 00:33:52 +0000 (20:33 -0400)]
alert: verify test for distance/within keywords
* this is based on https://redmine.openinfosecfoundation.org/issues/1
Signed-off-by: jason taylor <jtfas90@gmail.com>
Shivani Bhardwaj [Sat, 20 Apr 2019 19:21:16 +0000 (00:51 +0530)]
run: Add per test check for Suricata version
Some tests in the latest versions might fail due to compatibility issues
because of the changes in features with every version. In order to avoid
failure in such cases, add per test checks that allow to check for the
current Suricata version and in case it does not match the version of
Suricata required to run that particular test, skip that test with an
appropriate message. This feature allows to run different underlying
tests individually and observe their individual outputs.
Sample conf
-----------
```
requires:
features:
- HAVE_LIBJANSSON
checks:
- filter:
version: 2
count: 1
match:
event_type: alert
- filter:
version: 5.0
count: 1
match:
event_type: alert
# Check how many lines were logged to fast.log.
- shell:
args: cat fast.log | wc -l | xargs
expect: 1
```
Sample output
-------------
Running `tests/alert-testmyids` with above configuration (test.yaml)
gives the following output when run from a directory having Suricata
version 5.0.0-dev.
```
===> alert-testmyids:
|
--> Sub test #1: SKIPPED: Suricata v2 not found
|
--> Sub test #2: OK
|
--> Sub test #3: OK
OK
```
Case handling
-------------
Case #1
=======
In case someone specifies `min-version` as well as `version` as a part
of the configuration, the test fails with an error as below.
```
===> alert-testmyids: FAIL: Specify either min-version or version
```
Case #2
=======
In case someone provides an old style `check.sh` as well as `checks` in
test.yaml, the test only performs the operations mentioned in tests.yaml
and ignores the presence of `check.sh`.
Case #3
=======
In case someone provides a faulty `check.sh`, entire test fails.
Closes redmine ticket #2924
Philippe Antoine [Thu, 18 Apr 2019 13:43:17 +0000 (15:43 +0200)]
Adds smtp rset test
Resetting BDAT chunks length
Victor Julien [Thu, 21 Feb 2019 09:37:00 +0000 (10:37 +0100)]
windows: fixes for for windows
Support running tests on Windows. Fix unix-isms like 'command > /dev/null'
and use 'command > nil' in Windows.
Skip tests that use the 'check.sh' or 'command' logic.
Pass the run.py's env to the subprocess to make sure the PATH is passed
on correctly.
Victor Julien [Thu, 21 Feb 2019 17:55:46 +0000 (18:55 +0100)]
eve/dns-v2: remove unnecessary include
Victor Julien [Thu, 21 Feb 2019 11:12:39 +0000 (12:12 +0100)]
tests: add test for bug 2769
Victor Julien [Fri, 29 Mar 2019 14:04:22 +0000 (15:04 +0100)]
runner: use --disable-detection when no rules in test
Philippe Antoine [Thu, 4 Apr 2019 18:55:51 +0000 (20:55 +0200)]
Adds test case for http range logging
Pierre Chifflier [Mon, 4 Mar 2019 20:34:35 +0000 (21:34 +0100)]
Add test for IKEv2 Weak DH parameters detection
Maurizio Abba [Fri, 15 Feb 2019 17:51:46 +0000 (17:51 +0000)]
smtp: add raw extraction test
Victor Julien [Sat, 16 Feb 2019 09:42:09 +0000 (10:42 +0100)]
tests: fix tls and eve tests for 4.0.x
Philippe Antoine [Fri, 18 Jan 2019 16:37:58 +0000 (17:37 +0100)]
Adds a readme and the dummy python script
Commit to be squashed
Philippe Antoine [Fri, 14 Dec 2018 10:21:31 +0000 (11:21 +0100)]
Adds smtp pipelining test
See #1863
Jason Ish [Thu, 24 Jan 2019 16:51:31 +0000 (10:51 -0600)]
dns test: add check for dns object in alert
Extend an existing test to check that the DNS object exists
on a DNS alert.
jason taylor [Tue, 18 Dec 2018 21:07:07 +0000 (16:07 -0500)]
krb5: Add parser test with fragmented packets
- adds test case
- reference: https://github.com/OISF/suricata/pull/3583
- reference: https://redmine.openinfosecfoundation.org/issues/2528
Signed-off-by: jason taylor <jtfas90@gmail.com>
Victor Julien [Fri, 8 Feb 2019 10:48:28 +0000 (11:48 +0100)]
tls tests: don't include full yaml
Mats Klepsland [Thu, 1 Nov 2018 22:22:07 +0000 (23:22 +0100)]
Add test for TLS 1.3 draft 28
Mats Klepsland [Thu, 1 Nov 2018 22:21:51 +0000 (23:21 +0100)]
Add test for TLS 1.3 draft 23
Mats Klepsland [Thu, 1 Nov 2018 22:21:26 +0000 (23:21 +0100)]
Add test for TLS 1.3 draft 22
Mats Klepsland [Thu, 1 Nov 2018 22:20:40 +0000 (23:20 +0100)]
Add test for TLS 1.3 draft 19
Mats Klepsland [Thu, 1 Nov 2018 22:18:04 +0000 (23:18 +0100)]
Add test for TLS 1.3 draft 18
Mats Klepsland [Thu, 1 Nov 2018 22:15:59 +0000 (23:15 +0100)]
Add test for TLS 1.3 draft 14
Jason Ish [Mon, 3 Dec 2018 16:38:01 +0000 (10:38 -0600)]
dns tests: enable eve v1 tests for Rust builds.
Suricata branch ish/rust-dns-v1/v1 brings DNS v1 logging
support for Rust.
Victor Julien [Fri, 30 Nov 2018 12:15:28 +0000 (13:15 +0100)]
yamls: minimize included yaml use
Use more built-in defaults. The yaml setting just removed didn't work
on systems with lots of cores. The stream memcap was too low for the
number of threads.
Jason Ish [Tue, 1 May 2018 16:44:18 +0000 (10:44 -0600)]
filestore tests: remove included Suricata
Per Victor's observation that the suricata.yaml can be almost
empty.
Jason Ish [Wed, 14 Mar 2018 17:28:34 +0000 (11:28 -0600)]
rename some dns specific tests to start with dns
Jason Ish [Wed, 14 Mar 2018 17:26:38 +0000 (11:26 -0600)]
skip many dns tests when rust is enabled...
they depend on dns v1 logging, which is not supported by
rust builds
Jason Ish [Wed, 14 Mar 2018 17:26:24 +0000 (11:26 -0600)]
readme: example of skipping a test by feature
Jason Ish [Wed, 14 Mar 2018 13:32:55 +0000 (07:32 -0600)]
python 3 fix.
Jason Ish [Tue, 13 Mar 2018 19:13:32 +0000 (13:13 -0600)]
add an eve dns v2 specific test
Jason Ish [Tue, 13 Mar 2018 18:41:38 +0000 (12:41 -0600)]
make config requires a skip, not a requires
oops, reverse the logic on the previous commit.
Jason Ish [Tue, 13 Mar 2018 17:31:54 +0000 (11:31 -0600)]
require specific suricata config settings...
specific as a regex pattern on the key, for example:
requires:
config:
outputs.\d.eve-log.types.\d.dns.version: 2
To require version 2 of the eve dns logger without needing
to know exactly which list item its at.
Uses --dump-config to load the config.
Jason Ish [Sat, 17 Feb 2018 20:26:36 +0000 (14:26 -0600)]
readme: run.sh -> run.py
Jason Ish [Fri, 16 Feb 2018 20:58:44 +0000 (14:58 -0600)]
http/eve/alert/xff tests
Jason Ish [Fri, 16 Feb 2018 20:39:16 +0000 (14:39 -0600)]
test: unified2 xff
Jason Ish [Fri, 16 Feb 2018 20:37:48 +0000 (14:37 -0600)]
runner: pre-check script
Allow a script to be defined, "pre-check" that is run before the
checks are run. For example, a new test converts unified2 to
json before running filter checks.
Also allow the eve.json filename to be changed, useful for doing
filter checks on arbitrary json output.
Jason Ish [Thu, 8 Feb 2018 01:18:26 +0000 (19:18 -0600)]
runner: remove usage of version.raw
deleted in previous commit
Jason Ish [Wed, 7 Feb 2018 16:56:42 +0000 (10:56 -0600)]
requires: version: set a specific version
"4" would match any version 4 release.
"4.0" would match any 4.0.x release.
"4.0.3" would only match 4.0.3.
Jason Ish [Tue, 30 Jan 2018 22:28:14 +0000 (16:28 -0600)]
test: eve/alert/metadata
Jason Ish [Tue, 30 Jan 2018 22:27:31 +0000 (16:27 -0600)]
new filter checks: has-key not has-key
Match on the event having or not having a key.
Jason Ish [Tue, 30 Jan 2018 15:12:40 +0000 (09:12 -0600)]
runner: output new line after cmdline
Jason Ish [Mon, 29 Jan 2018 20:45:28 +0000 (14:45 -0600)]
runner: don't fail if requires is empty
Jason Ish [Thu, 25 Jan 2018 22:26:44 +0000 (16:26 -0600)]
eve-metadata: update for recent changes
Jason Ish [Wed, 24 Jan 2018 22:49:56 +0000 (16:49 -0600)]
eve-metadata: eve metadata test
Jason Ish [Wed, 24 Jan 2018 22:49:33 +0000 (16:49 -0600)]
requires: allow require to be a script that returns true
Jason Ish [Mon, 22 Jan 2018 13:34:50 +0000 (07:34 -0600)]
runner: prevent double output directory
Victor Julien [Sun, 21 Jan 2018 21:03:30 +0000 (22:03 +0100)]
runner: add --valgrind opt
Runs the tests inside valgrind. Uses the default suppressions from
the Suricata git tree.
Jason Ish [Fri, 19 Jan 2018 21:27:41 +0000 (15:27 -0600)]
runner: allow --outdir to be relative (ie: ./output)
Victor Julien [Thu, 18 Jan 2018 17:55:38 +0000 (18:55 +0100)]
runner: rename --dir to --testdir
Victor Julien [Thu, 18 Jan 2018 17:52:59 +0000 (18:52 +0100)]
runner: add --outdir <dir> option
Allow specifying an output dir to avoid poluting the work tree
or run tests off a read only file system.
Jason Ish [Fri, 19 Jan 2018 20:23:25 +0000 (14:23 -0600)]
setup/check relative to output directory
Run the setup and check phases relative to the output directory.
Jason Ish [Thu, 18 Jan 2018 16:21:47 +0000 (10:21 -0600)]
remove requires.not-features support: use skip instead
Jason Ish [Thu, 18 Jan 2018 16:09:24 +0000 (10:09 -0600)]
filestore-v2.3-fserror: skip if uid=0
Jason Ish [Thu, 18 Jan 2018 16:08:55 +0000 (10:08 -0600)]
test.yaml: allow a test to be skipped if running as a specific uid
Jason Ish [Thu, 18 Jan 2018 15:23:38 +0000 (09:23 -0600)]
test: check fail if filestore v1 and v2 enabled
Jason Ish [Thu, 18 Jan 2018 15:23:18 +0000 (09:23 -0600)]
test.yaml: allow expected exit code to be set
Victor Julien [Thu, 18 Jan 2018 08:50:36 +0000 (09:50 +0100)]
tests/filestore: add test for meta file checks
Victor Julien [Thu, 18 Jan 2018 08:50:11 +0000 (09:50 +0100)]
tests/filestore: add HAVE_NSS dependency
Jason Ish [Wed, 17 Jan 2018 20:25:50 +0000 (14:25 -0600)]
filestore v2 tests
Jason Ish [Wed, 17 Jan 2018 20:25:05 +0000 (14:25 -0600)]
test.yaml: allow a pcap to be referenced
So a single PCAP can be shared by multiple tests with only one
copy of the pcap.
Jason Ish [Wed, 17 Jan 2018 19:40:11 +0000 (13:40 -0600)]
runner: sort the tests alphabetically then run
Jason Ish [Wed, 17 Jan 2018 12:49:48 +0000 (06:49 -0600)]
runner: fix skip on no pcap (and no test.yaml)
Jason Ish [Wed, 17 Jan 2018 12:39:28 +0000 (06:39 -0600)]
readme: or pcapng files...
Jason Ish [Wed, 17 Jan 2018 12:37:37 +0000 (06:37 -0600)]
clean: test that we are in a verify directory
Victor Julien [Wed, 17 Jan 2018 10:19:05 +0000 (11:19 +0100)]
runner: support pcapng extension
Victor Julien [Wed, 17 Jan 2018 08:57:59 +0000 (09:57 +0100)]
runner: reinit output dir for each run
Otherwise counting filters fail due to the default behaviour of
Suricata to 'append' to existing files.
Jason Ish [Tue, 16 Jan 2018 20:28:02 +0000 (14:28 -0600)]
test.yaml: count field to execute test X number of times
Jason Ish [Tue, 16 Jan 2018 20:20:48 +0000 (14:20 -0600)]
runner: refactor use of test configuration
Jason Ish [Tue, 16 Jan 2018 20:14:40 +0000 (14:14 -0600)]
test: show help
Jason Ish [Tue, 16 Jan 2018 20:12:44 +0000 (14:12 -0600)]
runner: custom args and pcap requires option
To specify additional args, test.yaml can have:
args:
- --set field=val
Also, by default a pcap file is required for a test to run. Add
pcap option to requires that can turn this off.
Victor Julien [Tue, 16 Jan 2018 11:07:53 +0000 (12:07 +0100)]
runner: treat missing pcap as condition to 'skip'
This allows disabling of tests by renaming the pcap file to <pcap>.disabled
or similar.
Victor Julien [Sat, 13 Jan 2018 17:41:52 +0000 (18:41 +0100)]
runner: allow tests to be loaded from external dir
Add --dir <directory> option to specify a external directory for loading
and running tests.
This allows external test repositories for tests that are private or too
large to be part of the repo.
Jason Ish [Tue, 16 Jan 2018 01:19:24 +0000 (19:19 -0600)]
runner: add setup
A test.yaml can now have a setup section that is run
before Suricata is executed.
Jason Ish [Fri, 12 Jan 2018 18:59:28 +0000 (12:59 -0600)]
runner: allow a test to require the existent of files
For example, a test could depend on src/output-filestore.c.
Jason Ish [Fri, 12 Jan 2018 14:21:05 +0000 (08:21 -0600)]
allow optional reason for skip in non-features
Jason Ish [Fri, 12 Jan 2018 14:04:38 +0000 (08:04 -0600)]
dns-lua-rules: skip on rust for now, issue.
Jason Ish [Fri, 12 Jan 2018 14:02:48 +0000 (08:02 -0600)]
runner: fix error looking for filter comment
Jason Ish [Thu, 11 Jan 2018 18:55:11 +0000 (12:55 -0600)]
runner: another python 3 fixup
Jason Ish [Tue, 9 Jan 2018 22:06:43 +0000 (16:06 -0600)]
runner: py3 fixup
Jason Ish [Tue, 9 Jan 2018 20:46:26 +0000 (14:46 -0600)]
add requires HAVE_LIBJANSSON to tests using eve
Jason Ish [Tue, 9 Jan 2018 20:46:00 +0000 (14:46 -0600)]
runner: catch another exit case for --fail
Jason Ish [Tue, 9 Jan 2018 20:22:52 +0000 (14:22 -0600)]
runner: python3 fixes
Jason Ish [Tue, 9 Jan 2018 16:40:10 +0000 (10:40 -0600)]
check for jq and xargs, fail with error if not found
Jason Ish [Tue, 9 Jan 2018 13:01:21 +0000 (07:01 -0600)]
readme: document check.yaml
Jason Ish [Tue, 9 Jan 2018 13:00:39 +0000 (07:00 -0600)]
add requires check to lua tests
remove check based on directory name
Jason Ish [Tue, 9 Jan 2018 12:59:35 +0000 (06:59 -0600)]
dns test: move to test.yaml
Jason Ish [Thu, 21 Dec 2017 00:20:49 +0000 (18:20 -0600)]
remove support for "skip" file test skips
wasn't being used anymore as there are other ways to
skip a test
Jason Ish [Thu, 21 Dec 2017 00:16:56 +0000 (18:16 -0600)]
remove run.sh; use run.py instead