report: encode XML Character Entities in xUnit report
authorTheodore Ts'o <tytso@mit.edu>
Sat, 30 Sep 2017 03:46:21 +0000 (23:46 -0400)
committerEryu Guan <eguan@redhat.com>
Tue, 3 Oct 2017 08:54:46 +0000 (16:54 +0800)
commit285a1d2215fb7d093fa1cc8cac2805e586a0a1d8
treee8c87de65334e67553bedac1a8b0c4f639449e8b
parent1021cf17bced35bae60eb38338c36b33919a6c0a
report: encode XML Character Entities in xUnit report

Since the xUnit report is an XML document, special XML characters such
as '<', '>', '&', etc. have to be encoded as "&lt;", "&gt;", etc.
Otherwise programs parsing something like this:

<testcase classname="xfstests.global" name="generic/450" time="0">
<skipped message="Only test on sector size < half of block size" />
</testcase>

Will get choke the unescaped '<' character in the skipped message.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/report