diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2014-04-18 16:43:35 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2015-02-02 17:47:26 +0900 |
commit | ac57df5a25e37f9fe2c6ec62d4d6a25f8b39c7ce (patch) | |
tree | fd3d0fc0dc6b614bb78c8cbb07d161112047af6e | |
parent | 9e66bfb4888ca59a38aeb8a0952b03a022187b88 (diff) | |
download | extras-ac57df5a25e37f9fe2c6ec62d4d6a25f8b39c7ce.tar.gz |
Fix flowlabel test, now it's working in the kernel
Change-Id: Iad67073f303b611bba5d19b8d0ead768450118e7
-rwxr-xr-x | tests/net_test/net_test.py | 2 | ||||
-rwxr-xr-x | tests/net_test/ping6_test.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/net_test/net_test.py b/tests/net_test/net_test.py index 3686f3e1..7e8813c0 100755 --- a/tests/net_test/net_test.py +++ b/tests/net_test/net_test.py @@ -239,7 +239,7 @@ def MakeFlowLabelOption(addr, label): def SetFlowLabel(s, addr, label): opt = MakeFlowLabelOption(addr, label) s.setsockopt(SOL_IPV6, IPV6_FLOWLABEL_MGR, opt) - s.setsockopt(SOL_IPV6, IPV6_FLOWINFO_SEND, 1) + # Caller also needs to do s.setsockopt(SOL_IPV6, IPV6_FLOWINFO_SEND, 1). # Determine IPv6 configuration. diff --git a/tests/net_test/ping6_test.py b/tests/net_test/ping6_test.py index c9db434c..688404e3 100755 --- a/tests/net_test/ping6_test.py +++ b/tests/net_test/ping6_test.py @@ -329,6 +329,7 @@ class Ping6Test(net_test.NetworkTest): @unittest.skipUnless(net_test.HAVE_IPV6, "skipping: no IPv6") def testFlowLabel(self): s = net_test.IPv6PingSocket() + net_test.SetFlowLabel(s, net_test.IPV6_ADDR, 0xdead) s.sendto(net_test.IPV6_PING, (net_test.IPV6_ADDR, 93, 0xdead, 0)) self.assertValidPingResponse(s, net_test.IPV6_PING) # Checks flow label==0. @@ -338,7 +339,7 @@ class Ping6Test(net_test.NetworkTest): s.sendto(net_test.IPV6_PING, (net_test.IPV6_ADDR, 93, 0xdead, 0)) _, src = s.recvfrom(32768) _, _, flowlabel, _ = src - self.assertEqual(0, flowlabel & 0xfffff) + self.assertEqual(0xdead, flowlabel & 0xfffff) def testIPv4Error(self): s = net_test.IPv4PingSocket() |