Received: by 10.223.185.116 with SMTP id b49csp5207861wrg; Tue, 27 Feb 2018 09:27:18 -0800 (PST) X-Google-Smtp-Source: AH8x225fpCh5cYuz7p4Hyd306MRdej+DFwC8iG1srza7ufUQGNMsB7xdpqtkHKtqclfFdPjJhVr7 X-Received: by 2002:a17:902:f:: with SMTP id 15-v6mr14691512pla.419.1519752438765; Tue, 27 Feb 2018 09:27:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519752438; cv=none; d=google.com; s=arc-20160816; b=YtTj81zUk4dgNl/m7yP0TGxpn6dTKyMSMnBt6Bel4CxdPqsjCfYD6/O1QGcvI4+Rjz BhQhcGOb1V9Lj9iQNGfR6VClS8JJUiHthICUVEE+z9TaAX/hp5wcoH8K6Mu0wlR50XCD 1NrJqhikCNiH7onRwfplARk/B93vCMNNul5B5ZxxKf7mgOZj6XRb5MueaWCl8fNZxnX8 0P71d4SjtJLVUUALU5N1QOluPtqJQGWXTniQqSdwaT7wtDe0qGveoYqzYzRZQFPs8EvG 2VpqDDjkzWL2kUbEezJft84VYceEVliDjNyHPZQZ9iwNuQ+vcOa0mqxo7jGk0/8peDyw 4E7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=NAb0POsXnzeJZIhElzSlMVrhiR+mX2MnEKUUvf61cI8=; b=YxWJuDP9E5E5KZTrhxaFizpI37UMwV7EDBhrp3EG2xYh9yzm1IYBjJLbbJyLLlvS61 yMGpIrKyTCtxsqy2FYpkDoFGBxrmNn+84BSOod8foaqkce9VswX1eCDOxPnqmgK6O5ye ZS2a65nlB0MLCg6N+xOSJ/6l/13kTUdbFUpZ0tvFrQSR+o6frBIr1X1ryfBnGcV/4teR 4qhYrROgijFgVXv24GNoRT0JKBYwUKt0ADtjIjLaMUA/+2MRH5wZm4wcX8NgHSZj/eqY rb1IxgNp+rU5g07k5i5bgog5mXjDMIGe7yzmGygHdz2CKOJvGMEE5btKJZdjEOvUaOn0 eN/A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16si4763830pgv.331.2018.02.27.09.27.03; Tue, 27 Feb 2018 09:27:18 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751631AbeB0RZu (ORCPT + 99 others); Tue, 27 Feb 2018 12:25:50 -0500 Received: from osg.samsung.com ([64.30.133.232]:33509 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751552AbeB0RZr (ORCPT ); Tue, 27 Feb 2018 12:25:47 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id BE98A29A47; Tue, 27 Feb 2018 09:25:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QnsUGUBVnlpK; Tue, 27 Feb 2018 09:25:45 -0800 (PST) Received: from [192.168.1.87] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) by osg.samsung.com (Postfix) with ESMTPSA id 007CE29A3A; Tue, 27 Feb 2018 09:25:44 -0800 (PST) Subject: Re: [PATCH 5/5] selftests: futex Makefile add top level TAP header echo to RUN_TESTS To: Darren Hart , mingo@redhat.com Cc: shuah@kernel.org, tbird20d@gmail.com, tglx@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20180224214244.GA31352@fury> From: Shuah Khan Message-ID: Date: Tue, 27 Feb 2018 10:25:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180224214244.GA31352@fury> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks, -- Shuah