mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 01:55:22 +03:00
Merge pull request #28074 from mrc0mmand/journal-gatewayd-followups
A couple of follow-ups for systemd-journal-gatewayd tests
This commit is contained in:
commit
14cb29dfd5
@ -31,6 +31,7 @@
|
||||
#include "parse-util.h"
|
||||
#include "pretty-print.h"
|
||||
#include "sigbus.h"
|
||||
#include "signal-util.h"
|
||||
#include "tmpfile-util.h"
|
||||
|
||||
#define JOURNAL_WAIT_TIMEOUT (10*USEC_PER_SEC)
|
||||
@ -1004,6 +1005,10 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
|
||||
static int run(int argc, char *argv[]) {
|
||||
_cleanup_(MHD_stop_daemonp) struct MHD_Daemon *d = NULL;
|
||||
static const struct sigaction sigterm = {
|
||||
.sa_handler = nop_signal_handler,
|
||||
.sa_flags = SA_RESTART,
|
||||
};
|
||||
struct MHD_OptionItem opts[] = {
|
||||
{ MHD_OPTION_EXTERNAL_LOGGER,
|
||||
(intptr_t) microhttpd_logger, NULL },
|
||||
@ -1040,6 +1045,7 @@ static int run(int argc, char *argv[]) {
|
||||
return r;
|
||||
|
||||
sigbus_install();
|
||||
assert_se(sigaction(SIGTERM, &sigterm, NULL) >= 0);
|
||||
|
||||
r = setup_gnutls_logger(NULL);
|
||||
if (r < 0)
|
||||
|
@ -1316,12 +1316,14 @@ install_systemd() {
|
||||
if get_bool "$IS_BUILT_WITH_COVERAGE"; then
|
||||
mkdir -p "$initdir/etc/systemd/system/service.d/"
|
||||
echo -ne "[Service]\nProtectSystem=no\nProtectHome=no\n" >"$initdir/etc/systemd/system/service.d/99-gcov-override.conf"
|
||||
# Similarly, set ReadWritePaths= to the $BUILD_DIR in the test image
|
||||
# to make the coverage work with units using DynamicUser=yes. Do this
|
||||
# only for services with test- prefix, as setting this system-wide
|
||||
# has many undesirable side-effects, as it creates its own namespace.
|
||||
mkdir -p "$initdir/etc/systemd/system/test-.service.d/"
|
||||
echo -ne "[Service]\nReadWritePaths=${BUILD_DIR:?}\n" >"$initdir/etc/systemd/system/test-.service.d/99-gcov-rwpaths-override.conf"
|
||||
# Similarly, set ReadWritePaths= to the $BUILD_DIR in the test image to make the coverage work with
|
||||
# units using DynamicUser=yes. Do this only for services with test- prefix and a couple of
|
||||
# known-to-use DynamicUser=yes services, as setting this system-wide has many undesirable
|
||||
# side-effects, as it creates its own namespace.
|
||||
for service in test- systemd-journal-{gatewayd,upload}; do
|
||||
mkdir -p "$initdir/etc/systemd/system/$service.service.d/"
|
||||
echo -ne "[Service]\nReadWritePaths=${BUILD_DIR:?}\n" >"$initdir/etc/systemd/system/$service.service.d/99-gcov-rwpaths-override.conf"
|
||||
done
|
||||
# Ditto, but for the user daemon
|
||||
mkdir -p "$initdir/etc/systemd/user/test-.service.d/"
|
||||
echo -ne "[Service]\nReadWritePaths=${BUILD_DIR:?}\n" >"$initdir/etc/systemd/user/test-.service.d/99-gcov-rwpaths-override.conf"
|
||||
@ -2735,7 +2737,7 @@ inst_binary() {
|
||||
# nsswitch.conf uses [SUCCESS=merge] (like on Arch Linux)
|
||||
# delv, dig - pull in nss_resolve if `resolve` is in nsswitch.conf
|
||||
# tar - called by machinectl in TEST-25
|
||||
bin_rx='/(agetty|chown|delv|dig|getfacl|getent|id|login|ls|mkfs\.[a-z0-9]+|mksquashfs|mkswap|setfacl|setpriv|stat|su|tar|useradd|userdel)$'
|
||||
bin_rx='/(agetty|chown|curl|delv|dig|getfacl|getent|id|login|ls|mkfs\.[a-z0-9]+|mksquashfs|mkswap|setfacl|setpriv|stat|su|tar|useradd|userdel)$'
|
||||
if get_bool "$IS_BUILT_WITH_ASAN" && [[ "$bin" =~ $bin_rx ]]; then
|
||||
wrap_binary=1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user