Improve core dump detection

The core dump detection now properly distinguishes core dumps and ssh
failures.
This commit is contained in:
Markus Mäkelä
2018-03-28 11:03:02 +03:00
parent 6d4691617c
commit eca77fb4c9
2 changed files with 2 additions and 4 deletions

View File

@ -166,8 +166,6 @@ int Nodes::ssh_node(int node, const char *ssh, bool sudo)
free(cmd);
return rc;
if (WIFEXITED(rc))
{

View File

@ -769,9 +769,9 @@ int TestConnections::copy_maxscale_logs(double timestamp)
maxscales->ssh_node_f(i, true, "chmod a+r -R %s", log_dir_i);
}
const char* command = "for i in `find /tmp/ -name 'core*'`; do test -e $i && exit 1; done";
const char* command = "for i in `find /tmp/ -name 'core*'`; do test -e $i && exit 42; done";
int rc = maxscales->ssh_node_f(i, true, command);
assert(rc == 0, "Test should not generate core files");
assert(rc != 42, "Test should not generate core files");
}
return 0;
}