Replace check_log_err with log_includes/log_excludes
The latter are more explicit and easier to understand at the call site. Also removed the redundant crash checks via the log files.
This commit is contained in:
@ -16,8 +16,6 @@ int main(int argc, char* argv[])
|
||||
Test->set_timeout(60);
|
||||
Test->maxscales->connect_maxscale(0);
|
||||
Test->maxscales->close_maxscale_connections(0);
|
||||
sleep(10);
|
||||
Test->check_log_err(0, "fatal signal 11", false);
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -49,7 +49,7 @@ int main(int argc, char* argv[])
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0],
|
||||
(char*) "select /* maxscale route to master*/ @@server_id;");
|
||||
|
||||
Test->check_log_err(0, (char*) "Syntax error in hint", false);
|
||||
Test->log_excludes(0, "Syntax error in hint");
|
||||
Test->check_maxscale_alive(0);
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -53,7 +53,6 @@ int main(int argc, char* argv[])
|
||||
test.repl->unblock_all_nodes();
|
||||
|
||||
test.stop_timeout();
|
||||
test.check_log_err(0, "fatal signal 11", false);
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -285,9 +285,9 @@ int main(int argc, char* argv[])
|
||||
|
||||
Test->maxscales->close_maxscale_connections(0);
|
||||
|
||||
Test->check_log_err(0, (char*) "Failed to add user skysql", false);
|
||||
Test->check_log_err(0, (char*) "getaddrinfo failed", false);
|
||||
Test->check_log_err(0, (char*) "Couldn't find suitable Master", false);
|
||||
Test->log_excludes(0, "Failed to add user skysql");
|
||||
Test->log_excludes(0, "getaddrinfo failed");
|
||||
Test->log_excludes(0, "Couldn't find suitable Master");
|
||||
|
||||
Test->check_maxscale_alive(0);
|
||||
int rval = Test->global_result;
|
||||
|
||||
@ -27,7 +27,7 @@ int main(int argc, char* argv[])
|
||||
mysql_close(conn);
|
||||
|
||||
execute_query(test.repl->nodes[0], "DROP USER 'old'@'%%'");
|
||||
test.check_log_err(0, "MaxScale does not support these old passwords", true);
|
||||
test.log_includes(0, "MaxScale does not support these old passwords");
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -12,6 +12,6 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
test.check_maxscale_alive(0);
|
||||
test.check_log_err(0, "Failed to create new router session for service 'RW_Split'", true);
|
||||
test.log_includes(0, "Failed to create new router session for service 'RW_Split'");
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
Test->maxscales->close_maxscale_connections(0);
|
||||
|
||||
Test->check_log_err(0, "There are too few backend servers configured in", true);
|
||||
Test->log_includes(0, "There are too few backend servers configured in");
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -295,8 +295,8 @@ int main(int argc, char* argv[])
|
||||
Test->set_timeout(120);
|
||||
Test->maxscales->restart_maxscale(0);
|
||||
|
||||
Test->check_log_err(0, (char*) "Loading database names", false);
|
||||
Test->check_log_err(0, (char*) "Unknown column", false);
|
||||
Test->log_excludes(0, "Loading database names");
|
||||
Test->log_excludes(0, "Unknown column");
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -79,7 +79,7 @@ int main(int argc, char* argv[])
|
||||
Test->tprintf("Executing PHP script: %s\n", str);
|
||||
Test->add_result(system(str), "PHP script FAILED!\n");
|
||||
|
||||
Test->check_log_err(0, (char*) "Can't route MYSQL_COM_STMT_PREPARE", false);
|
||||
Test->log_excludes(0, "Can't route MYSQL_COM_STMT_PREPARE");
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -47,7 +47,7 @@ int main(int argc, char* argv[])
|
||||
Test->repl->close_connections();
|
||||
Test->stop_timeout();
|
||||
|
||||
Test->check_log_err(0, (char*) "Refresh rate limit exceeded", false);
|
||||
Test->log_excludes(0, "Refresh rate limit exceeded");
|
||||
Test->check_maxscale_alive(0);
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -49,8 +49,8 @@ int main(int argc, char** argv)
|
||||
|
||||
/** Check that the logs contains entries for both matching and
|
||||
* non-matching queries */
|
||||
test->check_log_err(0, "matched by", true);
|
||||
test->check_log_err(0, "was not matched", true);
|
||||
test->log_includes(0, "matched by");
|
||||
test->log_includes(0, "was not matched");
|
||||
|
||||
int rval = test->global_result;
|
||||
delete test;
|
||||
|
||||
@ -76,7 +76,7 @@ int main(int argc, char** argv)
|
||||
/** Check that MaxScale did not start and that the log contains
|
||||
* a message about the syntax error. */
|
||||
test.check_maxscale_processes(0, 0);
|
||||
test.check_log_err(0, "syntax error", true);
|
||||
test.log_includes(0, "syntax error");
|
||||
truncate_maxscale_logs(test);
|
||||
}
|
||||
|
||||
|
||||
@ -69,10 +69,10 @@ int main(int argc, char* argv[])
|
||||
char str[1024];
|
||||
sprintf(str, "Performing automatic failover to replace failed master 'server%d'", first_master + 1);
|
||||
test.tprintf("Checking Maxscale log on 000 for the failover message %s\n", str);
|
||||
test.check_log_err(0, str, true);
|
||||
test.log_includes(0, str);
|
||||
sprintf(str, "Performing automatic failover to replace failed master");
|
||||
test.tprintf("Checking Maxscale log on 001 for the lack of failover message\n");
|
||||
test.check_log_err(1, str, false);
|
||||
test.log_excludes(1, str);
|
||||
if (test.global_result != 0)
|
||||
{
|
||||
return test.global_result;
|
||||
@ -100,11 +100,11 @@ int main(int argc, char* argv[])
|
||||
|
||||
sprintf(str, "Performing automatic failover to replace failed master 'server%d'", second_master + 1);
|
||||
test.tprintf("Checking Maxscale log on 001 for the failover message %s\n", str);
|
||||
test.check_log_err(1, str, true);
|
||||
test.log_includes(1, str);
|
||||
|
||||
test.check_log_err(1, (char*) "Multiple failed master servers detected", false);
|
||||
test.check_log_err(1, (char*) "Failed to perform failover", false);
|
||||
test.check_log_err(1, (char*) "disabling automatic failover", false);
|
||||
test.log_excludes(1, "Multiple failed master servers detected");
|
||||
test.log_excludes(1, "Failed to perform failover");
|
||||
test.log_excludes(1, "disabling automatic failover");
|
||||
if (test.global_result != 0)
|
||||
{
|
||||
return test.global_result;
|
||||
@ -123,17 +123,17 @@ int main(int argc, char* argv[])
|
||||
|
||||
sprintf(str, "Performing automatic failover to replace failed master 'server%d'", second_master + 1);
|
||||
test.tprintf("Checking Maxscale log on 001 for the failover message %s\n", str);
|
||||
test.check_log_err(1, str, true);
|
||||
test.log_includes(1, str);
|
||||
test.tprintf("Checking Maxscale log on 000 for the lack of failover message %s\n", str);
|
||||
test.check_log_err(0, str, false);
|
||||
test.log_excludes(0, str);
|
||||
|
||||
test.check_log_err(1, (char*) "Multiple failed master servers detected", false);
|
||||
test.check_log_err(1, (char*) "Failed to perform failover", false);
|
||||
test.check_log_err(1, (char*) "disabling automatic failover", false);
|
||||
test.log_excludes(1, "Multiple failed master servers detected");
|
||||
test.log_excludes(1, "Failed to perform failover");
|
||||
test.log_excludes(1, "disabling automatic failover");
|
||||
|
||||
test.check_log_err(0, (char*) "Multiple failed master servers detected", false);
|
||||
test.check_log_err(0, (char*) "Failed to perform failover", false);
|
||||
test.check_log_err(0, (char*) "disabling automatic failover", false);
|
||||
test.log_excludes(0, "Multiple failed master servers detected");
|
||||
test.log_excludes(0, "Failed to perform failover");
|
||||
test.log_excludes(0, "disabling automatic failover");
|
||||
|
||||
stop_keepalived(&test);
|
||||
return test.global_result;
|
||||
|
||||
@ -19,7 +19,7 @@ int main(int argc, char* argv[])
|
||||
Test->set_timeout(10);
|
||||
Test->maxscales->connect_maxscale(0);
|
||||
|
||||
Test->check_log_err(0, (char*) "Multiple monitors are monitoring server", true);
|
||||
Test->log_includes(0, "Multiple monitors are monitoring server");
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -26,7 +26,7 @@ int main(int argc, char** argv)
|
||||
|
||||
// Wait for the avrorouter to process the data
|
||||
sleep(10);
|
||||
test.check_log_err(0, "Possible STATEMENT or MIXED", true);
|
||||
test.log_includes(0, "Possible STATEMENT or MIXED");
|
||||
|
||||
test.revert_replicate_from_master();
|
||||
|
||||
|
||||
@ -13,6 +13,6 @@ int main(int argc, char** argv)
|
||||
test.try_query(test.maxscales->conn_rwsplit[0], "CREATE TEMPORARY TABLE test.temp(id INT)");
|
||||
test.maxscales->disconnect();
|
||||
|
||||
test.check_log_err(0, "The provided buffer does not contain a COM_QUERY, but a COM_QUIT", false);
|
||||
test.log_excludes(0, "The provided buffer does not contain a COM_QUERY, but a COM_QUIT");
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
test.maxscales->disconnect();
|
||||
test.check_log_err(0, "unknown prepared statement", false);
|
||||
test.log_excludes(0, "unknown prepared statement");
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -10,6 +10,6 @@
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
test.check_log_err(0, " No users were loaded but 'inject_service_user' is enabled", false);
|
||||
test.log_excludes(0, " No users were loaded but 'inject_service_user' is enabled");
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -39,12 +39,12 @@ bool staying_alive(TestConnections& test, const maxbase::Duration& dur)
|
||||
// The bulk of the test.
|
||||
void test_watchdog(TestConnections& test, int argc, char* argv[])
|
||||
{
|
||||
test.check_log_err(0, "The systemd watchdog is Enabled", true);
|
||||
test.log_includes(0, "The systemd watchdog is Enabled");
|
||||
|
||||
// Wait for one watchdog interval, systemd should have been notified in that time.
|
||||
bool maxscale_alive = staying_alive(test, watchdog_interval);
|
||||
|
||||
test.check_log_err(0, "systemd watchdog keep-alive ping", true);
|
||||
test.log_includes(0, "systemd watchdog keep-alive ping");
|
||||
|
||||
test.set_timeout(2 * watchdog_interval.secs());
|
||||
|
||||
@ -61,7 +61,7 @@ void test_watchdog(TestConnections& test, int argc, char* argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
test.check_log_err(0, "received fatal signal 6", true);
|
||||
test.log_includes(0, "received fatal signal 6");
|
||||
if (test.global_result == 0)
|
||||
{
|
||||
test.tprintf("Maxscale was killed by systemd - ok");
|
||||
|
||||
@ -164,9 +164,8 @@ int main(int argc, char* argv[])
|
||||
Test->tprintf("Checking if Maxscale alive\n");
|
||||
Test->check_maxscale_alive(0);
|
||||
Test->tprintf("Checking log for unwanted errors\n");
|
||||
Test->check_log_err(0, (char*) "due to authentication failure", false);
|
||||
Test->check_log_err(0, (char*) "fatal signal 11", false);
|
||||
Test->check_log_err(0, (char*) "due to handshake failure", false);
|
||||
Test->log_excludes(0, "due to authentication failure");
|
||||
Test->log_excludes(0, "due to handshake failure");
|
||||
|
||||
// We need to wait for the TCP connections in TIME_WAIT state so that
|
||||
// later tests don't fail due to a lack of file descriptors
|
||||
|
||||
@ -115,10 +115,9 @@ int main(int argc, char* argv[])
|
||||
test.maxscales->close_maxscale_connections(0);
|
||||
|
||||
test.check_maxscale_alive(0);
|
||||
test.check_log_err(0, "due to authentication failure", false);
|
||||
test.check_log_err(0, "fatal signal 11", false);
|
||||
test.check_log_err(0, "due to handshake failure", false);
|
||||
test.check_log_err(0, "Refresh rate limit exceeded for load of users' table", false);
|
||||
test.log_excludes(0, "due to authentication failure");
|
||||
test.log_excludes(0, "due to handshake failure");
|
||||
test.log_excludes(0, "Refresh rate limit exceeded for load of users' table");
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ int main(int argc, char* argv[])
|
||||
Test->set_timeout(30);
|
||||
Test->maxscales->restart_maxscale(0);
|
||||
Test->set_timeout(30);
|
||||
Test->check_log_err(0, (char*) "Opening file '/etc/maxscale.cnf' for reading failed", true);
|
||||
Test->log_includes(0, "Opening file '/etc/maxscale.cnf' for reading failed");
|
||||
Test->set_timeout(30);
|
||||
Test->maxscales->ssh_node_f(0, true, "chmod 777 /etc/maxscale.cnf");
|
||||
|
||||
|
||||
@ -81,7 +81,6 @@ int main(int argc, char* argv[])
|
||||
sht_rst_service();
|
||||
|
||||
Test->check_maxscale_alive(0);
|
||||
Test->check_log_err(0, (char*) "received fatal signal", false);
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
return rval;
|
||||
|
||||
@ -75,7 +75,6 @@ int main(int argc, char* argv[])
|
||||
sleep(1);
|
||||
test->check_maxscale_alive(0);
|
||||
|
||||
test->check_log_err(0, "Fatal", false);
|
||||
int rval = test->global_result;
|
||||
delete test;
|
||||
return rval;
|
||||
|
||||
@ -71,7 +71,7 @@ int main(int argc, char* argv[])
|
||||
do_query(test, false);
|
||||
|
||||
test->check_maxscale_alive(0);
|
||||
test->check_log_err(0, "Fatal", false);
|
||||
|
||||
int rval = test->global_result;
|
||||
delete test;
|
||||
return rval;
|
||||
|
||||
@ -86,7 +86,7 @@ int main(int argc, char* argv[])
|
||||
sleep(1);
|
||||
|
||||
test->check_maxscale_alive(0);
|
||||
test->check_log_err(0, "Fatal", false);
|
||||
|
||||
int rval = test->global_result;
|
||||
delete test;
|
||||
return rval;
|
||||
|
||||
@ -39,7 +39,6 @@ int main(int argc, char* argv[])
|
||||
Test->add_result(Test->create_connections(0, 70, true, true, true, true),
|
||||
"Connections creation error \n");
|
||||
|
||||
Test->check_log_err(0, (char*) "fatal signal 11", false);
|
||||
Test->check_maxscale_alive(0);
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -80,7 +80,7 @@ int main(int argc, char* argv[])
|
||||
printf("Changing master back to node 0\n");
|
||||
Test->repl->change_master(0, 1);
|
||||
|
||||
Test->check_log_err(0, (char*) "The service 'CLI' is missing a definition of the servers", false);
|
||||
Test->log_excludes(0, "The service 'CLI' is missing a definition of the servers");
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -28,7 +28,7 @@ int main(int argc, char* argv[])
|
||||
"Query should fail when duplicate table is found.");
|
||||
test.stop_timeout();
|
||||
sleep(10);
|
||||
test.check_log_err(0, (char*) "Duplicate tables found", true);
|
||||
test.log_includes(0, "Duplicate tables found");
|
||||
test.repl->execute_query_all_nodes("DROP DATABASE IF EXISTS duplicate");
|
||||
test.repl->execute_query_all_nodes("START SLAVE");
|
||||
return test.global_result;
|
||||
|
||||
@ -232,7 +232,7 @@ int main(int argc, char* argv[])
|
||||
sleep(15);
|
||||
|
||||
Test->tprintf("Cheching Maxscale logs");
|
||||
Test->check_log_err(0, (char*) "Cannot execute file", true);
|
||||
Test->log_includes(0, "Cannot execute file");
|
||||
|
||||
Test->tprintf("checking if Maxscale is alive");
|
||||
Test->check_maxscale_alive(0);
|
||||
|
||||
@ -48,7 +48,7 @@ int main(int argc, char* argv[])
|
||||
test.tprintf("Execute one more session command and expect message in error log");
|
||||
execute_query(test.maxscales->conn_rwsplit[0], "set @test=11");
|
||||
sleep(1);
|
||||
test.check_log_err(0, "Router session exceeded session command history limit", true);
|
||||
test.log_includes(0, "Router session exceeded session command history limit");
|
||||
test.maxscales->close_maxscale_connections(0);
|
||||
|
||||
return test.global_result;
|
||||
|
||||
@ -45,9 +45,9 @@ int main(int argc, char* argv[])
|
||||
test.start_binlog(0);
|
||||
test_binlog(&test);
|
||||
|
||||
test.check_log_err(0, "SET NAMES utf8mb4", false);
|
||||
test.check_log_err(0, "set autocommit=1", false);
|
||||
test.check_log_err(0, "select USER()", false);
|
||||
test.log_excludes(0, "SET NAMES utf8mb4");
|
||||
test.log_excludes(0, "set autocommit=1");
|
||||
test.log_excludes(0, "select USER()");
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
@ -28,9 +28,9 @@ int main(int argc, char* argv[])
|
||||
Test->start_binlog(0);
|
||||
test_binlog(Test);
|
||||
|
||||
Test->check_log_err(0, "SET NAMES utf8mb4", false);
|
||||
Test->check_log_err(0, "set autocommit=1", false);
|
||||
Test->check_log_err(0, "select USER()", false);
|
||||
Test->log_excludes(0, "SET NAMES utf8mb4");
|
||||
Test->log_excludes(0, "set autocommit=1");
|
||||
Test->log_excludes(0, "select USER()");
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
@ -143,9 +143,9 @@ int main(int argc, char* argv[])
|
||||
mysql_close(conn);
|
||||
|
||||
Test->stop_timeout();
|
||||
Test->check_log_err(0, (char*) "Length (0) is 0", false);
|
||||
Test->check_log_err(0, (char*) "Unable to parse query", false);
|
||||
Test->check_log_err(0, (char*) "query string allocation failed", false);
|
||||
Test->log_excludes(0, "Length (0) is 0");
|
||||
Test->log_excludes(0, "Unable to parse query");
|
||||
Test->log_excludes(0, "query string allocation failed");
|
||||
|
||||
Test->repl->connect();
|
||||
/** Cleanup */
|
||||
|
||||
@ -22,8 +22,7 @@ int main(int argc, char* argv[])
|
||||
Test->maxscales->execute_maxadmin_command(0, (char*) "show monitors");
|
||||
sleep(5);
|
||||
// Servers should get the Auth Error state when credentials are bad
|
||||
Test->check_log_err(0, (char*) "Auth Error, Down", true);
|
||||
Test->check_log_err(0, (char*) "fatal signal 11", false);
|
||||
Test->log_includes(0, "Auth Error, Down");
|
||||
|
||||
Test->check_maxscale_processes(0, 1);
|
||||
|
||||
|
||||
@ -102,9 +102,9 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
Test->stop_timeout();
|
||||
Test->check_log_err(0, (char*) "Length (0) is 0", false);
|
||||
Test->check_log_err(0, (char*) "Unable to parse query", false);
|
||||
Test->check_log_err(0, (char*) "query string allocation failed", false);
|
||||
Test->log_excludes(0, "Length (0) is 0");
|
||||
Test->log_excludes(0, "Unable to parse query");
|
||||
Test->log_excludes(0, "query string allocation failed");
|
||||
|
||||
Test->check_maxscale_alive(0);
|
||||
|
||||
|
||||
@ -1291,77 +1291,6 @@ static int read_log(const char* name, char** err_log_content_p)
|
||||
}
|
||||
}
|
||||
|
||||
void TestConnections::check_log_err(int m, const char* err_msg, bool expected)
|
||||
{
|
||||
|
||||
char* err_log_content;
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
tprintf("Getting logs");
|
||||
}
|
||||
char sys1[4096];
|
||||
char dest[1024];
|
||||
char log_file[64];
|
||||
set_timeout(500);
|
||||
sprintf(dest, "maxscale_log_%03d/", m);
|
||||
sprintf(&sys1[0],
|
||||
"mkdir -p maxscale_log_%03d; rm -f %s*.log",
|
||||
m,
|
||||
dest);
|
||||
|
||||
system(sys1);
|
||||
sprintf(sys1, "%s/*", maxscales->maxscale_log_dir[m]);
|
||||
maxscales->copy_from_node(m, sys1, dest);
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
tprintf("Reading maxscale.log");
|
||||
}
|
||||
sprintf(log_file, "maxscale_log_%03d/maxscale.log", m);
|
||||
if (read_log(log_file, &err_log_content) != 0 || strlen(err_log_content) < 2)
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
tprintf("Reading maxscale1.log");
|
||||
}
|
||||
sprintf(log_file, "maxscale_log_%03d/maxscale1.log", m);
|
||||
free(err_log_content);
|
||||
if (read_log(log_file, &err_log_content) != 0)
|
||||
{
|
||||
add_result(1, "Error reading log");
|
||||
}
|
||||
}
|
||||
|
||||
if (err_log_content != NULL)
|
||||
{
|
||||
if (expected)
|
||||
{
|
||||
if (strstr(err_log_content, err_msg) == NULL)
|
||||
{
|
||||
add_result(1, "There is NO \"%s\" error in the log", err_msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
tprintf("There is a proper \"%s \" error in the log", err_msg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strstr(err_log_content, err_msg) != NULL)
|
||||
{
|
||||
add_result(1, "There is an UNEXPECTED \"%s\" error in the log", err_msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
tprintf("There are no unxpected \"%s \" errors in the log", err_msg);
|
||||
}
|
||||
}
|
||||
|
||||
free(err_log_content);
|
||||
}
|
||||
}
|
||||
|
||||
int TestConnections::find_connected_slave(int m, int* global_result)
|
||||
{
|
||||
int conn_num;
|
||||
|
||||
@ -451,15 +451,6 @@ public:
|
||||
|
||||
int check_t1_table(int m, bool presence, char* db);
|
||||
|
||||
/**
|
||||
* @brief CheckLogErr Reads error log and tried to search for given string
|
||||
* @param err_msg Error message to search in the log
|
||||
* @param expected TRUE if err_msg is expedted in the log, false if err_msg should NOT be in the log
|
||||
* @return 0 if (err_msg is found AND expected is TRUE) OR (err_msg is NOT found in the log AND expected
|
||||
* is false)
|
||||
*/
|
||||
void check_log_err(int m, const char* err_msg, bool expected);
|
||||
|
||||
/**
|
||||
* @brief Check whether logs match a pattern
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user