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:
commit
9db6a416dd
@ -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,
|
||||
|
@ -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/
|
||||
|
Loading…
x
Reference in New Issue
Block a user