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 5D502C4332F for ; Mon, 19 Dec 2022 17:57:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231862AbiLSR5n (ORCPT ); Mon, 19 Dec 2022 12:57:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbiLSR5m (ORCPT ); Mon, 19 Dec 2022 12:57:42 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92DEF11168; Mon, 19 Dec 2022 09:57:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B7025CE1047; Mon, 19 Dec 2022 17:57:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAF62C433EF; Mon, 19 Dec 2022 17:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671472656; bh=ug3j/UPwoUC7CxDuMP5NF+qktCZIULDjBb+3hnyyZgM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OfXNcCtyzHuQvT4xNmSJcYoOEKjHfiy8KvutevsmxQWq7opAwdoWWm9P7lYM9toaV qVH/zmcFrZOotVO3+cQXCzJYBwTK56TCRp6vevVyf3MqevyENzTUsJnY2vSKS5s+dc X4DxfbdxjRCWHJbzLeFzgku4uI1Q0uI64YLLmx1iQyM5ds+/Mwtu0j5EQvr8kIk88+ 7GZsk+5RVcGPfGk3m4/nUAfrNZqI/H8stHa42TgQSHkJbNyyw5bMZYE4jYPOL4m5ZZ DfBtxuP/+TvTr+aIzBNgxsM+85OQ6jbBS7YZ8ZuYVeDWH7vFRrvarhaxI5zu2RBKOG QWKqtuJUY+5kA== Date: Mon, 19 Dec 2022 09:57:36 -0800 From: "Darrick J. Wong" To: Qu Wenruo Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org Subject: Re: [PATCH] fstests: report: add arch and kernel version info into testsuite attributes Message-ID: References: <20221216070543.31638-1-wqu@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221216070543.31638-1-wqu@suse.com> Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org On Fri, Dec 16, 2022 at 03:05:43PM +0800, Qu Wenruo wrote: > Although "testcase" tags contain the "timestamp" element, for day-0 > testing it can be hard to relate the timestamp to the tested kernel > version. > > Thus this patch will add a "kernel" element to the "testcase" tag, to > indicate the kernel version we're running. > Paired with CONFIG_LOCALVERSION_AUTO=y config, it will easily show the > kernel commit we're testing. > > Since we're here, also add a "arch" element, as there are more and more > aarch64 boards (From RK3399 to Apple M1) able to finish fstests in an > acceptable duration, we can no longer assume x86_64 as our only > platform. > > Signed-off-by: Qu Wenruo > --- > common/report | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/report b/common/report > index 4a747f8d..92586527 100644 > --- a/common/report > +++ b/common/report > @@ -49,7 +49,7 @@ _xunit_make_section_report() > date_time=$(date +"%F %T") > fi > local stats="failures=\"$bad_count\" skipped=\"$notrun_count\" tests=\"$tests_count\" time=\"$sect_time\"" > - local hw_info="hostname=\"$HOST\" timestamp=\"${date_time/ /T}\" " > + local hw_info="hostname=\"$HOST\" timestamp=\"${date_time/ /T}\" arch=\"$(uname -m)\" kernel=\"$(uname -r)\"" > echo "" >> $REPORT_DIR/result.xml The original commit that added this report format was f9fde7db2f ("report: Add xunit format report generator"). Dmitry Monakhov's commit message points out that the xml being emitted was "xunit/junit": Footnotes: [1] https://xunit.github.io/docs/format-xml-v2.html [2] http://help.catchsoftware.com/display/ET/JUnit+Format The first link is now dead, but the second link contains enough information to find the current junit xml format: [1] https://raw.githubusercontent.com/windyroad/JUnit-Schema/master/JUnit.xsd Note that the xunit project appears to have diverged their report format: [2] https://xunit.net/docs/format-xml-v2 (Or perhaps there were multiple things called xunit?) Either way, it's pretty obvious from common/report code that the "xunit" code is still emitting junit xml files. I think it's important that fstests should continue to follow that schema, so that these files can be fed into test dashboards (yes I have one) that consume this file format. Regrettably, the schema does not provide for @arch or @kernel attributes hanging off the element, so it's not a good idea to add things that a strict parser could reject. That said, I think it's important to record the architecture and kernel. Probably even more attributes than that. The junit xml schema provides for arbitrary string properties to be attached to reports; would you mind putting these there instead? (I want to add a few more properties now that people have started talking about reporting again... ;)) # Properties echo -e "\t" >> $REPORT_DIR/result.xml echo -e "\t\t" >> $REPORT_DIR/result.xml echo -e "\t\t" >> $REPORT_DIR/result.xml for p in "${REPORT_ENV_LIST[@]}"; do _xunit_add_property "$p" done echo -e "\t" >> $REPORT_DIR/result.xml --D > > # Properties > -- > 2.38.0 >