quic: add extended vcl test 57/32357/5
authorFlorin Coras <fcoras@cisco.com>
Tue, 18 May 2021 07:35:50 +0000 (00:35 -0700)
committerDamjan Marion <dmarion@me.com>
Fri, 21 May 2021 06:57:03 +0000 (06:57 +0000)
Only works with release binaries.

Type: test

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iede88713e1dbc4d1c6ae62651ff9150f88953f4d

src/plugins/quic/quic.c
test/test_vcl.py

index c4ef459..63ff984 100644 (file)
@@ -1318,7 +1318,7 @@ quic_connect_connection (session_endpoint_cfg_t * sep)
     return SESSION_E_NOEXTCFG;
 
   /* Use pool on thread 1 if we have workers because of UDP */
-  thread_index = vlib_num_workers () ? 1 : 0;
+  thread_index = transport_cl_thread ();
   ccfg = &sep->ext_cfg->crypto;
 
   clib_memset (cargs, 0, sizeof (*cargs));
index 7977c1d..63dd313 100644 (file)
@@ -490,6 +490,48 @@ class VCLThruHostStackDTLS(VCLTestCase):
         self.logger.debug(self.vapi.cli("show app mq"))
 
 
+class VCLThruHostStackQUIC(VCLTestCase):
+    """ VCL Thru Host Stack QUIC """
+
+    @classmethod
+    def setUpClass(cls):
+        cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
+        super(VCLThruHostStackQUIC, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(VCLThruHostStackQUIC, cls).tearDownClass()
+
+    def setUp(self):
+        super(VCLThruHostStackQUIC, self).setUp()
+
+        self.thru_host_stack_setup()
+        self.client_uni_dir_quic_timeout = 20
+        self.server_quic_args = ["-p", "quic", self.server_port]
+        self.client_uni_dir_quic_test_args = ["-N", "1000", "-U", "-X",
+                                              "-p", "quic",
+                                              self.loop0.local_ip4,
+                                              self.server_port]
+
+    @unittest.skipUnless(running_extended_tests, "part of extended tests")
+    def test_vcl_thru_host_stack_quic_uni_dir(self):
+        """ run VCL thru host stack uni-directional QUIC test """
+
+        self.timeout = self.client_uni_dir_quic_timeout
+        self.thru_host_stack_test("vcl_test_server", self.server_quic_args,
+                                  "vcl_test_client",
+                                  self.client_uni_dir_quic_test_args)
+
+    def tearDown(self):
+        self.thru_host_stack_tear_down()
+        super(VCLThruHostStackQUIC, self).tearDown()
+
+    def show_commands_at_teardown(self):
+        self.logger.debug(self.vapi.cli("show app server"))
+        self.logger.debug(self.vapi.cli("show session verbose 2"))
+        self.logger.debug(self.vapi.cli("show app mq"))
+
+
 class VCLThruHostStackBidirNsock(VCLTestCase):
     """ VCL Thru Host Stack Bidir Nsock """