pgsql: Add more TAP test coverage for pg_dump.
От | Tom Lane |
---|---|
Тема | pgsql: Add more TAP test coverage for pg_dump. |
Дата | |
Msg-id | E1v9RFE-0020YV-2K@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Add more TAP test coverage for pg_dump. Add a test case to cover pg_dump with --compress=none. This brings the coverage of compress_none.c up from about 64% to 90%, in particular covering the new code added in a previous patch. Include compression of toc.dat in manually-compressed test cases. We would have found the bug fixed in commit a239c4a0c much sooner if we'd done this. As far as I can tell, this doesn't reduce test coverage at all, since there are other tests of directory format that still use an uncompressed toc.dat. Widen the wide row used to verify correct (de) compression. Commit 1a05c1d25 advises us (not without reason) to ensure that this test case fully fills DEFAULT_IO_BUFFER_SIZE, so that loops within the compression logic will iterate completely. To follow that advice with the proposed DEFAULT_IO_BUFFER_SIZE of 128K, we need something close to this. This does indeed increase the reported code coverage by a few lines. While here, fix a glitch that I noticed in testing: the $glob_patterns tests were incapable of failing, because glob() will return 'foo' as 'foo' whether there is a matching file or not. (Indeed, the stanza just above that one relies on that.) In my testing, this patch adds approximately as much runtime as was saved by the previous patch, so that it's about a wash compared to the old code. However, we get better test coverage. Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/3515357.1760128017@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/20ec9958921af9698e88d6f006c49a4d9d28f210 Modified Files -------------- src/bin/pg_dump/t/002_pg_dump.pl | 8 +++- src/bin/pg_dump/t/006_pg_dump_compress.pl | 66 +++++++++++++++++++++---------- 2 files changed, 52 insertions(+), 22 deletions(-)
В списке pgsql-committers по дате отправления: