@@ -0,0 +1,3015 @@
+#!/usr/bin/env python%0A%0Aimport unittest%0A%0Afrom framework import VppTestCase, VppTestRunner, running_extended_tests%0Afrom vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath%0A%0A%0Aclass TestQUIC(VppTestCase):%0A    %22%22%22 QUIC Test Case %22%22%22%0A%0A    @classmethod%0A    def setUpClass(cls):%0A        super(TestQUIC, cls).setUpClass()%0A%0A    @classmethod%0A    def tearDownClass(cls):%0A        super(TestQUIC, cls).tearDownClass()%0A%0A    def setUp(self):%0A        super(TestQUIC, self).setUp()%0A        self.vapi.session_enable_disable(is_enabled=1)%0A        self.create_loopback_interfaces(2)%0A%0A        table_id = 1%0A%0A        for i in self.lo_interfaces:%0A            i.admin_up()%0A%0A            if table_id != 0:%0A                tbl = VppIpTable(self, table_id)%0A                tbl.add_vpp_config()%0A%0A            i.set_table_ip4(table_id)%0A            i.config_ip4()%0A            table_id += 1%0A%0A        # Configure namespaces%0A        self.vapi.app_namespace_add_del(namespace_id=b%221%22,%0A                                        sw_if_index=self.loop0.sw_if_index)%0A        self.vapi.app_namespace_add_del(namespace_id=b%222%22,%0A                                        sw_if_index=self.loop1.sw_if_index)%0A%0A    def tearDown(self):%0A        for i in self.lo_interfaces:%0A            i.unconfig_ip4()%0A            i.set_table_ip4(0)%0A            i.admin_down()%0A        self.vapi.session_enable_disable(is_enabled=0)%0A        super(TestQUIC, self).tearDown()%0A%0A    @unittest.skipUnless(running_extended_tests, %22part of extended tests%22)%0A    def test_quic_transfer(self):%0A        %22%22%22 QUIC echo client/server transfer %22%22%22%0A%0A        # Add inter-table routes%0A        ip_t01 = VppIpRoute(self, self.loop1.local_ip4, 32,%0A                            %5BVppRoutePath(%220.0.0.0%22,%0A                                          0xffffffff,%0A                                          nh_table_id=2)%5D, table_id=1)%0A        ip_t10 = VppIpRoute(self, self.loop0.local_ip4, 32,%0A                            %5BVppRoutePath(%220.0.0.0%22,%0A                                          0xffffffff,%0A                                          nh_table_id=1)%5D, table_id=2)%0A        ip_t01.add_vpp_config()%0A        ip_t10.add_vpp_config()%0A        self.logger.debug(self.vapi.cli(%22show ip fib%22))%0A%0A        # Start builtin server and client%0A        uri = %22quic://%25s/1234%22 %25 self.loop0.local_ip4%0A        error = self.vapi.cli(%22test echo server appns 1 fifo-size 4 uri %25s%22 %25%0A                              uri)%0A        if error:%0A            self.logger.critical(error)%0A            self.assertNotIn(%22failed%22, error)%0A        error = self.vapi.cli(%22test echo client bytes 1024 appns 2 %22 +%0A                              %22fifo-size 4 test-bytes no-output %22 +%0A                              %22uri %25s%22 %25 uri)%0A        self.logger.critical(error)%0A        if error:%0A            self.logger.critical(error)%0A            self.assertNotIn(%22failed%22, error)%0A%0A        # Delete inter-table routes%0A        ip_t01.remove_vpp_config()%0A        ip_t10.remove_vpp_config()%0A%0Aif __name__ == '__main__':%0A    unittest.main(testRunner=VppTestRunner)%0A

make test: Initial QUIC test