Re: Use \if/\endif to remove non-libxml2 expected output in regression tests

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-12T08:18:44Z
Lists: pgsql-hackers
> On 12 Jun 2026, at 09:49, Michael Paquier <michael@paquier.xyz> wrote:

> I'd like to backpatch that down to v14, to ease future maintenance.
> Any comments and/or objections?

Skipping tests when the underlying library/platform support is missing is in
line with how the TAP tests already do it.  We would lose coverage of invoking
XML functions without libxml support, which risk hiding bugs in the error-
handling (which is already the case with the TAP tests etc).  For libxml that
might be acceptable since the error paths are quite small (and by now
welltested) and the XML code isn't really moving all that much.

I think there needs to be a big comment explaining the skip_test clause though.

--
Daniel Gustafsson




Commits

  1. Trim regression test expected output for xml

  2. Add an expected-file to match behavior of latest libxml2.