From patchwork Wed Sep 25 13:24:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 11160677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51C6513B1 for ; Wed, 25 Sep 2019 13:25:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1770A20835 for ; Wed, 25 Sep 2019 13:25:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="U3znKONC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1770A20835 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=nmtqNnQd7VUmCpg4m9opO0fpNrwJt+etILWup/p6V1w=; b=U3z nKONCxiCboJcsDVd1lbksTqemTpNZHlfwVZqly06ydoZ/u1AsA1iu1hu6rPYa9HMwlfU4nquCoZs9 CPA51J1kVb+qoQKSG0vFELDbT+eaylofTgqGKDLsVPIYAMAHY3G+TYG2flLBXSzNdV8z9ssFXY9b2 F+/7+pY25MsLaqe7CZ8jNc3twhLJnAe4vBVXIvgs0e6UAkJFpZkP6gPP1VPSBuQyFJS2UO+tWvxsp 2pGIDAges1RxvGeaxOv2oUYgco3aPyPvMvKD5TCEdyVHm+o07fMzsHhQmHQdG9qlfamkbfXvAGn4L Ngl1qYrhA1Ilj/t8Jb+SztBhBSxv3YQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iD7Ih-0000PK-Vb; Wed, 25 Sep 2019 13:25:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iD7Hq-0007Pz-FC for linux-arm-kernel@lists.infradead.org; Wed, 25 Sep 2019 13:24:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9616F142F; Wed, 25 Sep 2019 06:24:49 -0700 (PDT) Received: from e120937-lin.cambridge.arm.com (e120937-lin.cambridge.arm.com [10.1.197.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E33703F59C; Wed, 25 Sep 2019 06:24:48 -0700 (PDT) From: Cristian Marussi To: linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, shuah@kernel.org Subject: [PATCH 1/2] kselftest: add capability to skip chosen TARGETS Date: Wed, 25 Sep 2019 14:24:20 +0100 Message-Id: <20190925132421.23572-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190925_062454_548380_62EBA0CC X-CRM114-Status: UNSURE ( 7.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dave.martin@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Let the user specify an optional TARGETS skiplist through the new optional SKIP_TARGETS Makefile variable. It is easier to skip at will a reduced and well defined list of possibly problematic targets with SKIP_TARGETS then to provide a partially stripped down list of good targets using the usual TARGETS variable. Signed-off-by: Cristian Marussi --- tools/testing/selftests/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 25b43a8c2b15..103936faa46d 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -132,6 +132,10 @@ else ARCH=$(ARCH) -C $(top_srcdir) headers_install endif +# User can optionally provide a TARGETS skiplist. +SKIP_TARGETS ?= +TARGETS := $(filter-out $(SKIP_TARGETS), $(TARGETS)) + all: khdr @for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ From patchwork Wed Sep 25 13:24:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 11160675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 104D013B1 for ; Wed, 25 Sep 2019 13:25:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E3FE821D7F for ; Wed, 25 Sep 2019 13:25:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cUeE8Ch/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3FE821D7F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=H4KqzvHL2ilKYGX8NR4vojQl1CpIlQZ+pLbiZksq8nI=; b=cUeE8Ch/VeOxDtEKhNcTxYhF19 Tg6zofEfptwUdjhF+dzGG1++XOl+DnA3EdaorpabY7XBXxV5Q9wMe52XDAvylhW6SvWtV3kG+BKmR mXkWG4sPWf05WGTGCK3AIjI7CRIWedaf1CVi779Jc0QHxYBiEdnTO7PljPOC9HsmeAL/uIayOOaEO OSjFcWMchQ5XTq1GmRDrl8LB0HO2ZidS+7gOnWZAsiC7DouNHu6ksAmCSVceFZtV5oddGwxsP3Sbk /TdkJrtgSSg19Hg0qO73YB3LrDoxf/gfl2OciyPFnaKBu7cUQb3blz9YgDGh7+cgT5vQE4L/FnT3m RjhcPJgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iD7Hu-0007Qk-Jw; Wed, 25 Sep 2019 13:24:58 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iD7Hp-0007Q0-0A for linux-arm-kernel@lists.infradead.org; Wed, 25 Sep 2019 13:24:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7B42F1596; Wed, 25 Sep 2019 06:24:50 -0700 (PDT) Received: from e120937-lin.cambridge.arm.com (e120937-lin.cambridge.arm.com [10.1.197.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C91DF3F59C; Wed, 25 Sep 2019 06:24:49 -0700 (PDT) From: Cristian Marussi To: linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, shuah@kernel.org Subject: [PATCH 2/2] kselftest: exclude failed TARGETS from runlist Date: Wed, 25 Sep 2019 14:24:21 +0100 Message-Id: <20190925132421.23572-2-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190925132421.23572-1-cristian.marussi@arm.com> References: <20190925132421.23572-1-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190925_062453_360977_B79B958A X-CRM114-Status: UNSURE ( 8.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dave.martin@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org A TARGET which failed to be built/installed should not be included in the runlist generated inside the run_kselftest.sh script. Signed-off-by: Cristian Marussi --- As an example, here BPF failed to compile but was included in the runlist and attempted to run anyway: ... ./KSFT_LAST_2/run_kselftest.sh: 37: cd: can't cd to bpf TAP version 13 1..49 \# selftests: KSFT_LAST_2: test_verifier \# Warning: file test_verifier is missing! not ok 1 selftests: KSFT_LAST_2: test_verifier \# selftests: KSFT_LAST_2: test_tag \# Warning: file test_tag is missing! --- tools/testing/selftests/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 103936faa46d..e11ace11b07c 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -202,8 +202,12 @@ ifdef INSTALL_PATH echo " cat /dev/null > \$$logfile" >> $(ALL_SCRIPT) echo "fi" >> $(ALL_SCRIPT) + @# While building run_kselftest.sh skip also non-existent TARGET dirs: + @# they could be the result of a build failure and should NOT be + @# included in the generated runlist. for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ + [ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \ echo "cd $$TARGET" >> $(ALL_SCRIPT); \ echo -n "run_many" >> $(ALL_SCRIPT); \