Received: by 10.223.185.116 with SMTP id b49csp3196866wrg; Mon, 5 Mar 2018 16:18:52 -0800 (PST) X-Google-Smtp-Source: AG47ELtJFWhAegwQkKNTA0bYwfjA7HrhPLQkkusE51ks9t/0vLhhMG4Xx6EN85ttCgopLIYZwN1c X-Received: by 10.99.1.148 with SMTP id 142mr13932833pgb.24.1520295532176; Mon, 05 Mar 2018 16:18:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520295532; cv=none; d=google.com; s=arc-20160816; b=zqC+dFLTvbkKBq7L0J/h7rdqc/dnVMDjjPNPe2pfaZL0ZKL39M9oBUpbt3FJHOr9ui 2ezQAXcxnLJxkDhyiV4CDestIcfMPELOUW+uxG30amuOvc15wcY9XTZeq3vlmFknkfAI Q7ImcvCR2G256SUt2PrpxtAfmhjI22FrGik5ZvwvWLn48asFrwPxrBUY5PvWQGTwR+Ws vr6XtMfQI/Z943pyacmv6MA+4LcyvwV5cHsU+3HcEEeG8oztu5KYZms6GGwu90fx3nHx 10Q+BAE7nFZoEsaBVwdCn5R65/sGm1WzPnpHedtVSQkpO8IlY/IRne6ecIoh7Iz5wi1s M/VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=5V/RNees/+x+ydMSaavvh2aQLepP80w+muwbhoDXZzM=; b=oCw0mCrU4pBl1saC/ZBPEvQhRaO2bQ2kfpP7vfNu8R1f7P8h/RWTpRZlZ8vLELbFc0 VCqTpI8Ge7aXusE4ANr04voQF2SGxWbmQq1jUB9v36fQrmWg1mYRoTasLDQVyM3hsfkk yVFmELdYhTcR3vBfMo6rfa0QJfMc+jY5rrb+skaHT+iZLD/TGxrt1tACr5mELUtOd9lm 5t1ULGBqZRFkbWl788W3I2XHru8zbXcR0c/N8BcAFZ7T6jxjYdJDNvGEf+Zuqy8eo21M iWxg/BMQroa6rC0weWjpjLEFBMbOa5h72CACKHo96He9iPzhTWBaQkS4856JbQfIQ+Qd UAxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NjKr/8NT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11-v6si10515361pln.323.2018.03.05.16.18.35; Mon, 05 Mar 2018 16:18:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NjKr/8NT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932850AbeCFARU (ORCPT + 99 others); Mon, 5 Mar 2018 19:17:20 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:32998 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932218AbeCFARS (ORCPT ); Mon, 5 Mar 2018 19:17:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5V/RNees/+x+ydMSaavvh2aQLepP80w+muwbhoDXZzM=; b=NjKr/8NTDfiWp0XtpRAbVc+m8 idzOyCodXhNQW5CU7YKd6lP+FW4i7ANqP+JI6oXCrh4RLcsIFoBK8dJyZcoJcM+MAUChU1roo3jQZ p+OPQPXUdRfifZNRrsodqOux8OJr9SwU4jsD1KfJHE34pxK3Bni06mL/LPc/qX0rKIPQvKC13ikLw 1LVNxQE1E4urTyfiMEr2NpONxB64xGEoM2rgdAYcmb3YQQBpvqzCRIGeg7h8tucHp8361d7KKHW/4 6ODgvqSxyMxoOvWEe51GUVSlfJueHGd9Gi91mYOskia5tRGm43kFIX+8kSW3THGMuCeqQAomsw9Jd 74zo6MlYw==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1et0I6-0000mp-K4; Tue, 06 Mar 2018 00:17:14 +0000 Date: Mon, 5 Mar 2018 16:17:13 -0800 From: Darren Hart To: Shuah Khan Cc: mingo@redhat.com, shuah@kernel.org, tbird20d@gmail.com, tglx@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 5/5] selftests: futex Makefile add top level TAP header echo to RUN_TESTS Message-ID: <20180306001713.GE25693@fury> References: <20180224214244.GA31352@fury> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 27, 2018 at 10:25:44AM -0700, Shuah Khan wrote: > On 02/24/2018 02:42 PM, Darren Hart wrote: > > On Fri, Feb 23, 2018 at 03:11:40PM -0700, Shuah Khan wrote: > >> Add top level TAP header echo, testname and separator line to make > >> the output consistent with the common run_tests target. > > > > No objection to the changes, but I'll echo Ingo's request for a more > > detailed justification for why these changes are warranted. We've seen > > this a few times with recent changes to kselftests, I think too much > > might be being assumed regarding the individual test author's tracking > > of the core of the kselftests ongoing work. > > > > Ingo/Darren, > > Sorry for not giving a better justification. I should have kept audience > in mind that test authors might not be up on the framework changes. > > Nested TAP header example: > > TAP version 13 > selftests: step_after_suspend_test > ======================================== > TAP version 13 (#Nested header) > Bail out! open("/sys/power/state") failed (is this test running as root?) > Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 > 1..0 > not ok 1..1 selftests: step_after_suspend_test [FAIL] > selftests: breakpoint_test > ======================================== > TAP version 13 (#Nested header) > Pass 110 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 > > > > 1..110 > ok 1..2 selftests: breakpoint_test [PASS] > > > Some tests print TAP headers. This is helpful when test is run by itself. > However, when "make kselftest" or "make -C" is used then common run_tests > does its TAP header and nested headers get printed. > > Nested headers are a problem for TAP13 parsers. Hence, I decided to go > with a simpler approach to suppress TAP headers using env. variable > that gets checked in the framework and suppresses the header. > > selftests: kselftest framework: add handling for TAP header level > > This minimizes the churn to actual tests and framework handles the > TAP details. > > futex test overrides the generic run_tests, so it needed changes to > add a top level TAP header. Otherwise, you will see nested TAP header > for each of the individual futxex tests as shown in the example below. > > > TAP version 13 > # futex_requeue_pi: Test requeue functionality > # Arguments: broadcast=0 locked=0 owner=0 timeout=0ns > not ok 1 # error futex-requeue-pi > Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 1 > 1..1 > > I can capture the nested TAP headers being a problem for parsers in > the changelog. I will have to send v2 anyway, "make -C" still has > the nested headers for fuxtex tests. > > My goal is to not have the individual test authors be concerned about > the TAP13 details and handle it in the framework. I am making changes > to framework and test Makefiles for the TAP13 and other common formatting > type features as opposed to individual test code. Test Makefiles that use > lib.mk don't need changes either, futex needs changes mainly because of > overrides. > > Hope this help. I will do a better job of explaining in the future. Thank you Shuah, this helps. I think this is also a good motivator to look at the overrides we are using for the futex tests, and see if we can eliminate them. As you point out, the fewer overrides we have, the less churn we experience when the framework changes. Most of the overrides as I recall were just used to minimize the number of changes we had to make to what I had already written in the original tests. That advantage seems to be losing out to impact from changes to the framework. -- Darren Hart VMware Open Source Technology Center