Skip to content

tests: Fix expectations for merged-/usr systems

Simon McVittie requested to merge wip/smcv/testing into master
  • tests: Debug what we expected vs. what we got

  • tests: Fix expectations for merged-/usr systems

    Previously, we were assuming that the symlink created by capsule-capture-libs would point to the realpath() of a library, possibly with a --link-target prefix. However, it actually only resolves the symlink representing the SONAME: it will resolve libz.so.1 to libz.so.1.2.13, but unlike Perl abs_path() or C realpath(), it will not necessarily resolve symlinks in the directory hierarchy leading up to that point.

    For example, on a merged-/usr system like Debian >= 12, /lib is a symbolic link to usr/lib. The realpath() of libz.so.1 is something like /usr/lib/MULTIARCH/libz.so.1.2.13, but because both /lib/MULTIARCH and /usr/lib/MULTIARCH appear in /etc/ld.so.conf.d, it is undefined whether capsule-capture-libs will output /lib/MULTIARCH/libz.so.1.2.13 or /usr/lib/MULTIARCH/libz.so.1.2.13.

    Relax the expectations of this test so we only say that the symlink points to some reasonable $libdir, followed by the basename() of the realpath() of libc.so.6.

  • CI: Use Debian 13 prereleases to test with sanitizers

    Now that the tests pass on merged-/usr systems, we can use a more modern Debian suite.

    Normally I'd use the latest Debian stable (Debian 12), but that seems to have a false positive for a printf argument to %s being NULL, causing the asan/ubsan builds to fail; so use Debian 10 and 11 as our representatives of older systems, together with Debian 13 prereleases as our representative of a modern system.


/cc @vivek @denittis

Edited by Simon McVittie

Merge request reports