summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2018-03-15 15:34:45 +0400
committerSergey Vojtovich <svoj@mariadb.org>2018-03-16 13:26:52 +0400
commit0a534348c75cf435d2017959855de2efa798fd0b (patch)
tree48c7ee2f194ccf375877e4be7014c56e6adf8601 /tests
parent7033af9e81a69d75199faa028f8959667f755551 (diff)
downloadmariadb-git-0a534348c75cf435d2017959855de2efa798fd0b.tar.gz
MDEV-14265 - RPMLint warning: shared-lib-calls-exit
Eliminated last exit() call from libmysqld.
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 b7211989f1f..71fb3894b3c 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -1409,8 +1409,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 c367e7ca35d..b63bcbaa037 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -7095,11 +7095,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);
@@ -7147,12 +7143,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);