UnitTest of the following cases had not been executed successfully.
{'dl_src/dst': "aa:bb:cc:11:22:33/*"}
{'eth_src/dst': "aa:bb:cc:11:22:33/*"}
{'nw_src/dst': "192.168.0.1/*", 'eth_type': 0x0800}
{'ipv4_src/dst': "192.168.0.1/*", 'eth_type': 0x0800}
{'arp_spa/tpa': "192.168.0.22/*", 'eth_type': 0x0806}
{'arp_sha/tha': "aa:bb:cc:11:22:33/*", 'eth_type': 0x0806}
{'ipv6_src/dst': '2001::aaaa:bbbb:cccc:1111/*', 'eth_type': 0x86dd}
This patch fixes this problem.
Signed-off-by: Minoru TAKAHASHI <[email protected]>
---
ryu/tests/unit/lib/test_ofctl.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ryu/tests/unit/lib/test_ofctl.py b/ryu/tests/unit/lib/test_ofctl.py
index cbdc3e1..e005efc 100644
--- a/ryu/tests/unit/lib/test_ofctl.py
+++ b/ryu/tests/unit/lib/test_ofctl.py
@@ -225,6 +225,8 @@ class Test_ofctl(unittest.TestCase):
elif key in ['nw_src', 'nw_dst', 'ipv4_src', 'ipv4_dst',
'arp_spa', 'arp_tpa']:
ipv4, mask = _to_match_ip(value)
+ if mask == (1 << 32) - 1:
+ mask = None
eq_(ipv4, field.value)
eq_(mask, field.mask)
return
@@ -573,7 +575,8 @@ def _add_tests_actions(cls):
def _add_tests_match(cls):
for attr in cls.attr_list:
for key, value in attr.items():
- method_name = 'test_' + str(cls.ver) + '_' + key + '_match'
+ method_name = 'test_' + \
+ str(cls.ver) + '_' + key + '_' + str(value) + '_match'
def _run(self, name, attr, cls):
print ('processing %s ...' % name)
--
1.9.1
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel