From 228d84e37ac1e4cbc22f38ff9c78bb1d6bd73690 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 5 Jul 2025 13:01:18 +0200 Subject: [PATCH] systemd-analyze: stop printing Ex transient settings The test will fail if we ever add one again in the future by mistake. --- src/shared/bus-unit-util.c | 4 +++- test/units/TEST-65-ANALYZE.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index 97bf9d264ec..41c88b79cf3 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -2880,9 +2880,11 @@ void bus_dump_transient_settings(UnitType t) { for (const BusProperty *item = *tables; item->convert; item++) { assert(item->name || item->dump); - /* Do not print deprecated names */ + /* Do not print deprecated names. All "Ex" variants are deprecated. */ if (item->convert == warn_deprecated) continue; + if (item->name && endswith(item->name, "Ex")) + continue; if (item->name) puts(item->name); diff --git a/test/units/TEST-65-ANALYZE.sh b/test/units/TEST-65-ANALYZE.sh index 468c9ed0939..61e4a97175c 100755 --- a/test/units/TEST-65-ANALYZE.sh +++ b/test/units/TEST-65-ANALYZE.sh @@ -1115,6 +1115,7 @@ systemd-analyze transient-settings mount | grep CPUQuotaPeriodSec (! systemd-analyze transient-settings service | grep CPUAccounting ) (! systemd-analyze transient-settings service | grep ConditionKernelVersion ) (! systemd-analyze transient-settings service | grep AssertKernelVersion ) +(! systemd-analyze transient-settings service socket timer path slice scope mount automount | grep -E 'Ex$' ) systemd-analyze log-level info -- 2.47.3