|
Packit |
c5a612 |
This test-suite is intended to perform tests of higher level than
|
|
Packit |
c5a612 |
the other regression test-suite.
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
It can run arbitrary executables which can perform any test apart of testing
|
|
Packit |
c5a612 |
the nft syntax or netlink code (which is what the regression tests does).
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
To run the test suite (as root):
|
|
Packit |
c5a612 |
$ cd tests/shell
|
|
Packit |
c5a612 |
# ./run-tests.sh
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
Test files are executables files with the pattern <<name_N>>, where N is the
|
|
Packit |
c5a612 |
expected return code of the executable. Since they are located with `find',
|
|
Packit |
c5a612 |
test-files can be spread in any sub-directories.
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
You can turn on a verbose execution by calling:
|
|
Packit |
c5a612 |
# ./run-tests.sh -v
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
And generate missing dump files with:
|
|
Packit |
c5a612 |
# ./run-tests.sh -g <TESTFILE>
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
Before each call to the test-files, `nft flush ruleset' will be called.
|
|
Packit |
c5a612 |
Also, test-files will receive the environment variable $NFT which contains the
|
|
Packit |
c5a612 |
path to the nftables binary being tested.
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
You can pass an arbitrary $NFT value as well:
|
|
Packit |
c5a612 |
# NFT=/usr/local/sbin/nft ./run-tests.sh
|
|
Packit |
c5a612 |
|
|
Packit |
c5a612 |
By default the tests are run with the nft binary at '../../src/nft'
|