2 minor findings · 2 suggestions
Findings
[minor] · Log-setting test sub-runs collide with the original GUI's RPC port
The new debug-log sub-runs overlap the original GUI, so their shared RPC port prevents node initialization, while sub-run failures collect diagnostics from the wrong process.
Location: test/functional/qml_test_debug_log.py:364 (head).
Details and suggested fix
run_log_setting_tests() runs before the outer harness is stopped; test_close_settings() only closes Settings. Every DebugLogHarness calls setup_datadir() without an RPC port, enabling RPC on 127.0.0.1:18443. The later instances therefore cannot bind while the original node holds that endpoint, and initialization returns “Unable to start HTTP server.” -nolisten only disables P2P listening. These scenarios consequently do not exercise the intended healthy-node workflow. Whether their GUI assertions fail or pass despite initialization failure remains timing-dependent. Give each harness an unused RPC port, as QmlTestHarness already does. Also collect each sub-harness's stderr and QML tree before its own stop(): currently its finally stops it before the exception reaches the outer handler, which inspects the original GUI instead.
[minor] · Aborted log reads disable controls without an error message
A failed seek or short read after opening the log can now disable search, filtering and Open debug.log without supplying an explanation.
Location: qml/models/debuglogmodel.cpp:665 (head).
Details and suggested fix
ReadTail() sets file_opened = true, but a later failed seek or short read returns {}, resetting that flag and leaving error_message empty. An in-place truncation during the read, such as external copytruncate rotation, can take this path without triggering the cancellation guards. onReadCompleted() now treats that result as an unavailable log, disables the page's controls and supplies no reader-error banner, while retaining previously loaded rows. A later successful refresh recovers the state, normally through the watcher and debounce; an I/O failure without another file event can last longer. Distinguish aborted reads from failed opens with an explicit result flag, preserve availability and the reader error for an aborted result, and schedule a trailing refresh.
Optional improvements
[suggestion] · The custom-log test searches outside the initially loaded tail
The marker is absent from the initial 1,000-row cache even when the viewer reads the wrong default log, so this assertion cannot detect that regression.
Location: test/functional/qml_test_debug_log.py:318 (head).
Details and suggested fix
_seed_debug_log_history() writes 1,200 records to <datadir>/regtest/debug.log and places oldest-history marker first. This scenario starts a fresh process, retains only the newest 1,000 records and never loads older messages. Filtering searches the retained cache, not the file. A regression to the hard-coded default path would therefore still produce a nonempty list and zero matches for this marker; the earlier process's load-older test does not change that. Check the absence of a marker inside the seeded tail, such as mempool marker, and add a positive assertion for a unique line written only to custom.log.
[suggestion] · The scheme-rejection test checks the mock's allowlist, not production validation
Weakening UrlOpener's production validation would not affect the QML rejection test because MockUrlOpener independently implements the same checks.
Location: qml/urlopener.h:46 (head).
Details and suggested fix
The QML harness registers MockUrlOpener as UrlOpener, and test_non_http_scheme_is_refused() exercises the mock's copied parsing, host and scheme checks. The production setOpenUrlFnForTesting() hook has no caller, so the test does not protect the shipped validator against changes to those checks. Add a C++ unit test using the real UrlOpener with an injected counting callback. Assert that disallowed schemes, schemeless, host-less and malformed inputs return false without invoking the callback, and that valid HTTP/HTTPS inputs invoke it and propagate both success and failure. This exercises the production boundary without launching a browser.