Improve core dump detection
The core dump detection now properly distinguishes core dumps and ssh failures.
This commit is contained in:
@ -166,8 +166,6 @@ int Nodes::ssh_node(int node, const char *ssh, bool sudo)
|
|||||||
|
|
||||||
|
|
||||||
free(cmd);
|
free(cmd);
|
||||||
return rc;
|
|
||||||
|
|
||||||
|
|
||||||
if (WIFEXITED(rc))
|
if (WIFEXITED(rc))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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);
|
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);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user