Hi Serhei, On Thu, 2025-05-08 at 18:28 -0400, Serhei Makarov wrote: > Missing a few pieces, but worth sharing as an RFC. My idea is to > ensure better test coverage for eu-stack and then > eu-stacktrace+libdwfl_stacktrace by running against a live process > with known content, stopped at a known location, and aggressively > scrubbing output that's known to vary from testrun to testrun. > > This is a very basic preview of how that might look. If the approach > is sound, I hope to make it more sophisticated/reliable.
I like the testrun_compare_fuzzy name. > Unanswered questions: > - Scrub more data (e.g. libc symvers) from a more known program. > Scrub stack frame numbers to account for a case where extra frames > appear / are missing at the bottom of the stack? Yes, just remove everything after @... (the symver). Maybe look at gcc optimization suffixes like .isra, .constprop, .clone, .ipa (don't know if there is some definite list). Try to stick to plain C, otherwise think about demangling (or not?). Scrub everything after you have seen main (or in multi-threaded programs clone), so things like __libc_start_call_main, _start? > - Something better than sed for the scrubbing? It works, so... > - An equivalent eu-stacktrace test will require privileged perf_events > access for profiling data and therefore likely to be skipped by > default. How feasible is it to be enabled on the buildbots, though? Most probably not generically. Especially not the container builders. But you might make some deal with a specific direct hardware worker admin? Cheers, Mark