OSDN Git Service

tests/acceptance/virtiofs_submounts: required space between IP and port
authorCleber Rosa <crosa@redhat.com>
Wed, 3 Feb 2021 17:23:44 +0000 (12:23 -0500)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Mon, 8 Feb 2021 16:22:36 +0000 (17:22 +0100)
AFAICT, there should not be a situation where IP and port do not have
at least one whitespace character separating them.

This may be true for other '\s*' patterns in the same regex too.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210203172357.1422425-10-crosa@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
tests/acceptance/virtiofs_submounts.py

index 8294175..28b2920 100644 (file)
@@ -83,7 +83,7 @@ class VirtiofsSubmountsTest(BootLinux):
                               command_line='info usernet')
         for line in res.split('\r\n'):
             match = \
-                re.search(r'TCP.HOST_FORWARD.*127\.0\.0\.1\s*(\d+)\s+10\.',
+                re.search(r'TCP.HOST_FORWARD.*127\.0\.0\.1\s+(\d+)\s+10\.',
                           line)
             if match is not None:
                 port = int(match[1])