]>
Commit | Line | Data |
---|---|---|
3a6ce677 BR |
1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | ||
3 | #include <dlfcn.h> | |
4 | #include <stdlib.h> | |
5 | ||
8b3d4ff0 | 6 | #include "bpf-dlopen.h" |
3a6ce677 | 7 | #include "cryptsetup-util.h" |
9cde670f | 8 | #include "elf-util.h" |
3a6ce677 BR |
9 | #include "idn-util.h" |
10 | #include "libfido2-util.h" | |
11 | #include "macro.h" | |
12 | #include "main-func.h" | |
9cde670f | 13 | #include "pcre2-dlopen.h" |
3a6ce677 BR |
14 | #include "pwquality-util.h" |
15 | #include "qrcode-util.h" | |
16 | #include "tests.h" | |
17 | #include "tpm2-util.h" | |
18 | ||
19 | static int run(int argc, char **argv) { | |
20 | test_setup_logging(LOG_DEBUG); | |
21 | ||
22 | /* Try to load each of our weak library dependencies once. This is supposed to help finding cases | |
23 | * where .so versions change and distributions update, but systemd doesn't have the new so names | |
24 | * around yet. */ | |
25 | ||
26 | #if HAVE_LIBIDN2 || HAVE_LIBIDN | |
27 | assert_se(dlopen_idn() >= 0); | |
28 | #endif | |
29 | ||
30 | #if HAVE_LIBCRYPTSETUP | |
31 | assert_se(dlopen_cryptsetup() >= 0); | |
32 | #endif | |
33 | ||
34 | #if HAVE_PWQUALITY | |
35 | assert_se(dlopen_pwquality() >= 0); | |
36 | #endif | |
37 | ||
38 | #if HAVE_QRENCODE | |
39 | assert_se(dlopen_qrencode() >= 0); | |
40 | #endif | |
41 | ||
42 | #if HAVE_TPM2 | |
43 | assert_se(dlopen_tpm2() >= 0); | |
44 | #endif | |
45 | ||
46 | #if HAVE_LIBFIDO2 | |
47 | assert_se(dlopen_libfido2() >= 0); | |
48 | #endif | |
49 | ||
8b3d4ff0 MB |
50 | #if HAVE_LIBBPF |
51 | assert_se(dlopen_bpf() >= 0); | |
52 | #endif | |
53 | ||
9cde670f LB |
54 | #if HAVE_ELFUTILS |
55 | assert_se(dlopen_dw() >= 0); | |
56 | assert_se(dlopen_elf() >= 0); | |
57 | #endif | |
58 | ||
59 | #if HAVE_PCRE2 | |
60 | assert_se(dlopen_pcre2() >= 0); | |
61 | #endif | |
62 | ||
3a6ce677 BR |
63 | return 0; |
64 | } | |
65 | ||
66 | DEFINE_MAIN_FUNCTION(run); |