mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
client_test.test:
Run client_test as a testcase new file mysql-test-run.sh: More clearly report failure if --force, also exit 1 client_test.c: Use MAXPATHLEN in test_frm_bug() Renable test cases disabled for running from mysql-test-run mysqltest.c: Don't check errno from popen, may not be set client/mysqltest.c: Don't check errno from popen, may not be set tests/client_test.c: Use MAXPATHLEN in test_frm_bug() Renable test cases disabled for running from mysql-test-run mysql-test/mysql-test-run.sh: More clearly report failure if --force, also exit 1 mysql-test/t/client_test.test: Run client_test as a testcase
This commit is contained in:
@ -847,7 +847,7 @@ int do_source(struct st_query* q)
|
||||
static void do_exec(struct st_query* q)
|
||||
{
|
||||
int error;
|
||||
DYNAMIC_STRING *ds = NULL; /* Assign just to avoid warning */
|
||||
DYNAMIC_STRING *ds= NULL; /* Assign just to avoid warning */
|
||||
DYNAMIC_STRING ds_tmp;
|
||||
char buf[1024];
|
||||
FILE *res_file;
|
||||
@ -889,7 +889,7 @@ static void do_exec(struct st_query* q)
|
||||
error= pclose(res_file);
|
||||
|
||||
if (error != 0)
|
||||
die("command \"%s\" failed: %s", cmd, errno);
|
||||
die("command \"%s\" failed", cmd);
|
||||
|
||||
if (!disable_result_log)
|
||||
{
|
||||
|
@ -208,6 +208,7 @@ MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
|
||||
MYSQL_MANAGER_USER=root
|
||||
NO_SLAVE=0
|
||||
USER_TEST=
|
||||
FAILED_CASES=
|
||||
|
||||
EXTRA_MASTER_OPT=""
|
||||
EXTRA_MYSQL_TEST_OPT=""
|
||||
@ -1376,7 +1377,7 @@ run_testcase ()
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FAILED_CASES="$FAILED_CASES $tname"
|
||||
if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
|
||||
then
|
||||
mysql_restart
|
||||
@ -1562,4 +1563,10 @@ $ECHO
|
||||
[ "$DO_GCOV" ] && gcov_collect # collect coverage information
|
||||
[ "$DO_GPROF" ] && gprof_collect # collect coverage information
|
||||
|
||||
exit 0
|
||||
if [ $TOT_FAIL -ne 0 ]; then
|
||||
$ECHO "mysql-test-run: *** Failing the test(s):$FAILED_CASES"
|
||||
$ECHO
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
2
mysql-test/t/client_test.test
Normal file
2
mysql-test/t/client_test.test
Normal file
@ -0,0 +1,2 @@
|
||||
-- disable_result_log
|
||||
--exec ../tests/client_test --testcase --user=root --socket=var/tmp/master.sock --port=$MYSQL_TCP_PORT
|
@ -28,6 +28,7 @@
|
||||
#include <m_string.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
/* Include to get MAXPATHLEN */
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
@ -6588,7 +6589,7 @@ static void test_frm_bug()
|
||||
|
||||
bind[0].buffer_type= MYSQL_TYPE_STRING;
|
||||
bind[0].buffer= data_dir;
|
||||
bind[0].buffer_length= NAME_LEN;
|
||||
bind[0].buffer_length= MAXPATHLEN;
|
||||
bind[0].is_null= 0;
|
||||
bind[0].length= 0;
|
||||
bind[1]= bind[0];
|
||||
@ -10454,7 +10455,7 @@ static struct my_option client_test_long_options[] =
|
||||
(char **) &opt_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection", (char **) &opt_unix_socket,
|
||||
(char **) &opt_unix_socket, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"testcase", 'c', "Runs as mysql-test-run testcase.",
|
||||
{"testcase", 'c', "May disable some code when runs as mysql-test-run testcase.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"count", 't', "Number of times test to be executed", (char **) &opt_count,
|
||||
(char **) &opt_count, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
||||
@ -10642,8 +10643,7 @@ int main(int argc, char **argv)
|
||||
test_warnings(); /* show warnings test */
|
||||
test_errors(); /* show errors test */
|
||||
test_prepare_resultset();/* prepare meta info test */
|
||||
if (!opt_testcase) /* FIXME: skipped because it hangs */
|
||||
test_stmt_close(); /* mysql_stmt_close() test -- hangs */
|
||||
test_stmt_close(); /* mysql_stmt_close() test -- hangs */
|
||||
test_prepare_field_result(); /* prepare meta info */
|
||||
test_multi_stmt(); /* multi stmt test */
|
||||
test_multi_statements();/* test multi statement execution */
|
||||
@ -10671,8 +10671,7 @@ int main(int argc, char **argv)
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
test_prepare_grant(); /* Test the GRANT command, bug #89 */
|
||||
#endif
|
||||
if (!opt_testcase) /* FIXME: skipped because it fails */
|
||||
test_frm_bug(); /* test the crash when .frm is invalid, bug #93 */
|
||||
test_frm_bug(); /* test the crash when .frm is invalid, bug #93 */
|
||||
test_explain_bug(); /* test for the EXPLAIN, bug #115 */
|
||||
test_decimal_bug(); /* test for the decimal bug */
|
||||
test_nstmts(); /* test n statements */
|
||||
@ -10735,8 +10734,7 @@ int main(int argc, char **argv)
|
||||
dates in the server */
|
||||
test_bug5399(); /* check that statement id uniquely identifies
|
||||
statement */
|
||||
if (!opt_testcase)
|
||||
test_bug5194(); /* bulk inserts in prepared mode */
|
||||
test_bug5194(); /* bulk inserts in prepared mode */
|
||||
test_bug5315(); /* check that mysql_change_user closes all
|
||||
prepared statements */
|
||||
/*
|
||||
|
Reference in New Issue
Block a user