Use \if/\endif to remove non-libxml2 expected output in regression tests
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-12T07:49:29Z
Lists: pgsql-hackers
Attachments
- 0001-Skip-xml-tests-when-not-compiling-with-libxml2.patch (text/plain) patch 0001
Hi all, While dealing with libxml2 things today, I have been reminded that we have a regression test output for the case where we don't compile with libxml2, which is error-prone (I also forgot xml_1.out; and managed to forget about xml_2.out until massasauga has reminded me about it). The only location where we use USE_LIBXML is in the backend's xml.c, so we need some imagination for an \if query that can trigger an early exit. And it is simply possible to check if we have some data in the table where the initial inserts are done at the top of the test, which is what the attached patch is doing. With this patch in place, we don't need to care about updating the output file when not building with libxml2, leading to these numbers: 4 files changed, 16 insertions(+), 1482 deletions(-) I'd like to backpatch that down to v14, to ease future maintenance. Any comments and/or objections? -- Michael
Commits
-
Trim regression test expected output for xml
- 102689827fa7 14 (unreleased) landed
- 2adc3c8ebdfb 15 (unreleased) landed
- f7fc53d93868 16 (unreleased) landed
- 3928b7a520e3 17 (unreleased) landed
- e592535d224f 18 (unreleased) landed
- b78cd2bda5b1 19 (unreleased) landed
-
Add an expected-file to match behavior of latest libxml2.
- 085423e3e326 9.6.0 cited