summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_fw.c3
-rw-r--r--tests/mysql_client_test.c13
-rw-r--r--tests/thread_test.c4
3 files changed, 5 insertions, 15 deletions
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
index bf06e2b502b..f69eb28a287 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -1410,8 +1410,7 @@ int main(int argc, char **argv)
for (i= 0; i < argc; i++)
original_argv[i]= strdup(argv[i]);
- if (load_defaults("my", client_test_load_default_groups, &argc, &argv))
- exit(1);
+ load_defaults_or_exit("my", client_test_load_default_groups, &argc, &argv);
get_options(&argc, &argv);
/* Set main opt_count. */
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 741e1e53532..99cee8f7ed4 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -7109,11 +7109,7 @@ static void test_embedded_start_stop()
MY_INIT(argv[0]);
/* Load the client defaults from the .cnf file[s]. */
- if (load_defaults("my", client_test_load_default_groups, &argc, &argv))
- {
- myerror("load_defaults failed");
- exit(1);
- }
+ load_defaults_or_exit("my", client_test_load_default_groups, &argc, &argv);
/* Parse the options (including the ones given from defaults files). */
get_options(&argc, &argv);
@@ -7161,12 +7157,7 @@ static void test_embedded_start_stop()
MY_INIT(argv[0]);
- if (load_defaults("my", client_test_load_default_groups, &argc, &argv))
- {
- myerror("load_defaults failed \n ");
- exit(1);
- }
-
+ load_defaults_or_exit("my", client_test_load_default_groups, &argc, &argv);
get_options(&argc, &argv);
/* Must start the main embedded server again after the test. */
diff --git a/tests/thread_test.c b/tests/thread_test.c
index bf0fb8ea2c0..38e453e9cb8 100644
--- a/tests/thread_test.c
+++ b/tests/thread_test.c
@@ -168,8 +168,8 @@ static void get_options(int argc, char **argv)
{
int ho_error;
- if ((ho_error= load_defaults("my",load_default_groups,&argc,&argv)) ||
- (ho_error= handle_options(&argc, &argv, my_long_options, get_one_option)))
+ load_defaults_or_exit("my", load_default_groups, &argc, &argv);
+ if ((ho_error= handle_options(&argc, &argv, my_long_options, get_one_option)))
exit(ho_error);
free_defaults(argv);