1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-31 14:50:15 +03:00

Merge pull request #21583 from bluca/bpf_assert

cgroup: don't emit BPF firewall warning when manager is in test mode
This commit is contained in:
Yu Watanabe 2021-12-02 07:47:17 +09:00 committed by GitHub
commit 9db6a416dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -914,7 +914,10 @@ int bpf_firewall_supported(void) {
void emit_bpf_firewall_warning(Unit *u) {
static bool warned = false;
if (!warned) {
assert(u);
assert(u->manager);
if (!warned && !MANAGER_IS_TEST_RUN(u->manager)) {
bool quiet = bpf_firewall_unsupported_reason == -EPERM && detect_container() > 0;
log_unit_full_errno(u, quiet ? LOG_DEBUG : LOG_WARNING, bpf_firewall_unsupported_reason,

View File

@ -4,6 +4,7 @@
set -eux
systemd-analyze log-level debug
export SYSTEMD_LOG_LEVEL=debug
mkdir -p /tmp/img/usr/lib/systemd/system/
mkdir -p /tmp/img/opt/