From 5a52c6bd634a4a8128da18877d54a18a8b4beb2f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 2 Sep 2025 16:03:03 +0930 Subject: [PATCH] pyln-testing: catch special CI string so we can have non-BROKEN CI warnings. Signed-off-by: Rusty Russell --- common/status_levels.h | 3 +++ contrib/pyln-testing/pyln/testing/fixtures.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/status_levels.h b/common/status_levels.h index 79f7bc573..baa04ebb4 100644 --- a/common/status_levels.h +++ b/common/status_levels.h @@ -20,6 +20,9 @@ enum log_level { }; #define LOG_LEVEL_MAX LOG_BROKEN +/* Things that can happen in real life, but we don't expect under CI. */ +#define CI_UNEXPECTED "That's weird: " + const char *log_level_name(enum log_level level); bool log_level_parse(const char *levelstr, size_t len, enum log_level *level); diff --git a/contrib/pyln-testing/pyln/testing/fixtures.py b/contrib/pyln-testing/pyln/testing/fixtures.py index 7bc45a25a..694189bc8 100644 --- a/contrib/pyln-testing/pyln/testing/fixtures.py +++ b/contrib/pyln-testing/pyln/testing/fixtures.py @@ -612,7 +612,7 @@ def checkBadGossip(node): def checkBroken(node): node.daemon.logs_catchup() - broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l] + broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l or "That's weird: " in l] if node.broken_log: ex = re.compile(node.broken_log) broken_lines = [l for l in broken_lines if not ex.search(l)]