2016-03-01 11:28:55 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
|
|
|
|
# Copyright (C) 2016 Takuo Yonezawa <Yonezawa-T2@mail.dnp.co.jp>
|
|
|
|
#
|
|
|
|
# This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
# General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
# directory for more details.
|
|
|
|
|
|
|
|
import sys
|
2018-08-10 14:23:13 +02:00
|
|
|
from testrunner import run
|
2016-03-01 11:28:55 +01:00
|
|
|
|
2017-11-18 20:15:38 +01:00
|
|
|
|
2016-03-01 11:28:55 +01:00
|
|
|
def testfunc(child):
|
|
|
|
index = child.expect_exact([
|
2017-02-06 08:27:51 +01:00
|
|
|
"ipv6: Received (src = fd01::1, dst = fd01::2, next header = 0, length = 42)",
|
2016-03-01 11:28:55 +01:00
|
|
|
"pkt->users: 0"
|
|
|
|
])
|
|
|
|
|
|
|
|
if index == 1:
|
|
|
|
# debug is disabled
|
2016-04-22 10:09:13 +02:00
|
|
|
child.expect_exact("pkt->users: 0")
|
2016-03-01 11:28:55 +01:00
|
|
|
return
|
|
|
|
|
|
|
|
child.expect_exact("ipv6: handle extension header (nh = 0)")
|
2017-02-06 08:27:51 +01:00
|
|
|
child.expect_exact("ipv6: Received (src = fd01::1, dst = fd01::3, next header = 0, length = 42)")
|
2016-03-01 11:28:55 +01:00
|
|
|
child.expect_exact("ipv6: handle extension header (nh = 0)")
|
2017-02-06 08:27:51 +01:00
|
|
|
child.expect_exact("ipv6: Received (src = fd01::1, dst = fd01::2, next header = 0, length = 42)")
|
2016-03-01 11:28:55 +01:00
|
|
|
child.expect_exact("ipv6: handle extension header (nh = 0)")
|
2016-04-22 10:09:13 +02:00
|
|
|
child.expect_exact("ipv6: forward nh = 17 to other threads")
|
|
|
|
child.expect_exact("pkt->users: 0")
|
|
|
|
child.expect_exact("ipv6: handle extension header (nh = 0)")
|
2017-02-06 08:27:51 +01:00
|
|
|
child.expect_exact("ipv6: Received (src = fd01::1, dst = fd01::3, next header = 0, length = 42)")
|
2016-04-22 10:09:13 +02:00
|
|
|
child.expect_exact("ipv6: handle extension header (nh = 0)")
|
2017-02-06 08:27:51 +01:00
|
|
|
child.expect_exact("ipv6: Received (src = fd01::1, dst = fd01::2, next header = 0, length = 42)")
|
2016-04-22 10:09:13 +02:00
|
|
|
child.expect_exact("ipv6: handle extension header (nh = 0)")
|
2016-03-01 11:28:55 +01:00
|
|
|
child.expect_exact("ipv6: forward nh = 17 to other threads")
|
|
|
|
child.expect_exact("pkt->users: 0")
|
|
|
|
|
2017-12-12 15:43:27 +01:00
|
|
|
|
2016-03-01 11:28:55 +01:00
|
|
|
if __name__ == "__main__":
|
2017-12-12 22:40:03 +01:00
|
|
|
sys.exit(run(testfunc))
|