FIX: Memif tests failing 71/11871/6
authorPeter Mikus <pmikus@cisco.com>
Wed, 18 Apr 2018 09:11:19 +0000 (11:11 +0200)
committerPeter Mikus <pmikus@cisco.com>
Thu, 19 Apr 2018 06:11:29 +0000 (06:11 +0000)
- CSIT-1049

Change-Id: I073c1e6d8cdda835fbb955cbf79e982bc2cc6228
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/libraries/python/ContainerUtils.py
resources/libraries/python/Memif.py
resources/libraries/robot/performance/performance_configuration.robot
resources/templates/vat/show_memif.vat [new file with mode: 0644]

index da9e93a..3bf3516 100644 (file)
@@ -305,6 +305,7 @@ class ContainerEngine(object):
     def restart_vpp(self):
         """Restart VPP service inside a container."""
         self.execute('supervisorctl restart vpp')
     def restart_vpp(self):
         """Restart VPP service inside a container."""
         self.execute('supervisorctl restart vpp')
+        self.execute('cat /tmp/supervisord.log')
 
     def create_vpp_startup_config(self,
                                   config_filename='/etc/vpp/startup.conf'):
 
     def create_vpp_startup_config(self,
                                   config_filename='/etc/vpp/startup.conf'):
@@ -627,6 +628,8 @@ class Docker(ContainerEngine):
 
         cpuset_mems = '--cpuset-mems={0}'.format(self.container.cpuset_mems)\
             if self.container.cpuset_mems is not None else ''
 
         cpuset_mems = '--cpuset-mems={0}'.format(self.container.cpuset_mems)\
             if self.container.cpuset_mems is not None else ''
+        # Temporary workaround - disabling due to bug in memif
+        cpuset_mems = ''
 
         env = '{0}'.format(
             ' '.join('--env %s' % env for env in self.container.env))\
 
         env = '{0}'.format(
             ' '.join('--env %s' % env for env in self.container.env))\
index e1f3d30..4a31864 100644 (file)
@@ -72,6 +72,16 @@ class Memif(object):
                 raise ValueError('Create Memif interface failed on node '
                                  '{}'.format(node['host']))
 
                 raise ValueError('Create Memif interface failed on node '
                                  '{}'.format(node['host']))
 
+    @staticmethod
+    def dump_memif(node):
+        """Dump Memif data for the given node.
+
+        :param node: Given node to show Memif data on.
+        :type node: dict
+        """
+        vat = VatExecutor()
+        vat.execute_script("memif_dump.vat", node, json_out=False)
+
     @staticmethod
     def show_memif(node):
         """Show Memif data for the given node.
     @staticmethod
     def show_memif(node):
         """Show Memif data for the given node.
@@ -80,7 +90,7 @@ class Memif(object):
         :type node: dict
         """
         vat = VatExecutor()
         :type node: dict
         """
         vat = VatExecutor()
-        vat.execute_script("memif_dump.vat", node, json_out=False)
+        vat.execute_script("show_memif.vat", node, json_out=False)
 
     @staticmethod
     def clear_memif_socks(node, *socks):
 
     @staticmethod
     def clear_memif_socks(node, *socks):
index 47d6109..35999d5 100644 (file)
 | | | ... | ${dut1} | ${dut1-memif-${number}-if2} | ${dut1_if2}
 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
 | | | ... | ${dut2} | ${dut2-memif-${number}-if2} | ${dut2_if2}
 | | | ... | ${dut1} | ${dut1-memif-${number}-if2} | ${dut1_if2}
 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
 | | | ... | ${dut2} | ${dut2-memif-${number}-if2} | ${dut2_if2}
+| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | :FOR | ${dut} | IN | @{duts}
+| | | Show Memif | ${nodes['${dut}']}
 
 | Initialize L2 Bridge Domain for '${nr}' memif pairs in 3-node circular topology
 | | [Documentation]
 
 | Initialize L2 Bridge Domain for '${nr}' memif pairs in 3-node circular topology
 | | [Documentation]
 | | | ... | ${dut2-memif-${number}-if1} | ${number}
 | | | Add interface to bridge domain | ${dut2}
 | | | ... | ${dut2-memif-${number}-if2} | ${bd_id2}
 | | | ... | ${dut2-memif-${number}-if1} | ${number}
 | | | Add interface to bridge domain | ${dut2}
 | | | ... | ${dut2-memif-${number}-if2} | ${bd_id2}
-
+| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | :FOR | ${dut} | IN | @{duts}
+| | | Show Memif | ${nodes['${dut}']}
diff --git a/resources/templates/vat/show_memif.vat b/resources/templates/vat/show_memif.vat
new file mode 100644 (file)
index 0000000..9c64260
--- /dev/null
@@ -0,0 +1 @@
+exec show memif\r