]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Fix regex complaints by python3
authorDonald Sharp <sharpd@nvidia.com>
Fri, 17 Jun 2022 19:40:14 +0000 (15:40 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 23 Jun 2022 17:58:03 +0000 (13:58 -0400)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py
tests/topotests/ospf6_ecmp_inter_area/test_ospf6_ecmp_inter_area.py
tests/topotests/route_scale/scale_test_common.py

index 9f4399d6d58821061781e2209ecd210384eb7cb9..77619e59bb984dc104764ef009e56c9442cf69ce 100644 (file)
@@ -169,7 +169,7 @@ def test_bgp_converge():
         for i in range(1, 2):
             for view in range(1, 4):
                 notConverged = tgen.net["r%s" % i].cmd(
-                    'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -vP " 11\s+(\d+)"'
+                    r'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -vP " 11\s+(\d+)"'
                     % view
                 )
                 if notConverged:
index ffdcd08f80ae22cfce41e42e2caa78cb3f642b8a..10d890effb30a636f44c5c862168774363187780 100755 (executable)
@@ -41,7 +41,7 @@ pytestmark = [pytest.mark.bgpd]
 
 
 def build_topo(tgen):
-    """
+    r"""
       CE1     CE3      CE5
     (eth0)  (eth0)   (eth0)
       :2      :2      :2
index 886b52c59c101665c9e742ebf15e7b3e57db0dbc..553f9361863afe23a4e17f2776eef1f0c0a89a63 100644 (file)
@@ -21,7 +21,7 @@
 # OF THIS SOFTWARE.
 #
 
-"""
+r"""
 test_ospf6_ecmp_inter_area.py: Test OSPFv3 ECMP inter-area nexthop update
 
 Check proper removal of ECMP nexthops after a path used by one nexthop
index 3557cb44130215cd38ac57cbb3aa2d71b781188e..856a2d0fa781528c1451b5398a5bc2973f897482 100644 (file)
@@ -158,7 +158,7 @@ def route_install_helper(iter):
 
     # Avoid top ecmp case for runs with < 4G memory
     output = tgen.net.cmd_raises("free")
-    m = re.search("Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", output)
+    m = re.search(r"Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", output)
     total_mem = int(m.group(2))
     if total_mem < 4000000 and iter == 5:
         logger.info(