]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
report: clarify the meaning of the timestamp attribute
authorDarrick J. Wong <djwong@kernel.org>
Wed, 15 Mar 2023 00:52:53 +0000 (17:52 -0700)
committerZorro Lang <zlang@kernel.org>
Sun, 26 Mar 2023 14:02:55 +0000 (22:02 +0800)
commit72dc174d42d97549a5770edaeae429702579912f
tree32e4a083847b4b3c3d2c870cfbe3a108b0b8392a
parent545315976e728b682e2cc5732c652dd574f1149a
report: clarify the meaning of the timestamp attribute

We've never specified what the timestamp attribute of the testsuite
element actually means, and it history is rather murky.

Prior to the introduction of the xml report format in commit f9fde7db2f,
the "date_time" variable was used only to scrape dmesg via the /dev/kmsg
device after each test.  If /dev/kmsg was not a writable path, the
variable was not set at all.  In this case, the report timestamp would
be blank.

In commit ffdecf7498a1, Ted changed the xunit report code to handle
empty date_time values by setting date_time to the time of report
generation.  This change was done to handle the case where no tests are
run at all.  However, it did not change the behavior that date_time is
not set if /dev/kmsg is not writable.

Clear up all this confusion by defining the timestamp attribute to
reflect the start time of the most recent test, regardless of the state
of /dev/kmsg.  If no tests are run, then define the attribute to be the
time of report generation.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
check
common/report
doc/xunit.xsd