From 347468e87d96998f31d9b348565ddefd68188efe Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Mon, 7 Dec 2020 13:24:41 +0200 Subject: [PATCH] config_test should fail also if VM is broken config_test expects Maxscale start failure, but ssh to Maxscale node also fails if VM is broken. Test should fail in case of VM problem to prevent Maxscale problem hiding. --- system-test/maxtest/src/testconnections.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system-test/maxtest/src/testconnections.cc b/system-test/maxtest/src/testconnections.cc index 59ab13b97..8a0ac3c77 100644 --- a/system-test/maxtest/src/testconnections.cc +++ b/system-test/maxtest/src/testconnections.cc @@ -2167,11 +2167,11 @@ bool TestConnections::test_bad_config(int m, const string& config) // Set the timeout to prevent hangs with configurations that work set_timeout(20); - return maxscales->ssh_node_f(m, + ssh_rc = maxscales->ssh_node_f(m, true, "cp /tmp/maxscale.cnf /etc/maxscale.cnf; pkill -9 maxscale; " - "maxscale -U maxscale -lstdout &> /dev/null && sleep 1 && pkill -9 maxscale") - == 0; + "maxscale -U maxscale -lstdout &> /dev/null && sleep 1 && pkill -9 maxscale"); + return ((ssh_rc == 0) or (ssh_rc >= 256)); } int TestConnections::call_mdbci(const char* options) {