summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
Diffstat (limited to 'iptables')
-rw-r--r--iptables/tests/shell/README17
-rwxr-xr-xiptables/tests/shell/run-tests.sh2
-rwxr-xr-xiptables/tests/shell/testcases/chain/0002newchain_0 (renamed from iptables/tests/shell/testcases/chain/0004newchain_0)0
-rwxr-xr-xiptables/tests/shell/testcases/chain/0003rename_1 (renamed from iptables/tests/shell/testcases/chain/0005rename_1)0
4 files changed, 18 insertions, 1 deletions
diff --git a/iptables/tests/shell/README b/iptables/tests/shell/README
new file mode 100644
index 00000000..08da4869
--- /dev/null
+++ b/iptables/tests/shell/README
@@ -0,0 +1,17 @@
+To run the test suite (as root):
+ $ cd iptables/tests/shell
+ # ./run-tests.sh
+
+Test files are executable files with the pattern <<name_N>> , where N is the
+expected return code of the executable. Since they are located with `find',
+test-files can be spreaded in any sub-directories.
+
+You can turn on a verbose execution by calling:
+ # ./run-tests.sh -v
+
+And to run test suite for pariticular test files:
+ # ./run-tests.sh <PATH_OF_TESTFILES>
+
+Also, test-files will receive the environment variable $XT_MULTI which contains
+the path to the old iptables (xtables-legacy-multi) or new iptables (xtables-nft-multi)
+binary being tested.
diff --git a/iptables/tests/shell/run-tests.sh b/iptables/tests/shell/run-tests.sh
index a984a457..a39aecb6 100755
--- a/iptables/tests/shell/run-tests.sh
+++ b/iptables/tests/shell/run-tests.sh
@@ -67,10 +67,10 @@ do_test() {
XT_MULTI=$xtables_multi unshare -n ${testfile}
else
XT_MULTI=$xtables_multi unshare -n ${testfile} > /dev/null 2>&1
+ echo -en "\033[1A\033[K" # clean the [EXECUTING] foobar line
fi
rc_got=$?
- echo -en "\033[1A\033[K" # clean the [EXECUTING] foobar line
if [ "$rc_got" == "$rc_spec" ] ; then
msg_info "[OK] $testfile"
diff --git a/iptables/tests/shell/testcases/chain/0004newchain_0 b/iptables/tests/shell/testcases/chain/0002newchain_0
index 53f8a3ac..53f8a3ac 100755
--- a/iptables/tests/shell/testcases/chain/0004newchain_0
+++ b/iptables/tests/shell/testcases/chain/0002newchain_0
diff --git a/iptables/tests/shell/testcases/chain/0005rename_1 b/iptables/tests/shell/testcases/chain/0003rename_1
index 975c8e19..975c8e19 100755
--- a/iptables/tests/shell/testcases/chain/0005rename_1
+++ b/iptables/tests/shell/testcases/chain/0003rename_1