From 25da524c41bad14d24cc42e501497e6e7ab43a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Mon, 12 Jun 2023 09:41:02 +0000 Subject: [PATCH] Adding plan() in several TAP tests --- .gitignore | 2 ++ test/tap/tests/reg_test_3273_ssl_con-t.cpp | 2 ++ .../tap/tests/reg_test_3427-stmt_first_comment1-t.cpp | 11 +++++++++++ .../tap/tests/reg_test_3549-autocommit_tracking-t.cpp | 2 ++ test/tap/tests/reg_test_3765_ssl_pollout-t.cpp | 1 + test/tap/tests/reg_test_3847_admin_lock-t.cpp | 1 + .../test_com_binlog_dump_enables_fast_forward-t.cpp | 2 ++ test/tap/tests/test_connection_annotation-t.cpp | 1 + 8 files changed, 22 insertions(+) diff --git a/.gitignore b/.gitignore index de21ed59e..fddb174cd 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,8 @@ test/tap/tests/reg_test_3504-change_user_libmysql_helper test/tap/tests/generate_set_session_csv test/tap/tests/set_testing-240.csv local_testing_datadir/ +test/tap/tests_with_deps/deprecate_eof_support/fwd_eof_ok_query +test/tap/tests_with_deps/deprecate_eof_support/fwd_eof_query test/cluster/node??/* diff --git a/test/tap/tests/reg_test_3273_ssl_con-t.cpp b/test/tap/tests/reg_test_3273_ssl_con-t.cpp index 8ef1c920b..c2479a3db 100644 --- a/test/tap/tests/reg_test_3273_ssl_con-t.cpp +++ b/test/tap/tests/reg_test_3273_ssl_con-t.cpp @@ -80,6 +80,8 @@ int main(int argc, char** argv) { return -1; } + plan(1); + // set a traffic rule introducing the proper delay to reproduce the issue int tc_err = system("sudo -n tc qdisc add dev lo root netem delay 1000ms"); if (tc_err) { diff --git a/test/tap/tests/reg_test_3427-stmt_first_comment1-t.cpp b/test/tap/tests/reg_test_3427-stmt_first_comment1-t.cpp index e59c166dc..4b03f23fd 100644 --- a/test/tap/tests/reg_test_3427-stmt_first_comment1-t.cpp +++ b/test/tap/tests/reg_test_3427-stmt_first_comment1-t.cpp @@ -67,6 +67,8 @@ int main(int argc, char** argv) { return -1; } + plan(5*RESET_CONNECTION_QUERIES); + bool param = false; { // we parse argv[0] to see if filename includes "param" @@ -162,12 +164,15 @@ int main(int argc, char** argv) { res = EXIT_FAILURE; goto exit; } + ok(stmt != NULL , "mysql_stmt_init() succeeded"); if (mysql_stmt_prepare(stmt, query.c_str(), strlen(query.c_str()))) { diag("mysql_stmt_prepare at line %d failed: %s", __LINE__ , mysql_error(proxysql_mysql)); mysql_close(proxysql_mysql); res = EXIT_FAILURE; goto exit; + } else { + ok(1,"mysql_stmt_prepare() succeeded"); } if (param) { @@ -196,6 +201,8 @@ int main(int argc, char** argv) { ); res = EXIT_FAILURE; goto exit; + } else { + ok(1,"mysql_stmt_execute() succeeded"); } MYSQL_BIND bind[3]; @@ -233,6 +240,8 @@ int main(int argc, char** argv) { ); res = EXIT_FAILURE; goto exit; + } else { + ok(1,"mysql_stmt_bind_result() succeeded"); } if (mysql_stmt_fetch(stmt) == 1) { @@ -242,6 +251,8 @@ int main(int argc, char** argv) { ); res = EXIT_FAILURE; goto exit; + } else { + ok(1,"mysql_stmt_fetch() succeeded"); } bool data_match_expected = diff --git a/test/tap/tests/reg_test_3549-autocommit_tracking-t.cpp b/test/tap/tests/reg_test_3549-autocommit_tracking-t.cpp index d035c691e..65656a4b7 100644 --- a/test/tap/tests/reg_test_3549-autocommit_tracking-t.cpp +++ b/test/tap/tests/reg_test_3549-autocommit_tracking-t.cpp @@ -282,6 +282,8 @@ int main(int argc, char** argv) { return -1; } + plan(test_definitions.size()); + for (const auto& test_def : test_definitions) { MYSQL* proxysql_mysql = mysql_init(NULL); if (!mysql_real_connect(proxysql_mysql, cl.host, cl.username, cl.password, NULL, cl.port, NULL, 0)) { diff --git a/test/tap/tests/reg_test_3765_ssl_pollout-t.cpp b/test/tap/tests/reg_test_3765_ssl_pollout-t.cpp index 539fd4ea8..e851505bb 100644 --- a/test/tap/tests/reg_test_3765_ssl_pollout-t.cpp +++ b/test/tap/tests/reg_test_3765_ssl_pollout-t.cpp @@ -105,6 +105,7 @@ int main(int argc, char** argv) { return -1; } + plan(3); uint32_t idle_cpu_ms = 0; uint32_t final_cpu_ms = 0; diff --git a/test/tap/tests/reg_test_3847_admin_lock-t.cpp b/test/tap/tests/reg_test_3847_admin_lock-t.cpp index e03a1788d..8fad233ef 100644 --- a/test/tap/tests/reg_test_3847_admin_lock-t.cpp +++ b/test/tap/tests/reg_test_3847_admin_lock-t.cpp @@ -31,6 +31,7 @@ int main(int argc, char** argv) { return EXIT_FAILURE; } + plan(3); bool stop = false; int q_load_res = -1; int q_globals_res = -1; diff --git a/test/tap/tests/test_com_binlog_dump_enables_fast_forward-t.cpp b/test/tap/tests/test_com_binlog_dump_enables_fast_forward-t.cpp index e846d4d60..581cf39bf 100644 --- a/test/tap/tests/test_com_binlog_dump_enables_fast_forward-t.cpp +++ b/test/tap/tests/test_com_binlog_dump_enables_fast_forward-t.cpp @@ -12,6 +12,8 @@ int main(int argc, char** argv) { CommandLine cl; + plan(1); + if (cl.getEnv()) { diag("Failed to get the required environmental variables."); return -1; diff --git a/test/tap/tests/test_connection_annotation-t.cpp b/test/tap/tests/test_connection_annotation-t.cpp index 662f9f0ae..0ac417b2d 100644 --- a/test/tap/tests/test_connection_annotation-t.cpp +++ b/test/tap/tests/test_connection_annotation-t.cpp @@ -25,6 +25,7 @@ int main(int argc, char** argv) { return -1; } + plan(1); MYSQL* proxysql_mysql = mysql_init(NULL); MYSQL* proxysql_admin = mysql_init(NULL);