HomeClusterLabs Projects

Fix: cts-cli: Ensure only stdout gets validated against schema

Description

Fix: cts-cli: Ensure only stdout gets validated against schema

Currently, stdout and stderr both get redirected to a file, which is
passed to xmllint if schema validation is requested. However, we only
want to validate the stdout. stderr will not be valid XML.

This has not been a problem yet because our tests aren't validating
anything that has nonempty stderr. The validation would fail if a test
did have nonempty stderr.

In a future commit, we will enable PCMK_stderr for all cts-cli tests by
default, so this would become an issue.

A side effect of this commit is that we eliminate some disk I/O in
_test_assert().

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details