2.64. test_punt module

class test_punt.TestExceptionPuntSocket(methodName='runTest')

Bases: test_punt.TestPuntSocket

Punt Socket for Exceptions

setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_registration()

Punt socket registration/deregistration

test_traffic()

Punt socket traffic

verify_esp_pkts(rxs, n_sent, spi, has_udp)
class test_punt.TestIP4PuntSocket(methodName='runTest')

Bases: test_punt.TestPuntSocket

Punt Socket for IPv4 UDP

setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_punt_socket_dump()

Punt socket registration/deregistration

test_punt_socket_traffic_multi_ports_multi_sockets()

Punt socket traffic multi ports and multi sockets

test_punt_socket_traffic_multi_ports_single_socket()

Punt socket traffic multi ports and single socket

test_punt_socket_traffic_single_port_single_socket()

Punt socket traffic single port single socket

class test_punt.TestIP6PuntSocket(methodName='runTest')

Bases: test_punt.TestPuntSocket

Punt Socket for IPv6 UDP

setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_punt_socket_dump()

Punt socket registration

test_punt_socket_traffic_multi_ports_multi_sockets()

Punt socket traffic multi ports and multi sockets

test_punt_socket_traffic_multi_ports_single_socket()

Punt socket traffic multi ports and single socket

test_punt_socket_traffic_single_port_single_socket()

Punt socket traffic single port single socket

class test_punt.TestIpProtoPuntSocket(methodName='runTest')

Bases: test_punt.TestPuntSocket

Punt Socket for IP packets

setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_registration()

Punt socket registration/deregistration

test_traffic()

Punt socket traffic

verify_ospf_pkts(rxs, n_sent)
class test_punt.TestPunt(methodName='runTest')

Bases: framework.VppTestCase

Exception Punt Test Case

setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_punt()

Exception Path testing

class test_punt.TestPuntSocket(methodName='runTest')

Bases: framework.VppTestCase

Punt Socket

nr_packets = 2
ports = [1111, 2222, 3333, 4444]
setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

classmethod setUpConstants()

Set-up the test case class based on environment variables

sock_servers = []
socket_client_close()
socket_client_create(sock_name, id=None)
tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

verify_exception(pr, vpr)
verify_ip_proto(pr, vpr)
verify_port(pr, vpr)
verify_udp_pkts(rxs, n_rx, port)
test_punt.mk_vpp_cfg4()
test_punt.mk_vpp_cfg6()
class test_punt.serverSocketThread(threadID, sockName)

Bases: threading.Thread

Socket server thread

close()
run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

rx_packets()
test_punt.set_port(pr, port)
test_punt.set_reason(pr, reason)