Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/tests/unit/ofproto/test_oxm.py | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/ryu/tests/unit/ofproto/test_oxm.py
b/ryu/tests/unit/ofproto/test_oxm.py
index a2047f8..ffb762f 100644
--- a/ryu/tests/unit/ofproto/test_oxm.py
+++ b/ryu/tests/unit/ofproto/test_oxm.py
@@ -94,6 +94,44 @@ class Test_OXM(unittest.TestCase):
)
self._test(user, on_wire, 8)
+ def test_exp_nomask_2(self):
+ user = ('tcp_flags', 0x876)
+ on_wire = (
+ b'\xff\xff\x54\x06'
+ b'\x4f\x4e\x46\x00' # ONF
+ b'\x08\x76'
+ )
+ self._test(user, on_wire, 8)
+
+ def test_exp_mask_2(self):
+ user = ('tcp_flags', (0x876, 0x7ff))
+ on_wire = (
+ b'\xff\xff\x55\x08'
+ b'\x4f\x4e\x46\x00' # ONF
+ b'\x08\x76'
+ b'\x07\xff'
+ )
+ self._test(user, on_wire, 8)
+
+ def test_exp_nomask_3(self):
+ user = ('actset_output', 0x98765432)
+ on_wire = (
+ b'\xff\xff\x56\x08'
+ b'\x4f\x4e\x46\x00' # ONF
+ b'\x98\x76\x54\x32'
+ )
+ self._test(user, on_wire, 8)
+
+ def test_exp_mask_3(self):
+ user = ('actset_output', (0x98765432, 0xfffffffe))
+ on_wire = (
+ b'\xff\xff\x57\x0c'
+ b'\x4f\x4e\x46\x00' # ONF
+ b'\x98\x76\x54\x32'
+ b'\xff\xff\xff\xfe'
+ )
+ self._test(user, on_wire, 8)
+
def test_nxm_1_nomask(self):
user = ('tun_ipv4_src', '192.0.2.1')
on_wire = (
--
2.1.0
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel