From 6749a8dcf7607b6252e0d273d86bc9a246ca0192 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 4 Mar 2025 18:45:34 +0100 Subject: [PATCH] Briefly explain BRE Signed-off-by: Gilles Peskine --- scripts/mbedtls_framework/tls_test_case.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/mbedtls_framework/tls_test_case.py b/scripts/mbedtls_framework/tls_test_case.py index 214a7ed46..47e356445 100644 --- a/scripts/mbedtls_framework/tls_test_case.py +++ b/scripts/mbedtls_framework/tls_test_case.py @@ -29,6 +29,16 @@ class TestCase: self.server = '$P_SRV' # Expected client exit code. self.exit_code = 0 + + # Note that all patterns matched in the logs are in BRE + # (Basic Regular Expression) syntax, more precisely in the BRE + # dialect that is the default for GNU grep. The main difference + # with Python regular expressions is that the operators for + # grouping `\(...\)`, alternation `x\|y`, option `x\?`, + # one-or-more `x\+` and repetition ranges `x\{M,N\}` must be + # preceded by a backslash. The characters `()|?+{}` stand for + # themselves. + # BRE for text that must be present in the client log (run_test -c). self.wanted_client_patterns = [] #type: List[str] # BRE for text that must be present in the server log (run_test -s).