]> git.ipfire.org Git - thirdparty/suricata-verify.git/log
thirdparty/suricata-verify.git
6 years agoAdds a readme and the dummy python script 8/head
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

6 years agoAdds smtp pipelining test
Philippe Antoine [Fri, 14 Dec 2018 10:21:31 +0000 (11:21 +0100)] 
Adds smtp pipelining test

See #1863

6 years agodns test: add check for dns object in alert
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.

6 years agokrb5: Add parser test with fragmented packets
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>
6 years agotls tests: don't include full yaml
Victor Julien [Fri, 8 Feb 2019 10:48:28 +0000 (11:48 +0100)] 
tls tests: don't include full yaml

6 years agoAdd test for TLS 1.3 draft 28
Mats Klepsland [Thu, 1 Nov 2018 22:22:07 +0000 (23:22 +0100)] 
Add test for TLS 1.3 draft 28

6 years agoAdd test for TLS 1.3 draft 23
Mats Klepsland [Thu, 1 Nov 2018 22:21:51 +0000 (23:21 +0100)] 
Add test for TLS 1.3 draft 23

6 years agoAdd test for TLS 1.3 draft 22
Mats Klepsland [Thu, 1 Nov 2018 22:21:26 +0000 (23:21 +0100)] 
Add test for TLS 1.3 draft 22

6 years agoAdd test for TLS 1.3 draft 19
Mats Klepsland [Thu, 1 Nov 2018 22:20:40 +0000 (23:20 +0100)] 
Add test for TLS 1.3 draft 19

6 years agoAdd test for TLS 1.3 draft 18
Mats Klepsland [Thu, 1 Nov 2018 22:18:04 +0000 (23:18 +0100)] 
Add test for TLS 1.3 draft 18

6 years agoAdd test for TLS 1.3 draft 14
Mats Klepsland [Thu, 1 Nov 2018 22:15:59 +0000 (23:15 +0100)] 
Add test for TLS 1.3 draft 14

6 years agodns tests: enable eve v1 tests for Rust builds. 4/head
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.

6 years agoyamls: minimize included yaml use 2/head
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.

7 years agofilestore tests: remove included Suricata
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.

7 years agorename some dns specific tests to start with dns
Jason Ish [Wed, 14 Mar 2018 17:28:34 +0000 (11:28 -0600)] 
rename some dns specific tests to start with dns

7 years agoskip many dns tests when rust is enabled...
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

7 years agoreadme: example of skipping a test by feature
Jason Ish [Wed, 14 Mar 2018 17:26:24 +0000 (11:26 -0600)] 
readme: example of skipping a test by feature

7 years agopython 3 fix.
Jason Ish [Wed, 14 Mar 2018 13:32:55 +0000 (07:32 -0600)] 
python 3 fix.

7 years agoadd an eve dns v2 specific test
Jason Ish [Tue, 13 Mar 2018 19:13:32 +0000 (13:13 -0600)] 
add an eve dns v2 specific test

7 years agomake config requires a skip, not a requires
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.

7 years agorequire specific suricata config settings...
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.

7 years agoreadme: run.sh -> run.py
Jason Ish [Sat, 17 Feb 2018 20:26:36 +0000 (14:26 -0600)] 
readme: run.sh -> run.py

7 years agohttp/eve/alert/xff tests
Jason Ish [Fri, 16 Feb 2018 20:58:44 +0000 (14:58 -0600)] 
http/eve/alert/xff tests

7 years agotest: unified2 xff
Jason Ish [Fri, 16 Feb 2018 20:39:16 +0000 (14:39 -0600)] 
test: unified2 xff

7 years agorunner: pre-check script
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.

7 years agorunner: remove usage of version.raw
Jason Ish [Thu, 8 Feb 2018 01:18:26 +0000 (19:18 -0600)] 
runner: remove usage of version.raw

deleted in previous commit

7 years agorequires: version: set a specific version
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.

7 years agotest: eve/alert/metadata
Jason Ish [Tue, 30 Jan 2018 22:28:14 +0000 (16:28 -0600)] 
test: eve/alert/metadata

7 years agonew filter checks: has-key not has-key
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.

7 years agorunner: output new line after cmdline
Jason Ish [Tue, 30 Jan 2018 15:12:40 +0000 (09:12 -0600)] 
runner: output new line after cmdline

7 years agorunner: don't fail if requires is empty
Jason Ish [Mon, 29 Jan 2018 20:45:28 +0000 (14:45 -0600)] 
runner: don't fail if requires is empty

7 years agoeve-metadata: update for recent changes
Jason Ish [Thu, 25 Jan 2018 22:26:44 +0000 (16:26 -0600)] 
eve-metadata: update for recent changes

7 years agoeve-metadata: eve metadata test
Jason Ish [Wed, 24 Jan 2018 22:49:56 +0000 (16:49 -0600)] 
eve-metadata: eve metadata test

7 years agorequires: allow require to be a script that returns true
Jason Ish [Wed, 24 Jan 2018 22:49:33 +0000 (16:49 -0600)] 
requires: allow require to be a script that returns true

7 years agorunner: prevent double output directory
Jason Ish [Mon, 22 Jan 2018 13:34:50 +0000 (07:34 -0600)] 
runner: prevent double output directory

7 years agorunner: add --valgrind opt
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.

7 years agorunner: allow --outdir to be relative (ie: ./output)
Jason Ish [Fri, 19 Jan 2018 21:27:41 +0000 (15:27 -0600)] 
runner: allow --outdir to be relative (ie: ./output)

7 years agorunner: rename --dir to --testdir
Victor Julien [Thu, 18 Jan 2018 17:55:38 +0000 (18:55 +0100)] 
runner: rename --dir to --testdir

7 years agorunner: add --outdir <dir> option
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.

7 years agosetup/check relative to output directory
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.

7 years agoremove requires.not-features support: use skip instead
Jason Ish [Thu, 18 Jan 2018 16:21:47 +0000 (10:21 -0600)] 
remove requires.not-features support: use skip instead

7 years agofilestore-v2.3-fserror: skip if uid=0
Jason Ish [Thu, 18 Jan 2018 16:09:24 +0000 (10:09 -0600)] 
filestore-v2.3-fserror: skip if uid=0

7 years agotest.yaml: allow a test to be skipped if running as a specific uid
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

7 years agotest: check fail if filestore v1 and v2 enabled
Jason Ish [Thu, 18 Jan 2018 15:23:38 +0000 (09:23 -0600)] 
test: check fail if filestore v1 and v2 enabled

7 years agotest.yaml: allow expected exit code to be set
Jason Ish [Thu, 18 Jan 2018 15:23:18 +0000 (09:23 -0600)] 
test.yaml: allow expected exit code to be set

7 years agotests/filestore: add test for meta file checks
Victor Julien [Thu, 18 Jan 2018 08:50:36 +0000 (09:50 +0100)] 
tests/filestore: add test for meta file checks

7 years agotests/filestore: add HAVE_NSS dependency
Victor Julien [Thu, 18 Jan 2018 08:50:11 +0000 (09:50 +0100)] 
tests/filestore: add HAVE_NSS dependency

7 years agofilestore v2 tests
Jason Ish [Wed, 17 Jan 2018 20:25:50 +0000 (14:25 -0600)] 
filestore v2 tests

7 years agotest.yaml: allow a pcap to be referenced
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.

7 years agorunner: sort the tests alphabetically then run
Jason Ish [Wed, 17 Jan 2018 19:40:11 +0000 (13:40 -0600)] 
runner: sort the tests alphabetically then run

7 years agorunner: fix skip on no pcap (and no test.yaml)
Jason Ish [Wed, 17 Jan 2018 12:49:48 +0000 (06:49 -0600)] 
runner: fix skip on no pcap (and no test.yaml)

7 years agoreadme: or pcapng files...
Jason Ish [Wed, 17 Jan 2018 12:39:28 +0000 (06:39 -0600)] 
readme: or pcapng files...

7 years agoclean: test that we are in a verify directory
Jason Ish [Wed, 17 Jan 2018 12:37:37 +0000 (06:37 -0600)] 
clean: test that we are in a verify directory

7 years agorunner: support pcapng extension
Victor Julien [Wed, 17 Jan 2018 10:19:05 +0000 (11:19 +0100)] 
runner: support pcapng extension

7 years agorunner: reinit output dir for each run
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.

7 years agotest.yaml: count field to execute test X number of times
Jason Ish [Tue, 16 Jan 2018 20:28:02 +0000 (14:28 -0600)] 
test.yaml: count field to execute test X number of times

7 years agorunner: refactor use of test configuration
Jason Ish [Tue, 16 Jan 2018 20:20:48 +0000 (14:20 -0600)] 
runner: refactor use of test configuration

7 years agotest: show help
Jason Ish [Tue, 16 Jan 2018 20:14:40 +0000 (14:14 -0600)] 
test: show help

7 years agorunner: custom args and pcap requires option
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.

7 years agorunner: treat missing pcap as condition to 'skip'
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.

7 years agorunner: allow tests to be loaded from external dir
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.

7 years agorunner: add setup
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.

7 years agorunner: allow a test to require the existent of files
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.

7 years agoallow optional reason for skip in non-features
Jason Ish [Fri, 12 Jan 2018 14:21:05 +0000 (08:21 -0600)] 
allow optional reason for skip in non-features

7 years agodns-lua-rules: skip on rust for now, issue.
Jason Ish [Fri, 12 Jan 2018 14:04:38 +0000 (08:04 -0600)] 
dns-lua-rules: skip on rust for now, issue.

7 years agorunner: fix error looking for filter comment
Jason Ish [Fri, 12 Jan 2018 14:02:48 +0000 (08:02 -0600)] 
runner: fix error looking for filter comment

7 years agorunner: another python 3 fixup
Jason Ish [Thu, 11 Jan 2018 18:55:11 +0000 (12:55 -0600)] 
runner: another python 3 fixup

7 years agorunner: py3 fixup
Jason Ish [Tue, 9 Jan 2018 22:06:43 +0000 (16:06 -0600)] 
runner: py3 fixup

7 years agoadd requires HAVE_LIBJANSSON to tests using eve
Jason Ish [Tue, 9 Jan 2018 20:46:26 +0000 (14:46 -0600)] 
add requires HAVE_LIBJANSSON to tests using eve

7 years agorunner: catch another exit case for --fail
Jason Ish [Tue, 9 Jan 2018 20:46:00 +0000 (14:46 -0600)] 
runner: catch another exit case for --fail

7 years agorunner: python3 fixes
Jason Ish [Tue, 9 Jan 2018 20:22:52 +0000 (14:22 -0600)] 
runner: python3 fixes

7 years agocheck for jq and xargs, fail with error if not found
Jason Ish [Tue, 9 Jan 2018 16:40:10 +0000 (10:40 -0600)] 
check for jq and xargs, fail with error if not found

7 years agoreadme: document check.yaml
Jason Ish [Tue, 9 Jan 2018 13:01:21 +0000 (07:01 -0600)] 
readme: document check.yaml

7 years agoadd requires check to lua tests
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

7 years agodns test: move to test.yaml
Jason Ish [Tue, 9 Jan 2018 12:59:35 +0000 (06:59 -0600)] 
dns test: move to test.yaml

7 years agoremove support for "skip" file test skips
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

7 years agoremove run.sh; use run.py instead
Jason Ish [Thu, 21 Dec 2017 00:16:56 +0000 (18:16 -0600)] 
remove run.sh; use run.py instead

7 years agoremove leftovers vars.sh files: not used anymore
Jason Ish [Thu, 21 Dec 2017 00:16:26 +0000 (18:16 -0600)] 
remove leftovers vars.sh files: not used anymore

7 years agotls test: based on tls tests in @regit suripcap branch
Jason Ish [Thu, 21 Dec 2017 00:09:04 +0000 (18:09 -0600)] 
tls test: based on tls tests in @regit suripcap branch

combines "TLS 1" and "TLS alert" into a single test

7 years agosome check.sh to test.yaml verifications.
Jason Ish [Wed, 20 Dec 2017 23:04:59 +0000 (17:04 -0600)] 
some check.sh to test.yaml verifications.

7 years agosmtp: basic smtp test showing filter and stats check
Jason Ish [Wed, 20 Dec 2017 23:03:53 +0000 (17:03 -0600)] 
smtp: basic smtp test showing filter and stats check

7 years agoadd new checks to test.yaml
Jason Ish [Wed, 20 Dec 2017 23:02:16 +0000 (17:02 -0600)] 
add new checks to test.yaml

shell - for checking shell command output
filter - for counting number of events matching a filter
stats: for matching values in stats

7 years agonew test for dns lua detect
Jason Ish [Wed, 20 Dec 2017 20:26:31 +0000 (14:26 -0600)] 
new test for dns lua detect

Tests:
- dns.rrname
- dns.request
- dns.response

7 years agoadd suricata 4.0.3 default config
Jason Ish [Wed, 20 Dec 2017 20:26:12 +0000 (14:26 -0600)] 
add suricata 4.0.3 default config

7 years agoadd signature-id validation to test.yaml
Jason Ish [Wed, 20 Dec 2017 19:58:27 +0000 (13:58 -0600)] 
add signature-id validation to test.yaml

With the following in a test.yaml:
  checks:
  - signature-id: 1
  - signature-id: 2
  - signature-id: 3
the eve.json will be checked to make sure it alerts for each
signature id provided.

7 years agoallow test to require an env var to be set
Jason Ish [Wed, 20 Dec 2017 17:25:13 +0000 (11:25 -0600)] 
allow test to require an env var to be set

Useful for only enabling tests when an environment
variable is set.

7 years agoallow command to be set in test.yaml
Jason Ish [Mon, 4 Dec 2017 18:02:36 +0000 (12:02 -0600)] 
allow command to be set in test.yaml

Removes the need to support a test specific run.sh.

Also, don't require a check.sh. In some tests, just a
successful exit code is being tested for.

7 years agoMark 2 tests with min-version 4.0.
Jason Ish [Mon, 4 Dec 2017 13:39:22 +0000 (07:39 -0600)] 
Mark 2 tests with min-version 4.0.

7 years agoadd feature requires; remove skip.sh scripts
Jason Ish [Fri, 1 Dec 2017 23:06:10 +0000 (17:06 -0600)] 
add feature requires; remove skip.sh scripts

requires.features for required features

requires.not-features for when a test should be skipped if a
feature is present.

7 years agodon't run linktype 228 test on suricata < 4.1.0
Jason Ish [Fri, 1 Dec 2017 22:43:34 +0000 (16:43 -0600)] 
don't run linktype 228 test on suricata < 4.1.0

Introduces a test.yaml file that can be placed in a test
directory that provides a test configuration.

For now just a min-version can be configured.

7 years agobasic test for linktype 228
Jason Ish [Fri, 24 Nov 2017 16:55:55 +0000 (10:55 -0600)] 
basic test for linktype 228

7 years agoreadme: document that a pcap is all that is needed.
Jason Ish [Fri, 24 Nov 2017 16:58:11 +0000 (10:58 -0600)] 
readme: document that a pcap is all that is needed.

7 years agorun tests from test directory
Jason Ish [Fri, 24 Nov 2017 16:03:24 +0000 (10:03 -0600)] 
run tests from test directory

Fixes the case where we had a hardcoded relative path
to deal with Lua scripts.

7 years agoput all tests in a tests/ directory
Jason Ish [Fri, 24 Nov 2017 15:14:12 +0000 (09:14 -0600)] 
put all tests in a tests/ directory

7 years agolua-output-http: make ports an int instead of a float
Jason Ish [Mon, 25 Sep 2017 08:40:02 +0000 (09:40 +0100)] 
lua-output-http: make ports an int instead of a float

7 years agobsd fix: pipe wc output to xargs
Jason Ish [Sun, 24 Sep 2017 10:36:51 +0000 (11:36 +0100)] 
bsd fix: pipe wc output to xargs

On BSD and Mac, wc -l outputs right justified strings, causing
the check to fail. Passing through xargs is a hack to strip
the white space.

7 years agolua script tests: fix path to rule directory
Jason Ish [Sun, 24 Sep 2017 10:36:37 +0000 (11:36 +0100)] 
lua script tests: fix path to rule directory

7 years agorename: output-lua-smtp -> lua-output-smtp
Jason Ish [Wed, 20 Sep 2017 09:09:14 +0000 (10:09 +0100)] 
rename: output-lua-smtp -> lua-output-smtp

7 years agooutput-lua: rename to lua-output-http
Jason Ish [Wed, 20 Sep 2017 09:04:26 +0000 (10:04 +0100)] 
output-lua: rename to lua-output-http

As it tests lua output of http metadata.

7 years agooutput-lua: fix lua script
Jason Ish [Wed, 20 Sep 2017 09:02:38 +0000 (10:02 +0100)] 
output-lua: fix lua script

On some distros it was correct, others it failed. I think this was
due to a type in string.gsub, using %g instead of %c.