From 1cc138958e312e4b252691a97f9ee2eafec0de1f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 16 Mar 2025 11:26:30 +0100 Subject: [PATCH] MDEV-35727 main.mysql-interactive fails in buildbot on debian fix failing main.mysql-interactive * increase socat EOF timeout from 0.5s to 10s * add an explicit exit to not wait 10s (or even 0.5s - the test now finishes in 0.15s) * enable it for libedit --- mysql-test/main/mysql-interactive.result | 4 +++- mysql-test/main/mysql-interactive.test | 11 ++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/mysql-test/main/mysql-interactive.result b/mysql-test/main/mysql-interactive.result index a18c018b932..cdb0931418a 100644 --- a/mysql-test/main/mysql-interactive.result +++ b/mysql-test/main/mysql-interactive.result @@ -4,6 +4,7 @@ delimiter $ select 1; $ +exit Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is X Server version: Y @@ -21,4 +22,5 @@ MariaDB [(none)]> select 1; +---+ 1 row in set -MariaDB [(none)]> \ No newline at end of file +MariaDB [(none)]> exit +Bye diff --git a/mysql-test/main/mysql-interactive.test b/mysql-test/main/mysql-interactive.test index 0051d8e58c6..e387f937226 100644 --- a/mysql-test/main/mysql-interactive.test +++ b/mysql-test/main/mysql-interactive.test @@ -6,23 +6,16 @@ source include/not_windows.inc; # this would need an instrumented ncurses library source include/not_msan.inc; -error 0,1; -exec $MYSQL -V|grep -q readline; -if ($sys_errno == 1) -{ - # strangely enough - skip does not work with libedit; -} - write_file $MYSQL_TMP_DIR/mysql_in; delimiter $ select 1; $ +exit EOF let TERM=dumb; replace_regex /id is \d+/id is X/ /Server version: .*/Server version: Y/ / \(\d+\.\d+ sec\)//; error 0,127; -exec socat EXEC:"$MYSQL",pty STDIO < $MYSQL_TMP_DIR/mysql_in; +exec socat -t10 EXEC:"$MYSQL",pty STDIO < $MYSQL_TMP_DIR/mysql_in; if ($sys_errno == 127) { remove_file $MYSQL_TMP_DIR/mysql_in;