tests/tcg/aarch64: Use raw strings for regexes in test-mte.py
authorGustavo Romero <gustavo.romero@linaro.org>
Wed, 23 Oct 2024 11:34:02 +0000 (12:34 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Thu, 24 Oct 2024 08:56:42 +0000 (09:56 +0100)
Use Python's raw string notation instead of string literals for regex so
it's not necessary to double backslashes when regex special forms are
used. Raw notation is preferred for regex and easier to read.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20241015140806.385449-1-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20241023113406.1284676-15-alex.bennee@linaro.org>

tests/tcg/aarch64/gdbstub/test-mte.py

index a4cae6caa0a21aec50fa1bc71026c62ca1231705..9ad98e7a54c845e580a1e1ee35c0399526841ed6 100644 (file)
@@ -23,8 +23,8 @@ from sys import argv
 from test_gdbstub import arg_parser, main, report
 
 
-PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \\(0x[0-9a-f]+\\)."
-PATTERN_1 = ".*(0x[0-9a-f]+)"
+PATTERN_0 = r"Memory tags for address 0x[0-9a-f]+ match \(0x[0-9a-f]+\)."
+PATTERN_1 = r".*(0x[0-9a-f]+)"
 
 
 def run_test():