]> git.ipfire.org Git - thirdparty/elfutils.git/commit
tests/run-stack-live-test.sh: prototype 'live' eu-stack testing
authorSerhei Makarov <serhei@serhei.io>
Thu, 8 May 2025 22:17:45 +0000 (18:17 -0400)
committerSerhei Makarov <serhei@serhei.io>
Thu, 8 May 2025 22:17:45 +0000 (18:17 -0400)
commitdeca125665a76cf024bd063ff4f477cb675ad41e
treed00cc7476c51cebe197b91fb3be6325d2e09959f
parentd05241ce690018548857199bd34d7734c7164679
tests/run-stack-live-test.sh: prototype 'live' eu-stack testing

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.

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?
- Something better than sed for the scrubbing?
- 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?

* tests/run-stack-live-test.sh: New test with wild and fuzzy
  testrun_compare variant that scrubs inherently unpredictable parts of
  the data. Needs to scrub even more.
* tests/Makefile.am (TESTS): Add run-stack-live-test.sh.
tests/Makefile.am
tests/run-stack-live-test.sh [new file with mode: 0755]