]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/test/test-dlopen-so.c
dissect: add --make-archive option to convert DDI to tarball
[thirdparty/systemd.git] / src / test / test-dlopen-so.c
CommitLineData
68fdc72c
LP
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3#include <dlfcn.h>
4#include <stdlib.h>
5
c5fd89ad 6#include "bpf-dlopen.h"
68fdc72c 7#include "cryptsetup-util.h"
ee48779e 8#include "elf-util.h"
68fdc72c 9#include "idn-util.h"
b68f4cad 10#include "libarchive-util.h"
a60d5b2f 11#include "libfido2-util.h"
68fdc72c
LP
12#include "macro.h"
13#include "main-func.h"
1d8aae43 14#include "password-quality-util-passwdqc.h"
d34b1823 15#include "password-quality-util-pwquality.h"
e30c1d01 16#include "pcre2-util.h"
da035a3a 17#include "pkcs11-util.h"
68fdc72c
LP
18#include "qrcode-util.h"
19#include "tests.h"
a60d5b2f 20#include "tpm2-util.h"
68fdc72c
LP
21
22static int run(int argc, char **argv) {
23 test_setup_logging(LOG_DEBUG);
24
25 /* Try to load each of our weak library dependencies once. This is supposed to help finding cases
26 * where .so versions change and distributions update, but systemd doesn't have the new so names
27 * around yet. */
28
29#if HAVE_LIBIDN2 || HAVE_LIBIDN
30 assert_se(dlopen_idn() >= 0);
31#endif
32
33#if HAVE_LIBCRYPTSETUP
34 assert_se(dlopen_cryptsetup() >= 0);
35#endif
36
1d8aae43
EI
37#if HAVE_PASSWDQC
38 assert_se(dlopen_passwdqc() >= 0);
39#endif
40
68fdc72c
LP
41#if HAVE_PWQUALITY
42 assert_se(dlopen_pwquality() >= 0);
43#endif
44
45#if HAVE_QRENCODE
46 assert_se(dlopen_qrencode() >= 0);
47#endif
48
a60d5b2f
LP
49#if HAVE_TPM2
50 assert_se(dlopen_tpm2() >= 0);
51#endif
52
53#if HAVE_LIBFIDO2
54 assert_se(dlopen_libfido2() >= 0);
55#endif
56
c5fd89ad
LB
57#if HAVE_LIBBPF
58 assert_se(dlopen_bpf() >= 0);
59#endif
60
ee48779e
DDM
61#if HAVE_ELFUTILS
62 assert_se(dlopen_dw() >= 0);
63 assert_se(dlopen_elf() >= 0);
64#endif
65
66#if HAVE_PCRE2
67 assert_se(dlopen_pcre2() >= 0);
68#endif
69
da035a3a
LB
70#if HAVE_P11KIT
71 assert_se(dlopen_p11kit() >= 0);
72#endif
73
b68f4cad
LP
74#if HAVE_LIBARCHIVE
75 assert_se(dlopen_libarchive() >= 0);
76#endif
77
68fdc72c
LP
78 return 0;
79}
80
81DEFINE_MAIN_FUNCTION(run);