diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/testconnections.cpp index 984599f4d..0cc9d5fcc 100644 --- a/maxscale-system-test/testconnections.cpp +++ b/maxscale-system-test/testconnections.cpp @@ -818,27 +818,25 @@ int TestConnections::copy_maxscale_logs(double timestamp) system(sys); if (strcmp(maxscales->IP[i], "127.0.0.1") != 0) { - maxscales->ssh_node_f(i, - true, - "rm -rf %s/logs; mkdir %s/logs; \ - %s cp %s/*.log %s/logs/; \ - %s cp /tmp/core* %s/logs/;\ - %s cp %s %s/logs/;\ - %s chmod 777 -R %s/logs", + int rc = maxscales->ssh_node_f(i, true, + "rm -rf %s/logs;" + "mkdir %s/logs;" + "cp %s/*.log %s/logs/;" + "cp /tmp/core* %s/logs/;" + "cp %s %s/logs/;" + "chmod 777 -R %s/logs;" + "ls /tmp/core* && exit 42;", maxscales->access_homedir[i], maxscales->access_homedir[i], - maxscales->access_sudo[i], maxscales->maxscale_log_dir[i], maxscales->access_homedir[i], - maxscales->access_sudo[i], maxscales->access_homedir[i], - maxscales->access_sudo[i], maxscales->maxscale_cnf[i], maxscales->access_homedir[i], - maxscales->access_sudo[i], maxscales->access_homedir[i]); sprintf(sys, "%s/logs/*", maxscales->access_homedir[i]); maxscales->copy_from_node(i, sys, log_dir_i); + expect(rc != 42, "Test should not generate core files"); } else { @@ -847,10 +845,6 @@ int TestConnections::copy_maxscale_logs(double timestamp) maxscales->ssh_node_f(i, true, "cp %s %s/", maxscales->maxscale_cnf[i], log_dir_i); maxscales->ssh_node_f(i, true, "chmod a+r -R %s", log_dir_i); } - - const char* command = "ls /tmp/core* && exit 42"; - int rc = maxscales->ssh_node_f(i, true, "%s", command); - expect(rc != 42, "Test should not generate core files"); } return 0; }