From 73113a400fd62b1749e803ae29bfabb9e2c2c838 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 15 Jul 2026 10:20:21 -0500 Subject: [PATCH 1/7] Added functionality to integrationtest_drunc.py to store the drunc console output to a log file. --- src/integrationtest/integrationtest_drunc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/integrationtest/integrationtest_drunc.py b/src/integrationtest/integrationtest_drunc.py index 9813ff3..9d2d468 100755 --- a/src/integrationtest/integrationtest_drunc.py +++ b/src/integrationtest/integrationtest_drunc.py @@ -613,8 +613,8 @@ class RunResult: cwd=run_dir ) - # print out each line of captured output, as well as add it to the string that we - # pass back to the user, subject to the verbosity level that the user has requested + # print out each line of captured output, subject to the verbosity level that the + # user has requested, as well as add it to the string that we pass back to the user tmp_string = request.config.getoption("--dunerc-fullprint-watch-string") full_printout_watch_string = tmp_string.replace("_SPC_", " ") full_printout_activated = False @@ -673,6 +673,10 @@ class RunResult: rc_process.communicate() proc_returncode = rc_process.returncode + # store the full dunerc console output in a log file for reference and checking + with open(f"{run_dir}/log_{getpass.getuser()}_drunc_console_output.txt", "w", encoding="utf-8") as ff: + ff.write(full_output) + # construct a CompletedProcess instance to be passed back to the user. In this way, # user code does not need to change in response to the change in this code from # using subprocess.run() to subprocess.Popen(). From 4f55e7685bb00c5058d0889352a0cc720fe2403e Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 15 Jul 2026 10:22:16 -0500 Subject: [PATCH 2/7] Added a phrase that we always want to exclude from drunc log file checking to log_file_checks.py --- src/integrationtest/log_file_checks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/integrationtest/log_file_checks.py b/src/integrationtest/log_file_checks.py index 8f83c51..b2f55c0 100644 --- a/src/integrationtest/log_file_checks.py +++ b/src/integrationtest/log_file_checks.py @@ -111,6 +111,9 @@ def logs_are_error_free(log_file_names, show_all_problems=True, print_logfilenam ["RAN:", "LogLevel=error"] ) + # 15-Jul-2026, KAB: phrases that we always want to exclude + excluded_substring_map.setdefault("drunc", []).extend(["| In error |"]) + all_ok=True #print("") # Clear potential dot from pytest for log in log_file_names: From 7e8cab7cda1d6caf13dd171d81e03c4071121867 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 15 Jul 2026 15:21:42 -0500 Subject: [PATCH 3/7] Fixed a bug in log_file_checks.py - only the first excluded or required pattern that matched a given logfile name was being checked instead of all patterns that matched the logfile name. --- src/integrationtest/log_file_checks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/integrationtest/log_file_checks.py b/src/integrationtest/log_file_checks.py index b2f55c0..b4cdd04 100644 --- a/src/integrationtest/log_file_checks.py +++ b/src/integrationtest/log_file_checks.py @@ -27,6 +27,7 @@ def log_has_no_errors(log_file_name, print_logfilename_for_problems=True, exclud severity=match_logline_prefix.group(1) if severity in ("WARNING", "ERROR", "FATAL"): bad_line=True + #if not bad_line: else: # This line's not produced with our logging package, so let's just look for bad words if "WARN" in line or "Warn" in line or "warn" in line or \ "ERROR" in line or "Error" in line or "error" in line or \ @@ -112,7 +113,7 @@ def logs_are_error_free(log_file_names, show_all_problems=True, print_logfilenam ) # 15-Jul-2026, KAB: phrases that we always want to exclude - excluded_substring_map.setdefault("drunc", []).extend(["| In error |"]) + excluded_substring_map.setdefault("drunc", []).extend(["| In error |", "X11 forwarding request failed"]) all_ok=True #print("") # Clear potential dot from pytest @@ -124,13 +125,11 @@ def logs_are_error_free(log_file_names, show_all_problems=True, print_logfilenam match_obj = re.search(exclusion_key, log.name) if match_obj: exclusions += excluded_substring_map[exclusion_key] - break for required_key in required_substring_map.keys(): match_obj = re.search(required_key, log.name) if match_obj: requireds += required_substring_map[required_key] - break - + single_ok=log_has_no_errors(log, print_logfilename_for_problems, exclusions, requireds, print_required_message_report, verbosity_helper) From 4cc6708b8eb4668d2809eadda8dc73a87f209bc1 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 21 Jul 2026 13:46:42 -0500 Subject: [PATCH 4/7] added critical messages to ones that we'll print out from the drunc console. --- src/integrationtest/integrationtest_drunc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/integrationtest/integrationtest_drunc.py b/src/integrationtest/integrationtest_drunc.py index 9d2d468..5e7f79d 100755 --- a/src/integrationtest/integrationtest_drunc.py +++ b/src/integrationtest/integrationtest_drunc.py @@ -643,7 +643,9 @@ class RunResult: # check for errors and warnings for all verbosity levels if should_be_printed == False: - if ("error" in line.lower() and (not "In error" in line and not "Endpoint" in line)) or "warning" in line.lower(): + lc_line = line.lower() + if ("error" in lc_line and (not "In error" in line and not "Endpoint" in line)) \ + or "warning" in lc_line or "critical" in lc_line: should_be_printed = True # check for basic transition messages, if that level of verbosity is requested From f0e3ea4ef8055f7649f9fb08a7c604506505189e Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 21 Jul 2026 13:47:35 -0500 Subject: [PATCH 5/7] Updated the standard excluded phrases in log_file_checks.py to include X11 forwarding setup failed for all app. --- src/integrationtest/log_file_checks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/integrationtest/log_file_checks.py b/src/integrationtest/log_file_checks.py index b4cdd04..06b3ffd 100644 --- a/src/integrationtest/log_file_checks.py +++ b/src/integrationtest/log_file_checks.py @@ -112,8 +112,9 @@ def logs_are_error_free(log_file_names, show_all_problems=True, print_logfilenam ["RAN:", "LogLevel=error"] ) - # 15-Jul-2026, KAB: phrases that we always want to exclude - excluded_substring_map.setdefault("drunc", []).extend(["| In error |", "X11 forwarding request failed"]) + # 21-Jul-2026, KAB: phrases that we always want to exclude + excluded_substring_map.setdefault("drunc", []).extend(["Substate.*In error.*Endpoint"]) + excluded_substring_map.setdefault(r".*", []).extend(["X11 forwarding setup failed"]) all_ok=True #print("") # Clear potential dot from pytest From a7716ec9291e5dd9c33dbd775f13e77ca898d65c Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Sun, 26 Jul 2026 15:12:11 -0500 Subject: [PATCH 6/7] Filtered out ANSI escape characters in the text that we write to the drunc log file from integrationtest_drunc.py --- src/integrationtest/integrationtest_drunc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/integrationtest/integrationtest_drunc.py b/src/integrationtest/integrationtest_drunc.py index 5e7f79d..9da8e19 100644 --- a/src/integrationtest/integrationtest_drunc.py +++ b/src/integrationtest/integrationtest_drunc.py @@ -677,7 +677,8 @@ class RunResult: # store the full dunerc console output in a log file for reference and checking with open(f"{run_dir}/log_{getpass.getuser()}_drunc_console_output.txt", "w", encoding="utf-8") as ff: - ff.write(full_output) + no_ansi_output = re.sub(r"\x1b\[[0-9;]*m", "", full_output) + ff.write(no_ansi_output) # construct a CompletedProcess instance to be passed back to the user. In this way, # user code does not need to change in response to the change in this code from From e2e245000ca26ed151c1547358f3a4ecaa674a95 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Sun, 26 Jul 2026 15:13:03 -0500 Subject: [PATCH 7/7] Dropped the 'X11 forwarding' message from the excluded list in log_file_checks.py now that the underlying problem has been fixed. --- src/integrationtest/log_file_checks.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/integrationtest/log_file_checks.py b/src/integrationtest/log_file_checks.py index 06b3ffd..26e3a35 100644 --- a/src/integrationtest/log_file_checks.py +++ b/src/integrationtest/log_file_checks.py @@ -27,7 +27,6 @@ def log_has_no_errors(log_file_name, print_logfilename_for_problems=True, exclud severity=match_logline_prefix.group(1) if severity in ("WARNING", "ERROR", "FATAL"): bad_line=True - #if not bad_line: else: # This line's not produced with our logging package, so let's just look for bad words if "WARN" in line or "Warn" in line or "warn" in line or \ "ERROR" in line or "Error" in line or "error" in line or \ @@ -114,7 +113,6 @@ def logs_are_error_free(log_file_names, show_all_problems=True, print_logfilenam # 21-Jul-2026, KAB: phrases that we always want to exclude excluded_substring_map.setdefault("drunc", []).extend(["Substate.*In error.*Endpoint"]) - excluded_substring_map.setdefault(r".*", []).extend(["X11 forwarding setup failed"]) all_ok=True #print("") # Clear potential dot from pytest