1 minor finding · 1 suggestion
Findings
[minor] · USDT tool check misses GDB builds without Python
With a Python-less GDB, the final help command masks the failed Python check, causing the USDT functional tests to fail at startup instead of skipping.
Location: test/functional/test_framework/test_framework.py:1025 (head).
Details and suggested fix
skip_if_no_usdt_tools() checks only result.returncode, but GDB's batch exit status reflects the last executed command. The successful help break -probe-stap therefore hides a failure of python import gdb. An otherwise eligible USDT test then launches capture.gdb, whose initial Python block fails before the node starts, producing FailedToStartError with GDB's stderr rather than SkipTest. Make the Python check the final -ex command or run it in a separate checked invocation. The help query also does not exercise SystemTap probe parsing, so checking that capability requires a command that actually uses it. Ubuntu's CI GDB includes Python; no affected developer setup was identified, so the practical occurrence remains unconfirmed.
Optional improvements
[suggestion] · readelf fallback assumes a single site per probe name
If a probe has multiple sites with different operand layouts, the byte-register fallback can decode another site's operands and produce misleading USDT test failures.
Location: test/functional/test_framework/usdt.py:109 (head).
Details and suggested fix
When GDB rejects an r8b–r15b operand, the fallback builds a dictionary keyed only by provider:name, silently keeping the last ELF note for that name. A named probe breakpoint can cover multiple sites, but self.operands caches one layout without matching the hit location. The argument-count check cannot distinguish layouts with equal counts. Inlining or cloning can duplicate a probe embedded in a function, such as the utxocache:add probe in AddCoin. Assert that the selected probe name has exactly one note before using this fallback, so ambiguity produces a clear unsupported-case error while preserving single-site behavior. No current build was established to emit multiple sites for an affected probe.