Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp590306rwi; Wed, 2 Nov 2022 15:52:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6OVXA+rWM1M7jGQUFp4L1qv8PrENYMSD6o/gyOrwf8T75yeWe4zOnaj2TOXX4KoAqOEqV5 X-Received: by 2002:aa7:9e85:0:b0:56c:683b:d31f with SMTP id p5-20020aa79e85000000b0056c683bd31fmr27607690pfq.48.1667429559751; Wed, 02 Nov 2022 15:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667429559; cv=none; d=google.com; s=arc-20160816; b=yeBv/cDg1lGVvUjvsXgvOazWTQDjMSM7U07xQDQxH4/KMGrQqzbJu3vJBivP93IIDB aEvpssgSkQZHz3ZsdBOJJBoV3Z9fGVILt4HS4C6cdkp23/VaqzymAjE0gBC/Y68rZGJ0 zGscWCL62CsFXDMGE6SpiICHycUo2I79kAlQiOGsrTp2YQPA7Pe8LPRpDCz09FzM+K/4 Q8IzMjNerQ6X0T66PvUIE2srK+gdaPsl3m9kuaEWe9KmI8EgjQGKPdRXw/+h+i2ZS4rk dKT7RbhEX4+oZ0OYHFKblSCs0THj/5duipemDIY4d4oL1Uitva/mHRLIkrQfdt+intCO LTOQ== 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.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 Return-Path: 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.52.27; Wed, 02 Nov 2022 15:52:39 -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.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 + 97 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 ); 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" 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 , "Peter Zijlstra (Intel)" , Daniel Latypov , Marco Elver , 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: Robot-Unsubscribe: Contact 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 AuthorDate: Wed, 26 Oct 2022 22:10:40 +08:00 Committer: Peter Zijlstra 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 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Latypov Acked-by: Marco Elver 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; }