]> 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:32:21 +0000 (18:32 -0400)
commit3610412ecf2badc2dd68388d794eb4ed93f8954b
treebf64d88fe47dcd74a7730eac21cb56807f3b3711
parent2c2bc3c5a00222251a4eb5f3fa58eb41413821d1
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]