mbox series

[0/2] Work around various report.xml compatibility issues

Message ID 20230420032056.789979-1-tytso@mit.edu (mailing list archive)
Headers show
Series Work around various report.xml compatibility issues | expand

Message

Theodore Ts'o April 20, 2023, 3:20 a.m. UTC
While updating {kvm,gce}-xfstests to work with fstests upstream, we
found that Darrick's changes have led to some incompatibilities.  The
most serious one is that it breaks the ability of the junitxml Python
package from being able to parse the report.xml file.  I've worked
around this in my test appliance in the first patch, via the simple
expedient of simply nuking the xmlns attribute from the testcases tag.
However, this may be a compatibility issue that will impact other
fstests users.

The second issue is one which depending on which xunit/Jenkins schema
you believe, the timestamp attribute may possibly not allow the use of
a timezone.  Again, I've worked around it in my test appliance, but it
might be that this will cause compatibility problem with other xunit
parsers.

I know that the report.xml file is strictly not conformat with the
xunit schema already, as discussed in fstests commit b76a6cdb40b5
("report: derive an xml schema for the xunit report").  However, I
believe that in order to allow fstests users to use xunit parsing
packages without having to write their own custom XML parsers, we
should strive to be compatible with as many xunit tools as possible,
whenever it's reasonably possible.

(It's kind of like HTML; no one actually follows the formal spec, so
HTML authoring tools need to be as compatible as possible as with the
most commmonly used browsers, and browsers need to be as flexible as
possible to support HTML files which are "mostly conformant".  :-)

So while this patch series is against fstests-bld, I'm hoping this can
spark a discussion about whether we should make some changes to
fstests to be more compatible in practice with various xunit file
consumers/parsers which might be out there.

Theodore Ts'o (2):
  test-appliance: edit out xmlns from the result.xml file
  test-appliance: support a timestamp specifier which contains a
    timezone

 test-appliance/files/root/runtests.sh                     | 1 +
 .../usr/lib/python3/dist-packages/gen_results_summary.py  | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)