Files
Maciej Borzecki ca6668a481 tests/core/netplan: override ld.so cache to avoid the host's cache files
The test breaks on UC24 in a peculiar way. The `netplan` CLI tool is a Python
script which attempts to load libnetplan.so.* through ctypes. However, in a
snap, the contents of /etc come from the host, so in case on UC24 environment,
the netplan client invoked from eg. core20 would observe actual ld.so.cache from
UC24. Thus Python's ctype library, would call `ldconfig-p`, which then consumes
the ld.so.cache from UC24, thus listing incorrect version of the libnetplan
library (specifically UC24 has libnetplan.so.1, while earlier versions had
libnetplan.so.0.0).

Attempt to fix this by providing a custom wrapper for ldconfig, which generates
a cache on the side under $SNAP_DATA, thus using the libraries which are
actually visible to the snap.

Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
2024-06-26 11:32:52 +02:00
..