test: drop explicit dlopen notes from test executables
Typically, we do not explicitly set dlopen note on test binaries. If we should set notes, let's do that consistently later.
This commit is contained in:
@@ -393,7 +393,7 @@ TEST(dnssec_ecdsa_verify_raw) {
|
||||
}
|
||||
|
||||
static int intro(void) {
|
||||
if (DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
|
||||
if (dlopen_libcrypto(LOG_DEBUG) < 0)
|
||||
return EXIT_TEST_SKIP;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include "sd-dlopen.h"
|
||||
|
||||
#include "gcrypt-util.h"
|
||||
#include "log.h" /* IWYU pragma: keep */
|
||||
|
||||
@@ -46,8 +42,6 @@ int dlopen_gcrypt(int log_level) {
|
||||
#if HAVE_GCRYPT
|
||||
static void *gcrypt_dl = NULL;
|
||||
|
||||
GCRYPT_NOTE(SD_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED);
|
||||
|
||||
return dlopen_many_sym_or_warn(
|
||||
&gcrypt_dl,
|
||||
"libgcrypt.so.20", log_level,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sd-dlopen.h"
|
||||
|
||||
#include "basic-forward.h"
|
||||
|
||||
int dlopen_gcrypt(int log_level);
|
||||
@@ -15,18 +13,6 @@ int initialize_libgcrypt(bool secmem);
|
||||
# error "missing libgcrypt_cflags in meson dependency."
|
||||
#endif
|
||||
|
||||
#define GCRYPT_NOTE(priority) \
|
||||
SD_ELF_NOTE_DLOPEN("gcrypt", \
|
||||
"Support for journald forward-sealing", \
|
||||
priority, \
|
||||
"libgcrypt.so.20")
|
||||
|
||||
#define DLOPEN_GCRYPT(log_level, priority) \
|
||||
({ \
|
||||
GCRYPT_NOTE(priority); \
|
||||
dlopen_gcrypt(log_level); \
|
||||
})
|
||||
|
||||
#include <gcrypt.h> /* IWYU pragma: export */
|
||||
|
||||
#include "dlfcn-util.h"
|
||||
@@ -71,6 +57,4 @@ extern DLSYM_PROTOTYPE(gcry_randomize);
|
||||
} while(false)
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(gcry_md_hd_t, sym_gcry_md_close, NULL);
|
||||
#else
|
||||
#define DLOPEN_GCRYPT(log_level, priority) dlopen_gcrypt(log_level)
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,7 @@ static int do_attach(void) {
|
||||
struct stat st;
|
||||
int r;
|
||||
|
||||
r = DLOPEN_BPF(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
r = dlopen_bpf(LOG_ERR);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to dlopen libbpf: %m");
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ static int run(int argc, char *argv[]) {
|
||||
#if HAVE_LIBBPF
|
||||
int r;
|
||||
|
||||
r = DLOPEN_BPF(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
r = dlopen_bpf(LOG_ERR);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -501,8 +501,8 @@ TEST(hmac) {
|
||||
}
|
||||
|
||||
static int intro(void) {
|
||||
if (DLOPEN_GCRYPT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0 &&
|
||||
DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
|
||||
if (dlopen_gcrypt(LOG_DEBUG) < 0 &&
|
||||
dlopen_libcrypto(LOG_DEBUG) < 0)
|
||||
return EXIT_TEST_SKIP;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user