summaryrefslogtreecommitdiffstats
path: root/tests/shell/README
blob: 35f6e3785f0e87a06afec9329a79248484ba0131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
This test suite is intended to perform tests on a higher level
than the other regression test suites.

It can run arbitrary executables which can perform any test, not
limited to testing the nft syntax or netlink code (which is what
the regression tests do).

To run the test suite (as root):
 $ cd tests/shell
 # ./run-tests.sh

Test files are executable files matching the pattern <<name_N>>,
where N is the expected return code of the executable. Since they
are located with `find', test files can be put in any subdirectory.

You can turn on a verbose execution by calling:
 # ./run-tests.sh -v

And generate missing dump files with:
 # ./run-tests.sh -g <TESTFILE>

Before each test file invocation, `nft flush ruleset' will be called.
Also, test file process environment will include the variable $NFT
which contains the path to the nft binary being tested.

You can pass an arbitrary $NFT value as well:
 # NFT=/usr/local/sbin/nft ./run-tests.sh

By default, the tests are run with the nft binary at '../../src/nft'