maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #02004
Fix for 2 failing tests on Windows
Hello,
Some tests that call mtr.add_suppression to ignore expected warnings
hard-code the forward slash '/' character as the expected path
delimiter. This breaks tests on Windows as the regex does not match as
expected.
E.g.
Recovering table: './mysqltest/t_corrupted2'
fails to match
100123 23:48:26 [Warning] Recovering table: '.\mysqltest\t_corrupted2'
and hence the test fails spuriously.
Attached is a simple patch that fixes this issue while maintaining
compatibility with other platforms.
Let me know what you think.
- Alex
PS. From the Windows buildbot test logs[1], only these two tests are
observed to fail in this way.
[1]
http://askmonty.org/buildbot/builders/win32-tarball/builds/238/steps/test/logs/stdio
=== modified file 'mysql-test/suite/maria/r/maria-recover.result'
--- mysql-test/suite/maria/r/maria-recover.result 2009-02-19 09:01:25 +0000
+++ mysql-test/suite/maria/r/maria-recover.result 2010-01-23 13:07:08 +0000
@@ -1,6 +1,3 @@
-call mtr.add_suppression("Checking table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Recovering table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted2' is marked as crashed and should be repaired");
select @@global.maria_recover;
@@global.maria_recover
BACKUP
=== modified file 'mysql-test/suite/maria/t/maria-recover.test'
--- mysql-test/suite/maria/t/maria-recover.test 2009-10-09 08:09:24 +0000
+++ mysql-test/suite/maria/t/maria-recover.test 2010-01-23 13:14:48 +0000
@@ -2,9 +2,13 @@
--source include/have_maria.inc
-call mtr.add_suppression("Checking table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Recovering table: '.\/mysqltest\/t_corrupted2'");
-call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted2' is marked as crashed and should be repaired");
+--disable_query_log
+# Note: \\. matches a single period. We use '.' as directory separator to
+# account for Unix and Windows variation.
+call mtr.add_suppression("Checking table: '\\..mysqltest.t_corrupted2'");
+call mtr.add_suppression("Recovering table: '\\..mysqltest.t_corrupted2'");
+call mtr.add_suppression("Table '\\..mysqltest.t_corrupted2' is marked as crashed and should be repaired");
+--enable_query_log
# Note: we're setting an environment variable (not prefixing it by $),
# so that the perl code below can access it.
=== modified file 'mysql-test/suite/parts/r/partition_recover_myisam.result'
--- mysql-test/suite/parts/r/partition_recover_myisam.result 2009-08-29 21:29:47 +0000
+++ mysql-test/suite/parts/r/partition_recover_myisam.result 2010-01-23 13:27:08 +0000
@@ -1,5 +1,3 @@
-call mtr.add_suppression("./test/t1_will_crash");
-call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES;
=== modified file 'mysql-test/suite/parts/t/partition_recover_myisam.test'
--- mysql-test/suite/parts/t/partition_recover_myisam.test 2009-12-03 11:19:05 +0000
+++ mysql-test/suite/parts/t/partition_recover_myisam.test 2010-01-23 13:26:55 +0000
@@ -1,7 +1,9 @@
# test the auto-recover (--myisam-recover) of partitioned myisam tables
-call mtr.add_suppression("./test/t1_will_crash");
+--disable_query_log
+call mtr.add_suppression("..test.t1_will_crash");
call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
+--enable_query_log
--source include/have_partition.inc
--disable_warnings
Follow ups