summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/nft-expr_objref-test.c2
-rw-r--r--tests/nft-rule-test.c8
-rw-r--r--tests/nft-table-test.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/tests/nft-expr_objref-test.c b/tests/nft-expr_objref-test.c
index 08e27ce..9e698df 100644
--- a/tests/nft-expr_objref-test.c
+++ b/tests/nft-expr_objref-test.c
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
b = nftnl_rule_alloc();
if (a == NULL || b == NULL)
print_err("OOM");
- ex = nftnl_expr_alloc("lookup");
+ ex = nftnl_expr_alloc("objref");
if (ex == NULL)
print_err("OOM");
diff --git a/tests/nft-rule-test.c b/tests/nft-rule-test.c
index 3652bf6..3a92223 100644
--- a/tests/nft-rule-test.c
+++ b/tests/nft-rule-test.c
@@ -48,6 +48,12 @@ static void cmp_nftnl_rule(struct nftnl_rule *a, struct nftnl_rule *b)
if (nftnl_rule_get_u32(a, NFTNL_RULE_COMPAT_FLAGS) !=
nftnl_rule_get_u32(b, NFTNL_RULE_COMPAT_FLAGS))
print_err("Rule compat_flags mismatches");
+ if (nftnl_rule_get_u32(a, NFTNL_RULE_ID) !=
+ nftnl_rule_get_u32(b, NFTNL_RULE_ID))
+ print_err("Rule id mismatches");
+ if (nftnl_rule_get_u32(a, NFTNL_RULE_POSITION_ID) !=
+ nftnl_rule_get_u32(b, NFTNL_RULE_POSITION_ID))
+ print_err("Rule position_id mismatches");
if (nftnl_rule_get_u64(a, NFTNL_RULE_POSITION) !=
nftnl_rule_get_u64(b, NFTNL_RULE_POSITION))
print_err("Rule compat_position mismatches");
@@ -84,6 +90,8 @@ int main(int argc, char *argv[])
nftnl_rule_set_u64(a, NFTNL_RULE_HANDLE, 0x1234567812345678);
nftnl_rule_set_u32(a, NFTNL_RULE_COMPAT_PROTO, 0x12345678);
nftnl_rule_set_u32(a, NFTNL_RULE_COMPAT_FLAGS, 0x12345678);
+ nftnl_rule_set_u32(a, NFTNL_RULE_ID, 0x12345678);
+ nftnl_rule_set_u32(a, NFTNL_RULE_POSITION_ID, 0x12345678);
nftnl_rule_set_u64(a, NFTNL_RULE_POSITION, 0x1234567812345678);
nftnl_rule_set_data(a, NFTNL_RULE_USERDATA,
nftnl_udata_buf_data(udata),
diff --git a/tests/nft-table-test.c b/tests/nft-table-test.c
index 1b2f280..53cf3d1 100644
--- a/tests/nft-table-test.c
+++ b/tests/nft-table-test.c
@@ -34,7 +34,7 @@ static void cmp_nftnl_table(struct nftnl_table *a, struct nftnl_table *b)
print_err("table flags mismatches");
if (nftnl_table_get_u32(a, NFTNL_TABLE_FAMILY) !=
nftnl_table_get_u32(b, NFTNL_TABLE_FAMILY))
- print_err("tabke family mismatches");
+ print_err("table family mismatches");
}
int main(int argc, char *argv[])