From: Serge Hallyn Date: Sun, 19 Mar 2023 20:31:18 +0000 (-0500) Subject: console-log test: make sure container is stopped before restarting X-Git-Tag: v6.0.0~61^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4287%2Fhead;p=thirdparty%2Flxc.git console-log test: make sure container is stopped before restarting Closes #4237 Signed-off-by: Serge Hallyn --- diff --git a/src/tests/console_log.c b/src/tests/console_log.c index 77ca87deb..a20b90987 100644 --- a/src/tests/console_log.c +++ b/src/tests/console_log.c @@ -133,6 +133,11 @@ int main(int argc, char *argv[]) goto on_error_stop; } + if (!c->wait(c, "STOPPED", 5)) { + lxc_error("%s\n", "Failed waiting for container \"console-log\" to stop"); + goto on_error_stop; + } + c->clear_config(c); if (!c->load_config(c, NULL)) { @@ -165,6 +170,11 @@ int main(int argc, char *argv[]) goto on_error_stop; } + if (!c->wait(c, "STOPPED", 5)) { + lxc_error("%s\n", "Failed waiting for container \"console-log\" to stop"); + goto on_error_stop; + } + if (!c->startl(c, 0, NULL)) { lxc_error("%s\n", "Failed to start container \"console-log\" daemonized"); goto on_error_destroy;