• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

systemd / systemd / 30181146251
73%

Build:
DEFAULT BRANCH: main
Ran 26 Jul 2026 03:36AM UTC
Jobs 1
Files 2166
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Jul 2026 08:33PM UTC coverage: 73.35% (-0.3%) from 73.643%
30181146251

push

github

yuwata
shared/dropin: don't re-derive drop-in name candidates per lookup dir

unit_file_find_dirs() is called once for every (unit name or alias,
lookup directory, drop-in suffix) combination while enumerating units
at boot, to check whether that unit has a ".d", ".wants", ".requires"
or ".upholds" drop-in directory in that particular lookup path. On a
typical system with ~270 loaded units and ~12 directories in the unit
search path, this adds up to tens of thousands of calls.

For every one of those calls, the function used to independently
re-derive the full chain of candidate unit names to check for that one
directory: the name itself, its template if it is a template instance,
and its "-" prefix chain (e.g. for "foo-bar-waldo.service" also
"foo-bar-.service" and "foo-.service"), recursively expanding further
where applicable. That derivation only depends on the unit name itself
and does not involve the lookup directory at all, so it produces the
exact same list of candidate names regardless of which of the 12
lookup directories is currently being checked. Despite this, it was
being fully recomputed for every single directory, doing several small
allocations and unit-name parsing calls (unit_name_template(),
unit_name_to_prefix(), unit_name_build_from_type(), ...) each time.

Split the name-derivation logic out into its own function,
unit_file_expand_dropin_names(), and compute it once per unit
name/alias, then reuse the resulting candidate list across all lookup
directories instead of re-deriving it for each of them. The order in
which candidate directories end up being added is unchanged, so this
is not expected to alter drop-in resolution behaviour: I confirmed this
by comparing the sorted unit load state, fragment path and drop-in path
output of "systemd --test --system" before and after this change on the
same unit tree, which is byte-for-byte identical.

I measured the effect by instrumenting manager_enumerate() with
CLOCK_MONOTONIC timestamps and r... (continued)

27 of 30 new or added lines in 1 file covered. (90.0%)

2927 existing lines in 51 files now uncovered.

348282 of 474820 relevant lines covered (73.35%)

1314830.72 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
90.28
-1.26% src/shared/dropin.c

Coverage Regressions

Lines Coverage ∆ File
1084
57.48
-18.02% src/repart/repart.c
462
1.0
1.0% src/home/homework-fscrypt.c
423
44.36
-0.04% src/imds/imdsd.c
213
57.89
0.04% src/home/homework.c
201
67.73
0.03% src/shared/crypto-util.c
96
61.06
-11.87% src/bootctl/bootctl-link.c
84
91.06
-0.05% src/shared/format-table.c
53
89.14
0.06% src/core/varlink-unit.c
52
33.63
-11.43% src/udev/udev-builtin-path_id.c
41
42.02
0.62% src/shared/ask-password-api.c
37
66.88
0.22% src/home/homework-directory.c
16
70.99
-0.5% src/core/service.c
16
79.49
-0.91% src/udev/udev-rules.c
14
82.45
-2.01% src/creds/creds.c
12
82.5
-1.22% src/resolve/resolved-link.c
11
71.73
-1.3% src/resolve/resolved-dns-scope.c
11
94.93
-0.12% src/test/test-format-table.c
10
0.0
0.0% src/imds/imds-generator.c
9
77.1
-1.11% src/machine/machine.c
9
84.68
-1.17% src/udev/udev-manager.c
8
58.45
-1.35% src/timesync/timesyncd-manager.c
5
82.64
-0.19% src/core/manager.c
5
81.28
0.09% src/libsystemd/sd-varlink/sd-varlink.c
4
79.85
-0.38% src/journal-remote/journal-upload-journal.c
4
98.79
0.0% src/resolve/test-dns-cache.c
4
50.0
-50.0% src/shared/find-esp.h
3
79.5
-0.38% src/core/job.c
3
95.29
-3.53% src/journal/journald-rate-limit.c
3
56.24
-0.35% src/login/logind-session.c
3
54.54
-0.31% src/login/pam_systemd.c
3
59.39
0.0% src/shared/efi-loader.c
2
69.87
-0.07% src/core/exec-invoke.c
2
90.13
-0.26% src/journal/journald-context.c
2
87.01
-0.6% src/libsystemd-network/sd-radv.c
2
80.16
-0.41% src/network/networkd-dhcp-server.c
2
82.77
-0.4% src/oom/oomd-util.c
2
87.5
0.0% src/shared/crypto-util.h
2
61.01
-0.19% src/shared/pkcs11-util.c
2
96.1
0.35% src/test/test-crypto-util.c
1
82.95
-0.1% src/basic/process-util.c
1
89.92
-0.42% src/journal/journald-audit.c
1
91.95
0.0% src/libsystemd/sd-journal/journal-file.c
1
86.36
-0.05% src/libsystemd/sd-journal/sd-journal.c
1
54.53
-0.13% src/machine/machined-dbus.c
1
78.17
-0.06% src/network/networkd-ndisc.c
1
81.46
-0.23% src/resolve/resolved-hook.c
1
84.21
-5.26% src/shared/dissect-image.h
1
89.0
-0.09% src/shared/userdb.c
1
70.56
-0.16% src/systemctl/systemctl-list-units.c
1
74.53
-0.31% src/test/test-namespace.c
1
83.44
-0.32% src/udev/udevadm-trigger.c
Jobs
ID Job ID Ran Files Coverage
1 30181146251.1 26 Jul 2026 03:36AM UTC 2166
73.35
GitHub Action Run
Source Files on build 30181146251
  • Tree
  • List 2166
  • Changed 79
  • Source Changed 19
  • Coverage Changed 78
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30181146251
  • 5ef25109 on github
  • Prev Build on main (#30136241924)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc