Commit graph

3 commits

Author SHA1 Message Date
Barnabás Pőcze e28a052105 treewide: retain sections to prevent linker garbage collection
The linker may remove sections that are actually used when
"--gc-sections" and "-z start-stop-gc" is set. Add the `retain`
attribute to prevent that.

Furthermore, fix the alignment for `pwtest_suite_decl` objects.

See: #2292
See: https://lld.llvm.org/ELF/start-stop-gc.html
See: https://github.com/systemd/systemd/issues/21847
See: https://github.com/systemd/systemd/pull/21855
2022-04-15 23:58:05 +02:00
Peter Hutterer 50180532a4 test: add errno check macros 2021-06-09 18:00:06 +10:00
Peter Hutterer ed3f882fa9 test: add the pwtest test framework
Heavily inspired by libinput's litest framework (built around check), this is
a from-scratch framework that simplifies adding tests for various parts of
pipewire. See the pwtest.h documentation for details but the basics are:

- PW_TEST() and PWTEST_SUITE() specify the tests to be run
- Test are run in forked processes, any errors/signals are caught and printed
  to the log
- Tests have a custom pipewire daemon started on demand to talk to [1]. The
  daemon's log is available in the test output.
- Output is YAML to be processed into whatever format needed

[1] There are limits here, since we can't emulate devices yet there is only
so much we can rely on with the daemon.
2021-06-09 18:00:06 +10:00