reset the failed container unit before stopping it in the link-refusal vm subtest
This commit is contained in:
parent
e46ad07226
commit
fd2861c097
1 changed files with 3 additions and 1 deletions
|
|
@ -254,8 +254,10 @@ pkgs.testers.runNixOSTest {
|
||||||
host.succeed(f"test -L {ROOT}/root")
|
host.succeed(f"test -L {ROOT}/root")
|
||||||
|
|
||||||
# Control: with the link gone the same unit starts.
|
# Control: with the link gone the same unit starts.
|
||||||
host.succeed(f"systemctl stop container@{MACHINE}")
|
# The reset comes first: once the failed unit is stopped, systemd
|
||||||
|
# unloads it and reset-failed exits 1.
|
||||||
host.succeed(f"systemctl reset-failed container@{MACHINE}")
|
host.succeed(f"systemctl reset-failed container@{MACHINE}")
|
||||||
|
host.succeed(f"systemctl stop container@{MACHINE}")
|
||||||
host.succeed(f"rm {ROOT}/root && mkdir -m 0700 {ROOT}/root")
|
host.succeed(f"rm {ROOT}/root && mkdir -m 0700 {ROOT}/root")
|
||||||
boot()
|
boot()
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue