Skip to content

Commit 7cd9ae5

Browse files
vmagrometa-codesync[bot]
authored andcommitted
[antlir2][container_subtarget] add check for 'systemctl is-system-running'
Summary: This proves that systemd is actually up and running as pid1 instead of just getting a bash prompt. ___ Test Plan: ``` ❯ buck2 test fbcode//antlir/antlir2/container_subtarget/tests:test -- test_rooted_boot_exit_code test_rootless_boot_exit_code Buck UI: https://www.internalfb.com/buck2/435d727f-a0e9-4ff9-b4c9-8329752aaf87 Tests finished: Pass 1. Fail 0. Timeout 0. Fatal 0. Skip 0. Omit 0. Infra Failure 0. Build failure 0 ``` https://www.internalfb.com/intern/testinfra/testrun/9851624370074018 Differential Revision: D113494558 fbshipit-source-id: 53557cfbf0d7018b419ad63bf8453659688b71aa
1 parent 8c71ca8 commit 7cd9ae5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • antlir/antlir2/container_subtarget/tests

antlir/antlir2/container_subtarget/tests/test.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ fn test_rooted_boot_exit_code() {
6565
.expect("failed to spawn");
6666
p.exp_regex("[^\n\r](.*?)# ")
6767
.expect("didn't get bash prompt");
68+
p.send_line("systemctl is-system-running")
69+
.expect("failed to write shell command line");
70+
p.exp_regex("running")
71+
.expect("didn't get 'running' response from systemctl is-system-running");
6872
p.send_line("exit 42")
6973
.expect("failed to write shell command line");
7074
let status = p.process.wait().expect("failed to wait for process");

0 commit comments

Comments
 (0)