Skip to content

Commit d55810e

Browse files
committed
Revert "test-network: drop ExecReload= in networkd.service and udevd.service"
The required change is in v253 but not in any older releases, so this test change needs to be reverted. This reverts commit 27c9d9b.
1 parent ff39d01 commit d55810e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/test-network/systemd-networkd-tests.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,17 @@ def create_unit_dropin(unit, contents):
372372
with open(f'/run/systemd/system/{unit}.d/00-override.conf', mode='w', encoding='utf-8') as f:
373373
f.write('\n'.join(contents))
374374

375-
def create_service_dropin(service, command, additional_settings=None):
375+
def create_service_dropin(service, command, reload_command=None, additional_settings=None):
376376
drop_in = [
377377
'[Service]',
378378
'ExecStart=',
379379
f'ExecStart=!!{valgrind_cmd}{command}',
380380
]
381+
if reload_command:
382+
drop_in += [
383+
'ExecReload=',
384+
f'ExecReload={valgrind_cmd}{reload_command}',
385+
]
381386
if enable_debug:
382387
drop_in += ['Environment=SYSTEMD_LOG_LEVEL=debug']
383388
if asan_options:
@@ -695,6 +700,7 @@ def setUpModule():
695700
save_timezone()
696701

697702
create_service_dropin('systemd-networkd', networkd_bin,
703+
f'{networkctl_bin} reload',
698704
['[Service]', 'Restart=no', '[Unit]', 'StartLimitIntervalSec=0'])
699705
create_service_dropin('systemd-resolved', resolved_bin)
700706
create_service_dropin('systemd-timesyncd', timesyncd_bin)
@@ -708,6 +714,8 @@ def setUpModule():
708714
'[Service]',
709715
'ExecStart=',
710716
f'ExecStart=!!{udevd_bin}',
717+
'ExecReload=',
718+
f'ExecReload={udevadm_bin} control --reload --timeout 0',
711719
]
712720
)
713721
create_unit_dropin(

0 commit comments

Comments
 (0)