pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Restore test coverage of LZ4Stream_gets(). 3+ messages / 1 participants [nested] [flat]
* pgsql: Restore test coverage of LZ4Stream_gets(). @ 2025-10-11 20:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2025-10-11 20:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Restore test coverage of LZ4Stream_gets(). In commit a45c78e32 I removed the only regression test case that reaches this function, because it turns out that we only use it if reading an LZ4-compressed blobs.toc file in a directory dump, and that is a state that has to be created manually. That seems like a bad thing to not test, not so much for LZ4Stream_gets() itself as because it means the squirrely eol_flag logic in LZ4Stream_read_internal() is not tested. The reason for the change was that I thought the lz4 program did not have any way to perform compression without explicit specification of the output file name. However, it turns out that the syntax synopsis in its man page is a lie, and if you read enough of the man page you find out that with "-m" it will do what's needful. So restore the manual compression step in that test case. Noted while testing some proposed changes in pg_dump's compression logic. Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/3515357.1760128017@sss.pgh.pa.us Backpatch-through: 17 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/26d1cd375f156f68e12d51ba50e39ea46ea729ff Modified Files -------------- src/bin/pg_dump/t/002_pg_dump.pl | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Restore test coverage of LZ4Stream_gets(). @ 2025-10-11 20:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2025-10-11 20:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Restore test coverage of LZ4Stream_gets(). In commit a45c78e32 I removed the only regression test case that reaches this function, because it turns out that we only use it if reading an LZ4-compressed blobs.toc file in a directory dump, and that is a state that has to be created manually. That seems like a bad thing to not test, not so much for LZ4Stream_gets() itself as because it means the squirrely eol_flag logic in LZ4Stream_read_internal() is not tested. The reason for the change was that I thought the lz4 program did not have any way to perform compression without explicit specification of the output file name. However, it turns out that the syntax synopsis in its man page is a lie, and if you read enough of the man page you find out that with "-m" it will do what's needful. So restore the manual compression step in that test case. Noted while testing some proposed changes in pg_dump's compression logic. Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/3515357.1760128017@sss.pgh.pa.us Backpatch-through: 17 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/661b320ed4e0abf7063fc51597803cf3fdb13a85 Modified Files -------------- src/bin/pg_dump/t/002_pg_dump.pl | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Restore test coverage of LZ4Stream_gets(). @ 2025-10-11 20:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2025-10-11 20:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Restore test coverage of LZ4Stream_gets(). In commit a45c78e32 I removed the only regression test case that reaches this function, because it turns out that we only use it if reading an LZ4-compressed blobs.toc file in a directory dump, and that is a state that has to be created manually. That seems like a bad thing to not test, not so much for LZ4Stream_gets() itself as because it means the squirrely eol_flag logic in LZ4Stream_read_internal() is not tested. The reason for the change was that I thought the lz4 program did not have any way to perform compression without explicit specification of the output file name. However, it turns out that the syntax synopsis in its man page is a lie, and if you read enough of the man page you find out that with "-m" it will do what's needful. So restore the manual compression step in that test case. Noted while testing some proposed changes in pg_dump's compression logic. Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/3515357.1760128017@sss.pgh.pa.us Backpatch-through: 17 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/eac2b1697d48b2ee5e6836fb63ae0966363055c2 Modified Files -------------- src/bin/pg_dump/t/002_pg_dump.pl | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-10-11 20:34 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-10-11 20:34 pgsql: Restore test coverage of LZ4Stream_gets(). Tom Lane <tgl@sss.pgh.pa.us> 2025-10-11 20:34 pgsql: Restore test coverage of LZ4Stream_gets(). Tom Lane <tgl@sss.pgh.pa.us> 2025-10-11 20:34 pgsql: Restore test coverage of LZ4Stream_gets(). Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox