test-network: drop ExecReload= in networkd.service and udevd.service

Follow-up for 0e07cdb0e7 and
f84331539d.
This commit is contained in:
Yu Watanabe
2023-07-06 11:33:44 +09:00
parent 2c5bca1734
commit 62eaf8d039

View File

@@ -357,17 +357,12 @@ def create_unit_dropin(unit, contents):
with open(f'/run/systemd/system/{unit}.d/00-override.conf', mode='w', encoding='utf-8') as f:
f.write('\n'.join(contents))
def create_service_dropin(service, command, reload_command=None, additional_settings=None):
def create_service_dropin(service, command, additional_settings=None):
drop_in = [
'[Service]',
'ExecStart=',
f'ExecStart=!!{valgrind_cmd}{command}',
]
if reload_command:
drop_in += [
'ExecReload=',
f'ExecReload={valgrind_cmd}{reload_command}',
]
if enable_debug:
drop_in += ['Environment=SYSTEMD_LOG_LEVEL=debug']
if asan_options:
@@ -688,7 +683,6 @@ def setUpModule():
save_timezone()
create_service_dropin('systemd-networkd', networkd_bin,
f'{networkctl_bin} reload',
['[Service]', 'Restart=no', '[Unit]', 'StartLimitIntervalSec=0'])
create_service_dropin('systemd-resolved', resolved_bin)
create_service_dropin('systemd-timesyncd', timesyncd_bin)
@@ -702,8 +696,6 @@ def setUpModule():
'[Service]',
'ExecStart=',
f'ExecStart=!!{udevd_bin}',
'ExecReload=',
f'ExecReload={udevadm_bin} control --reload --timeout 0',
]
)
create_unit_dropin(