diff options
author | Michael Widenius <monty@askmonty.org> | 2012-06-05 14:09:18 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-06-05 14:09:18 +0300 |
commit | 56ea8e9c0539a4dc95659ab4ba4b94956c7119e7 (patch) | |
tree | f1064496ed78c4ee1c4270ede3dcba94cf1a02ec /unittest | |
parent | b889f6999367c9415f5806d2ea6ec104387ba1ff (diff) | |
download | mariadb-git-56ea8e9c0539a4dc95659ab4ba4b94956c7119e7.tar.gz |
Fixed build failures found by buildbot
- Added suppression of warnings
- Fixed some test cases
BUILD/FINISH.sh:
Added AM_EXTRA_MAKEFLAGS
BUILD/SETUP.sh:
Added option --extra-makeflags
client/mysqldump.c:
Added suppression
mysql-test/r/mysql.result:
Updated results
mysql-test/r/mysql_upgrade.result:
Updated results
mysql-test/r/partition_innodb_plugin.result:
Updated results
mysql-test/r/partition_open_files_limit.result:
Updated results
mysql-test/r/symlink.result:
Updated results
mysql-test/suite/innodb/r/innodb-create-options.result:
Updated results
mysql-test/suite/innodb/t/innodb-create-options.test:
Don't print error message (as it's varies on different system)
mysql-test/t/mysql.test:
Don't print error message (as it's varies on different system)
mysql-test/t/mysql_upgrade.test:
Fixed checking of error number
mysql-test/t/partition_innodb_plugin.test:
Don't print error message (as it's varies on different system)
plugin/semisync/semisync_master.cc:
Added suppression
sql/ha_partition.cc:
Added suppression
sql/item_subselect.cc:
Added suppression
sql/multi_range_read.cc:
Added suppression
sql/sql_parse.cc:
Added suppression
sql/sql_select.cc:
Added suppression
storage/innobase/handler/ha_innodb.cc:
Removed not used variable
storage/maria/ma_delete.c:
Added suppression
storage/maria/ma_key_recover.c:
Added suppression
storage/maria/ma_write.c:
Added suppression
strings/ctype-ucs2.c:
Added suppression
support-files/compiler_warnings.supp:
Added suppressions
unittest/mysys/my_vsnprintf-t.c:
Fixed test case with %M to also work on Solaris
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/mysys/my_vsnprintf-t.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/unittest/mysys/my_vsnprintf-t.c b/unittest/mysys/my_vsnprintf-t.c index 3131068b4c3..db0139945f4 100644 --- a/unittest/mysys/my_vsnprintf-t.c +++ b/unittest/mysys/my_vsnprintf-t.c @@ -19,7 +19,7 @@ char buf[1024]; /* let's hope that's enough */ -void test1(const char *res, const char *fmt, ...) +static void test1(const char *res, const char *fmt, ...) { va_list args; size_t len; @@ -29,6 +29,26 @@ void test1(const char *res, const char *fmt, ...) ok(strlen(res) == len && strcmp(buf, res) == 0, "\"%s\"", buf); } +static void test_many(const char **res, const char *fmt, ...) +{ + va_list args; + size_t len; + va_start(args,fmt); + len= my_vsnprintf(buf, sizeof(buf)-1, fmt, args); + va_end(args); + + for (; *res ; res++) + { + if (strlen(*res) == len && strcmp(buf, *res) == 0) + { + ok(1, "\"%s\"", buf); + return; + } + } + ok(0, "\"%s\"", buf); +} + + int main(void) { plan(59); @@ -177,7 +197,16 @@ int main(void) test1("My `DDDD` test CCCC, `DDD`", "My %1$`s test %2$s, %1$`-.3s", "DDDD", "CCCC"); - test1("Error 1 - Operation not permitted", "Error %M", 1); + { + /* Test that %M works */ + const char *results[]= + { + "Error 1 - Operation not permitted", /* Linux */ + "Error 1 - Not Owner", /* Solaris */ + NullS + }; + test_many(results, "Error %M", 1); + } return exit_status(); } |