Conversation
The run_tests() function handles command execution, progress tracking, result parsing, and output display all in one place. Extract run_ut() for running the command with progress tracking, and show_test_output() for parsing and displaying results. This makes run_tests() a short orchestrator and allows the pieces to be reused. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
The do_test() function has many early returns and inline blocks for listing suites, listing tests, and reporting unmatched specs. Extract list_suites(), list_tests(), and report_unmatched() as separate functions, and consolidate the two validation checks into one error path. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
The run_tests() function has many early returns for different error paths, making the flow hard to follow. Extract check_signal() for signal detection and restructure the result handling to use a single return at the end. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Add gdb-multiarch to the default packages so that debugging with -G works inside containers without manual installation. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Buildman treats warnings as build failures by default, which causes builds to fail on harmless warnings in U-Boot source files. Add the -W flag to all buildman invocations so that warnings are still shown but do not cause a non-zero exit code. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Pass -L to the ut command so that each test checks for memory leaks using mallinfo() before and after the test. Co-developed-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When 'um t acpi' is used and 'acpi' is not a recognised suite name,
there is no fallback to search for tests matching that name across
all suites.
Try the spec as a pattern across all suites, so that 'um t acpi'
finds and runs all tests with 'acpi' in their name regardless of
which suite they belong to. The pattern uses the full U-Boot test
function name format ({suite}_test_{name}*) since the ut command
does not support leading wildcards.
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
When --leak-check is enabled, U-Boot outputs 'Leak: N allocs' lines for tests that leak memory. These are not currently tracked. Parse leak lines in both the live progress display and the result summary, showing the count alongside passed/failed/skipped when any leaks are detected. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
The leak detail lines from U-Boot contain allocation sizes in hex. Parse these to show the total leaked bytes alongside the leak count, e.g. '12 leaked (0x3130 bytes)' in both the live progress display and the final summary. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
When leak checking is enabled, it is useful to see which tests leak the most memory. Track per-test leak bytes during result parsing and add --show-leaks N to display the top N leaking tests after the summary. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
The py subcommand passes --leak-check to test.py but does not show the leak summary afterwards. Parse test-log.html after pytest finishes to extract leak data and show the same summary and top-leaks display as the t subcommand. Extract add_leak_opts() and show_leak_top() as shared helpers to avoid duplication between the two subcommands. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
When a test crashes (e.g. SIGSEGV), the sandbox process may leave the terminal in a bad state. The tset call to fix this only runs when no test results are parsed, but a crash can happen after some tests have already produced results. Move the signal check and terminal reset before the result display so it always runs when a signal is detected. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
and summary output