HomeClusterLabs Projects

Test: cts-cli: Check xmllint error code in _test_assert()

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Test: cts-cli: Check xmllint error code in _test_assert()

Currently, sed hides any nonzero error code that xmllint may return in
_test_assert(). For example:

$ xmllint --noout --relaxng xml/api/asdf.rng /tmp/test1.out
warning: failed to load external entity "xml/api/asdf.rng"
Relax-NG parser error : xmlRelaxNGParse: could not load xml/api/asdf.rng
Relax-NG schema xml/api/asdf.rng failed to compile

$ echo $?
5

$ xmllint --noout --relaxng xml/api/asdf.rng /tmp/test1.out | sed -n '/validates$/ !p'
warning: failed to load external entity "xml/api/asdf.rng"
Relax-NG parser error : xmlRelaxNGParse: could not load xml/api/asdf.rng
Relax-NG schema xml/api/asdf.rng failed to compile

$ echo $?
0

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

Details

Provenance
nrwahl2Authored on Sep 15 2022, 3:25 AM

Commit No Longer Exists

This commit no longer exists in the repository.