summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-03-14 17:52:53 -0700
committerZorro Lang <zlang@kernel.org>2023-03-26 22:02:55 +0800
commit72dc174d42d97549a5770edaeae429702579912f (patch)
tree32e4a083847b4b3c3d2c870cfbe3a108b0b8392a /check
parent545315976e728b682e2cc5732c652dd574f1149a (diff)
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>
Diffstat (limited to 'check')
-rwxr-xr-xcheck1
1 files changed, 1 insertions, 0 deletions
diff --git a/check b/check
index 14b398fd..f2be3d7d 100755
--- a/check
+++ b/check
@@ -917,6 +917,7 @@ function run_section()
# to be reported for each test
(echo 1 > $DEBUGFS_MNT/clear_warn_once) > /dev/null 2>&1
+ test_start_time="$(date +"%F %T")"
if [ "$DUMP_OUTPUT" = true ]; then
_run_seq 2>&1 | tee $tmp.out
# Because $? would get tee's return code