]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/test/test-dlopen-so.c
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
6 #include "bpf-dlopen.h"
8 #include "cryptsetup-util.h"
10 #include "gcrypt-util.h"
12 #include "libarchive-util.h"
13 #include "libfido2-util.h"
15 #include "main-func.h"
16 #include "password-quality-util-passwdqc.h"
17 #include "password-quality-util-pwquality.h"
18 #include "pcre2-util.h"
19 #include "pkcs11-util.h"
20 #include "qrcode-util.h"
22 #include "tpm2-util.h"
24 static int run(int argc
, char **argv
) {
25 test_setup_logging(LOG_DEBUG
);
27 /* Try to load each of our weak library dependencies once. This is supposed to help finding cases
28 * where .so versions change and distributions update, but systemd doesn't have the new so names
31 #if HAVE_LIBIDN2 || HAVE_LIBIDN
32 assert_se(dlopen_idn() >= 0);
35 #if HAVE_LIBCRYPTSETUP
36 assert_se(dlopen_cryptsetup() >= 0);
40 assert_se(dlopen_passwdqc() >= 0);
44 assert_se(dlopen_pwquality() >= 0);
48 assert_se(dlopen_qrencode() >= 0);
52 assert_se(dlopen_tpm2() >= 0);
56 assert_se(dlopen_libfido2() >= 0);
60 assert_se(dlopen_bpf() >= 0);
64 assert_se(dlopen_dw() >= 0);
65 assert_se(dlopen_elf() >= 0);
69 assert_se(dlopen_pcre2() >= 0);
73 assert_se(dlopen_p11kit() >= 0);
77 assert_se(dlopen_libarchive() >= 0);
81 assert_se(dlopen_lz4() >= 0);
85 assert_se(dlopen_zstd() >= 0);
89 assert_se(dlopen_lzma() >= 0);
93 assert_se(initialize_libgcrypt(/* secmem= */ false) >= 0);
99 DEFINE_MAIN_FUNCTION(run
);