summaryrefslogtreecommitdiffstats
path: root/tests/py/any/meta.t
diff options
context:
space:
mode:
authorManuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>2016-09-05 20:20:13 +0200
committerFlorian Westphal <fw@strlen.de>2016-09-06 13:09:57 +0200
commita8871ba6daa0ae70f6ea51e9fbbfaaad409bbab3 (patch)
tree31707c1ad2987a2426217fdb1ff869ea101431bd /tests/py/any/meta.t
parent3e5b0e406cf2b635200f9ee05ba8a158528fe622 (diff)
tests: py: any: Make tests more generic by using other interfaces
Some tests use hard coded interface names and interface indexes. This commit removes these cases by exchanging "eth0" with "dummy0" and "lo" (depending on the test) in all ifname tests and by using "lo" instead of "eth0" in all interface index tests (because we can assume "lo" ifindex is 1). Signed-off-by: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/any/meta.t')
-rw-r--r--tests/py/any/meta.t46
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/py/any/meta.t b/tests/py/any/meta.t
index ceeac485..852ef824 100644
--- a/tests/py/any/meta.t
+++ b/tests/py/any/meta.t
@@ -65,17 +65,17 @@ meta mark or 0x03 != 0x01;ok;mark | 0x00000003 != 0x00000001
meta mark xor 0x03 == 0x01;ok;mark 0x00000002
meta mark xor 0x03 != 0x01;ok;mark != 0x00000002
-meta iif "eth0" accept;ok;iif "eth0" accept
-meta iif "eth0" accept;ok;iif "eth0" accept
-meta iif != "eth0" accept;ok;iif != "eth0" accept
-meta iif != "eth0" accept;ok;iif != "eth0" accept
-
-meta iifname "eth0";ok;iifname "eth0"
-meta iifname != "eth0";ok;iifname != "eth0"
-meta iifname {"eth0", "lo"};ok
-- meta iifname != {"eth0", "lo"};ok
-meta iifname "eth*";ok;iifname "eth*"
-meta iifname "eth\*";ok;iifname "eth\*"
+meta iif "lo" accept;ok;iif "lo" accept
+meta iif "lo" accept;ok;iif "lo" accept
+meta iif != "lo" accept;ok;iif != "lo" accept
+meta iif != "lo" accept;ok;iif != "lo" accept
+
+meta iifname "dummy0";ok;iifname "dummy0"
+meta iifname != "dummy0";ok;iifname != "dummy0"
+meta iifname {"dummy0", "lo"};ok
+- meta iifname != {"dummy0", "lo"};ok
+meta iifname "dummy*";ok;iifname "dummy*"
+meta iifname "dummy\*";ok;iifname "dummy\*"
meta iiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
- meta iiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
@@ -86,15 +86,15 @@ meta iiftype ppp;ok;iiftype ppp
meta oif "lo" accept;ok;oif "lo" accept
meta oif != "lo" accept;ok;oif != "lo" accept
-meta oif {"eth0", "lo"} accept;ok
-- meta oif != {"eth0", "lo"} accept;ok
+meta oif {"lo"} accept;ok
+- meta oif != {"lo"} accept;ok
-meta oifname "eth0";ok;oifname "eth0"
-meta oifname != "eth0";ok;oifname != "eth0"
-meta oifname { "eth0", "lo"};ok
-- meta iifname != {"eth0", "lo"};ok
-meta oifname "eth*";ok;oifname "eth*"
-meta oifname "eth\*";ok;oifname "eth\*"
+meta oifname "dummy0";ok;oifname "dummy0"
+meta oifname != "dummy0";ok;oifname != "dummy0"
+meta oifname { "dummy0", "lo"};ok
+- meta iifname != {"dummy0", "lo"};ok
+meta oifname "dummy*";ok;oifname "dummy*"
+meta oifname "dummy\*";ok;oifname "dummy\*"
meta oiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
- meta oiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre};ok
@@ -146,7 +146,7 @@ meta mark set 0xfffe xor 0x16;ok;mark set 0x0000ffe8
meta iif "lo";ok;iif "lo"
meta oif "lo";ok;oif "lo"
-meta oifname "eth2" accept;ok;oifname "eth2" accept
+meta oifname "dummy2" accept;ok;oifname "dummy2" accept
meta skuid 3000;ok;skuid 3000
meta skgid 3000;ok;skgid 3000
# BUG: meta nftrace 1;ok
@@ -201,9 +201,9 @@ meta cgroup != 1048577-1048578;ok;cgroup != 1048577-1048578
meta cgroup {1048577-1048578};ok;cgroup { 1048577-1048578}
# meta cgroup != { 1048577-1048578};ok;cgroup != { 1048577-1048578}
-meta iif . meta oif { "lo" . "eth0" };ok
-meta iif . meta oif . meta mark { "lo" . "eth0" . 0x0000000a };ok
-meta iif . meta oif vmap { "lo" . "eth0" : drop };ok
+meta iif . meta oif { "lo" . "lo" };ok
+meta iif . meta oif . meta mark { "lo" . "lo" . 0x0000000a };ok
+meta iif . meta oif vmap { "lo" . "lo" : drop };ok
meta random eq 1;ok;meta random 1
meta random gt 1000000;ok;meta random > 1000000