From ff0592132f7e1f9b871a1afb4aa23da96dc189f8 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 14 Jan 2018 15:02:28 +0000 Subject: [PATCH] Testsuite: MySQL portability --- test/runtest | 5 +++++ test/scripts/2610-MySQL/2610 | 7 ++++++- test/scripts/2620-Postgresql/2620 | 2 ++ test/stderr/2610 | 2 -- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/test/runtest b/test/runtest index 5671fead2..1b6e0d628 100755 --- a/test/runtest +++ b/test/runtest @@ -1126,6 +1126,11 @@ RESET_AFTER_EXTRA_LINE_READ: s/^(returned from EXIM_DBOPEN: )(0x)?[0-9a-f]+/${1}0xAAAAAAAA/; s/^(EXIM_DBCLOSE.)(0x)?[0-9a-f]+/${1}0xAAAAAAAA/; + # Platform-dependent output during MySQL startup + next if /PerconaFT file system space/; + next if /^Waiting for MySQL server to answer/; + next if /mysqladmin: CREATE DATABASE failed; .* database exists/; + # When Exim is checking the size of directories for maildir, it uses # the check_dir_size() function to scan directories. Of course, the order # of the files that are obtained using readdir() varies from system to diff --git a/test/scripts/2610-MySQL/2610 b/test/scripts/2610-MySQL/2610 index f5765c094..e59c80822 100644 --- a/test/scripts/2610-MySQL/2610 +++ b/test/scripts/2610-MySQL/2610 @@ -1,9 +1,11 @@ # mysql lookups +# The mysql-devel (or equivalent) package will be need for Exim to build, and +# the mysql-server (or mariadb-server or equivalent) package for this test to run. # # first, populate a DB to test against sudo rm -fr DIR/mysql perl -system 'mysql_install_db --datadir=DIR/mysql'; +system 'mysql_install_db --no-defaults --datadir=DIR/mysql --user=CALLER'; **** sudo rm test-stdout test-stderr # @@ -24,6 +26,9 @@ system 'mysql --protocol=TCP -P PORT_N -u root -D test \ INSERT INTO them VALUES ( CONCAT(\'before\', CHAR(13), CHAR(10), \'after\'), \'newline\' ); \ INSERT INTO them VALUES ( CONCAT(\'x\', CHAR(9), \'x\'), \'tab\' ); \ INSERT INTO them VALUES ( CONCAT(CHAR(39), \'stquot\'), \'quote1\' ); \ + CREATE USER IF NOT EXISTS \'root\'@\'HOSTIPV4\', \'CALLER\'@\'HOSTIPV4\'; \ + GRANT ALL ON *.* TO \'root\'@\'HOSTIPV4\'; \ + GRANT ALL ON *.* TO \'CALLER\'@\'HOSTIPV4\'; \ "'; **** sudo rm test-stderr-server diff --git a/test/scripts/2620-Postgresql/2620 b/test/scripts/2620-Postgresql/2620 index cf45726f4..1f8f3abe1 100644 --- a/test/scripts/2620-Postgresql/2620 +++ b/test/scripts/2620-Postgresql/2620 @@ -1,4 +1,6 @@ # pgsql lookups +# The pgsql-devel (or equivalent) package will be need for Exim to build, and +# the postgresql-server (or equivalent) package for this test to run. # # first, populate a DB to test against sudo rm -fr DIR/pgsql diff --git a/test/stderr/2610 b/test/stderr/2610 index 60d964387..57dda8a07 100644 --- a/test/stderr/2610 +++ b/test/stderr/2610 @@ -1,5 +1,3 @@ -Tue Mar 02 09:44:33 1999 PerconaFT file system space is low -mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'test'; database exists' Exim version x.yz .... configuration file is TESTSUITE/test-config admin user -- 2.30.2