Message ID | 166742778877.6127.16460958693964479938.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp187096wru; Wed, 2 Nov 2022 15:52:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4C9GyV1LR0u/q809NzxMpTGNmvyWnsd+57LBk2bqBe3+kEVxIOY/rw1aBnspItfLM6n2fk X-Received: by 2002:a17:903:185:b0:187:25bf:dbe with SMTP id z5-20020a170903018500b0018725bf0dbemr16759604plg.74.1667429522532; Wed, 02 Nov 2022 15:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667429522; cv=none; d=google.com; s=arc-20160816; b=E8lK+4Qe9GGYzHJQTmuxiI3tynhHqoVN5EK437IMP8F14LKp6xKEG53SUK/Wixm2t3 YYKuDa2SZrqSy1rRt779f+tXemGVfRD6rlMgpixAYDAHx0gC3te1/VQDJUPBLU97t2jm dDOUDXcglt5CyjhRAaD4xWH6HS2is9bV/7X1UIhaZaHtfKUNaGwebwTBDUgsFj873wzk XflirjtKdmLBDJ+LYXUr+W3Q9JPZyAmPn3bduuObya6oGYqwTs8Am9vwCsSeJ4NGR/hZ AzD6pZVBhfBucb1mCo+U+34GUMgoL5ZdJEeIBxgIf8SvynYAIjU66V93yodyvgZzKZYb NBhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=1+R7xQ8RtTS9a9/douIT3hpjJzZ5GXp4iqAZ9Ds+ke4=; b=v9GPrF3nrlAw7BvfesADtuDDwYlkeRSoovTj3u/xZfZMkwTfHd87Hicllr8SFqpB9w 3QsndeoWrGw1Khfekek4G4ar9na2dOVtxaJKIdldWpo0oR5UNmP/EquTAMI2EVjg8rYT b4haAerD3YBSguPHqXrary9NfgJapAxroIzzWYELVPTualHbi8czMf9V9lCr2SMlPofb DFTrSEkCT7XodoJIiM4oTQNaw7dM7LwX5o1DbRY8uMJu8Yb1NGW19f6XNJuaLMjhTR3p SnHaz9NaOyC6XS1Rd8+u4vgMZ7z4QO0evMZpvPJch9XcJM+Yv1pDUNCqyeC++LPNbaHM TgDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0BDe881x; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=3hYmvUt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a630415000000b00456f7329d13si17948139pge.279.2022.11.02.15.51.34; Wed, 02 Nov 2022 15:52:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0BDe881x; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=3hYmvUt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231443AbiKBWXY (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Wed, 2 Nov 2022 18:23:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231441AbiKBWXM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 2 Nov 2022 18:23:12 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ED7A5FDD; Wed, 2 Nov 2022 15:23:11 -0700 (PDT) Date: Wed, 02 Nov 2022 22:23:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667427790; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1+R7xQ8RtTS9a9/douIT3hpjJzZ5GXp4iqAZ9Ds+ke4=; b=0BDe881xgYQS58dZsjPGWychrR8INfWa9kJ+vkzO9ROwGalky1tNoG4CrOtn4y717/138g 4AX7he95JBXJ02Buhg7tJdLgzFJRH0XF/2ztbZMvC1jFLwfqwlBPoeoJ6yZtUbbFaERTzR wmhbY80mzI6nwN7yAPMdCinK2VqZY533nS9XybN/824S7uQjlaXCCdCGP0mxZPWiyTaWGY Lim0boFwUfIkbmrMYODUahjZpWUAPvDoL4EFOJ86SS6/K6E4s7sGd1WNY4TNzv7Jnj0Gn5 3nJqWye0uzXHkZ/BPYdsFaOn078S2H//H9Mo2zELKOCWo0ja5JNNoHtBiWFlhg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667427790; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1+R7xQ8RtTS9a9/douIT3hpjJzZ5GXp4iqAZ9Ds+ke4=; b=3hYmvUt6DWuVgi0kMkvYBfgjlWDBliNEq49+8EuClxLLweGqPRTQW2g9c0TxPaCAKzDgUl VET7D3hlzMrG7kBw== From: "tip-bot2 for David Gow" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/urgent] perf/hw_breakpoint: test: Skip the test if dependencies unmet Cc: David Gow <davidgow@google.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Daniel Latypov <dlatypov@google.com>, Marco Elver <elver@google.com>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221026141040.1609203-1-davidgow@google.com> References: <20221026141040.1609203-1-davidgow@google.com> MIME-Version: 1.0 Message-ID: <166742778877.6127.16460958693964479938.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747760016307549511?= X-GMAIL-MSGID: =?utf-8?q?1748426579364626138?= |
Series |
[tip:,perf/urgent] perf/hw_breakpoint: test: Skip the test if dependencies unmet
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Nov. 2, 2022, 10:23 p.m. UTC
The following commit has been merged into the perf/urgent branch of tip: Commit-ID: 4b18cb3f74dcfc183c2434e17bfce09ce6302e37 Gitweb: https://git.kernel.org/tip/4b18cb3f74dcfc183c2434e17bfce09ce6302e37 Author: David Gow <davidgow@google.com> AuthorDate: Wed, 26 Oct 2022 22:10:40 +08:00 Committer: Peter Zijlstra <peterz@infradead.org> CommitterDate: Wed, 02 Nov 2022 12:22:05 +01:00 perf/hw_breakpoint: test: Skip the test if dependencies unmet Running the test currently fails on non-SMP systems, despite being enabled by default. This means that running the test with: ./tools/testing/kunit/kunit.py run --arch x86_64 hw_breakpoint results in every hw_breakpoint test failing with: # test_one_cpu: failed to initialize: -22 not ok 1 - test_one_cpu Instead, use kunit_skip(), which will mark the test as skipped, and give a more comprehensible message: ok 1 - test_one_cpu # SKIP not enough cpus This makes it more obvious that the test is not suited to the test environment, and so wasn't run, rather than having run and failed. Signed-off-by: David Gow <davidgow@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Daniel Latypov <dlatypov@google.com> Acked-by: Marco Elver <elver@google.com> Link: https://lore.kernel.org/r/20221026141040.1609203-1-davidgow@google.com --- kernel/events/hw_breakpoint_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/events/hw_breakpoint_test.c b/kernel/events/hw_breakpoint_test.c index 5ced822..c57610f 100644 --- a/kernel/events/hw_breakpoint_test.c +++ b/kernel/events/hw_breakpoint_test.c @@ -295,11 +295,11 @@ static int test_init(struct kunit *test) { /* Most test cases want 2 distinct CPUs. */ if (num_online_cpus() < 2) - return -EINVAL; + kunit_skip(test, "not enough cpus"); /* Want the system to not use breakpoints elsewhere. */ if (hw_breakpoint_is_used()) - return -EBUSY; + kunit_skip(test, "hw breakpoint already in use"); return 0; }