summaryrefslogtreecommitdiffstats
path: root/tests/expr/osf
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expr/osf')
-rw-r--r--tests/expr/osf/osf_bad_flags_err.t6
-rw-r--r--tests/expr/osf/osf_bad_ttl_err.t6
-rw-r--r--tests/expr/osf/osf_flags_ok.t6
-rw-r--r--tests/expr/osf/osf_no_dreg_err.t6
-rw-r--r--tests/expr/osf/osf_ok.t6
-rw-r--r--tests/expr/osf/osf_ttl_ok.t6
6 files changed, 36 insertions, 0 deletions
diff --git a/tests/expr/osf/osf_bad_flags_err.t b/tests/expr/osf/osf_bad_flags_err.t
new file mode 100644
index 0000000..5e5d303
--- /dev/null
+++ b/tests/expr/osf/osf_bad_flags_err.t
@@ -0,0 +1,6 @@
+add_table(NFPROTO_IPV4, "test", NULL, NULL, NULL);
+add_chain("test", "0x1", NULL, NULL, NULL);
+add_rule("test", "0x1", NULL, NULL, NULL);
+osf("NFT_REG_1", NULL, "0x2");
+cmp("NFT_REG_1", "0", "4c696e7578000000");
+commit();
diff --git a/tests/expr/osf/osf_bad_ttl_err.t b/tests/expr/osf/osf_bad_ttl_err.t
new file mode 100644
index 0000000..00f22c8
--- /dev/null
+++ b/tests/expr/osf/osf_bad_ttl_err.t
@@ -0,0 +1,6 @@
+add_table(NFPROTO_IPV4, "test", NULL, NULL, NULL);
+add_chain("test", "0x1", NULL, NULL, NULL);
+add_rule("test", "0x1", NULL, NULL, NULL);
+osf("NFT_REG_1", "3", NULL);
+cmp("NFT_REG_1", "0", "4c696e7578000000");
+commit();
diff --git a/tests/expr/osf/osf_flags_ok.t b/tests/expr/osf/osf_flags_ok.t
new file mode 100644
index 0000000..150dcc4
--- /dev/null
+++ b/tests/expr/osf/osf_flags_ok.t
@@ -0,0 +1,6 @@
+add_table(NFPROTO_IPV4, "test", NULL, NULL, NULL);
+add_chain("test", "0x1", NULL, NULL, NULL);
+add_rule("test", "0x1", NULL, NULL, NULL);
+osf("NFT_REG_1", NULL, "0x1");
+cmp("NFT_REG_1", "0", "4c696e7578000000");
+commit();
diff --git a/tests/expr/osf/osf_no_dreg_err.t b/tests/expr/osf/osf_no_dreg_err.t
new file mode 100644
index 0000000..c20f0d0
--- /dev/null
+++ b/tests/expr/osf/osf_no_dreg_err.t
@@ -0,0 +1,6 @@
+add_table(NFPROTO_IPV4, "test", NULL, NULL, NULL);
+add_chain("test", "0x1", NULL, NULL, NULL);
+add_rule("test", "0x1", NULL, NULL, NULL);
+osf(NULL, NULL, NULL);
+cmp("NFT_REG_1", "0", "4c696e7578000000");
+commit();
diff --git a/tests/expr/osf/osf_ok.t b/tests/expr/osf/osf_ok.t
new file mode 100644
index 0000000..9f8445b
--- /dev/null
+++ b/tests/expr/osf/osf_ok.t
@@ -0,0 +1,6 @@
+add_table(NFPROTO_IPV4, "test", NULL, NULL, NULL);
+add_chain("test", "0x1", NULL, NULL, NULL);
+add_rule("test", "0x1", NULL, NULL, NULL);
+osf("NFT_REG_1", NULL, NULL);
+cmp("NFT_REG_1", "0", "4c696e7578000000");
+commit();
diff --git a/tests/expr/osf/osf_ttl_ok.t b/tests/expr/osf/osf_ttl_ok.t
new file mode 100644
index 0000000..6af9a48
--- /dev/null
+++ b/tests/expr/osf/osf_ttl_ok.t
@@ -0,0 +1,6 @@
+add_table(NFPROTO_IPV4, "test", NULL, NULL, NULL);
+add_chain("test", "0x1", NULL, NULL, NULL);
+add_rule("test", "0x1", NULL, NULL, NULL);
+osf("NFT_REG_1", "0", NULL);
+cmp("NFT_REG_1", "0", "4c696e7578000000");
+commit();