From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52DB8C4332F for ; Tue, 20 Dec 2022 02:20:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229969AbiLTCUR (ORCPT ); Mon, 19 Dec 2022 21:20:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiLTCUQ (ORCPT ); Mon, 19 Dec 2022 21:20:16 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1B042DC2; Mon, 19 Dec 2022 18:20:14 -0800 (PST) Received: from [0.0.0.0] ([149.28.201.231]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MSt8W-1pKCTM2qJK-00UIsV; Tue, 20 Dec 2022 03:20:03 +0100 Message-ID: <51d9d9af-1302-e555-ca8a-c57a5a89b848@gmx.com> Date: Tue, 20 Dec 2022 10:19:57 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 3/8] report: capture the time zone in the test report timestamp Content-Language: en-US To: "Darrick J. Wong" , zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, leah.rumancik@gmail.com References: <167149446381.332657.9402608531757557463.stgit@magnolia> <167149448068.332657.14583277548579655582.stgit@magnolia> From: Qu Wenruo In-Reply-To: <167149448068.332657.14583277548579655582.stgit@magnolia> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:x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PWoS9 kF7aLV4nkH5ska0j671MBMGrggPAzZjKJ5TSfKTHiBk+poefMwql+9ODfiz9lxnmANryob8YX T1kf/784lhQSgH2hOQB4uJ2+eStVoVhij/3HEivvzVXThIJs+617aitF/a2J8S4I61geL1B/5 LDmD7K1Qp1HfeoLn9v/yMuhihZ4= Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org On 2022/12/20 08:01, Darrick J. Wong wrote: > From: Darrick J. Wong > > Make sure we put the time zone of the system running the test in the > timestamp that is recorded in the xunit report. `date "+%F %T"' reports > the local time zone, not UTC. > > Signed-off-by: Darrick J. Wong Reviewed-by: Qu Wenruo Thanks, Qu > --- > common/report | 9 ++++++--- > doc/xunit.xsd | 2 +- > 2 files changed, 7 insertions(+), 4 deletions(-) > > > diff --git a/common/report b/common/report > index 1d84650270..1817132d51 100644 > --- a/common/report > +++ b/common/report > @@ -38,6 +38,7 @@ _xunit_make_section_report() > local bad_count="$3" > local notrun_count="$4" > local sect_time="$5" > + local timestamp > > if [ $sect_name == '-no-sections-' ]; then > sect_name='global' > @@ -45,8 +46,10 @@ _xunit_make_section_report() > local report=$tmp.report.xunit.$sect_name.xml > # Header > echo "" > $REPORT_DIR/result.xml > - if [ -z "$date_time" ]; then > - date_time=$(date +"%F %T") > + if [ -n "$date_time" ]; then > + timestamp="$(date -Iseconds --date="$date_time")" > + else > + timestamp="$(date -Iseconds)" > fi > > local fstests_ns="https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git" > @@ -58,7 +61,7 @@ _xunit_make_section_report() > > name="xfstests" > failures="$bad_count" skipped="$notrun_count" tests="$tests_count" time="$sect_time" > - hostname="$HOST" timestamp="${date_time/ /T}"> > + hostname="$HOST" timestamp="$timestamp"> > ENDL > > # Properties > diff --git a/doc/xunit.xsd b/doc/xunit.xsd > index 0aef8a9839..67f586b816 100644 > --- a/doc/xunit.xsd > +++ b/doc/xunit.xsd > @@ -12,7 +12,7 @@ > > > > - > + > > > >