summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáté Eckl <ecklm94@gmail.com>2018-05-17 09:37:01 +0200
committerFlorian Westphal <fw@strlen.de>2018-05-17 15:35:59 +0200
commit75d0c49eb71518b41b86019a2dc9d5a251c060e6 (patch)
tree4d25bf10f6885cedf4faa8354ee59fd8b6a04c2a
parent77c067f9361413bfa9d703f09a68e6f510743e7d (diff)
tests: py: Added paylad file description to README
Signed-off-by: Máté Eckl <ecklm94@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r--tests/py/README29
1 files changed, 26 insertions, 3 deletions
diff --git a/tests/py/README b/tests/py/README
index 0e12dfa8..ed5dc58b 100644
--- a/tests/py/README
+++ b/tests/py/README
@@ -104,7 +104,30 @@ Line 8 adds two elements into the 'set1' set: "192.168.3.8" and
Line 9 uses the "#" symbol that means that this line is commented out.
-D) The test folders
+D) What is a payload file?
+
+A payload file contains info about the netlink message exchanged to achieve the
+transaction.
+
+The output can be generated in two ways. Let's see an example via socket
+matching.
+
+ # generate an empty payload file
+ $ touch inet/socket.t.payload
+
+ $ ./nft-test.py inet/socket.t # this will generate inet/socket.t.payload.got
+
+ $ mv inet/socket.t.payload.got inet/socket.t.payload
+
+The other way is using nft --debug=netlink. This has a drawback over the former
+option, as rules has to be run one by one and also a comment has to be added
+before every rule in the payload file.
+
+ $ nft --debug=netlink add rule ip sockip4 sockchain socket exists
+ ip sockip4 sockchain
+ [ match name socket rev 3 ]
+
+E) The test folders
The test files are divided in several directories: ip, ip6, inet, arp,
bridge and any.
@@ -127,7 +150,7 @@ bridge and any.
* "any" folder: Here are the test files are executed in ip, ip6, inet,
arp and bridge tables.
-E) Meaning of messages:
+F) Meaning of messages:
* A warning message means the rule input and output of nft mismatches.
* An error message means the nft-tool shows an error when we add it or
@@ -135,7 +158,7 @@ E) Meaning of messages:
* An info message means something that is not necessarily related to any test
case and does not indicate faulty behaviour.
-F) Acknowledgements
+G) Acknowledgements
Thanks to the Outreach Program for Women (OPW) for sponsoring this test
infrastructure and my mentor Pablo Neira.