Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3687472pxb; Wed, 13 Oct 2021 10:51:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynglTzNz7llMLM9RWaJoKCeBYYfC7Wa6Q2iqszDmFbxSXypwgTEPC9m1uZquCqJPHE1BJe X-Received: by 2002:a63:4614:: with SMTP id t20mr456978pga.372.1634147461576; Wed, 13 Oct 2021 10:51:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634147461; cv=none; d=google.com; s=arc-20160816; b=ZoFpKo5rmizkPFC5E747uepbAOerO6foVw7EpvRcam2zE6WpcgT8Ttco9HJwaRH/xZ bbZLkH7IKSLDXQPtT8rZbFEmy7BiqzjU7Y3hWktEvMTBBLOLaw+RQ3anJdNMpNVF3uJq mJgd0MmTJqmm67eHJYIxQnj0zDoAzJ9aXRAwn0GPaZNxx9cY6klSfbHZkSTzPtZOvwWz nTyhCdB/olDVQL48Rhr/io8fLwrhEi1mS5EUV360igqCMfkOXfn6wUrm20Pp1aFAtRLo ggkmpW0GFkI422WZZlLcdgUjceDP2EIqWfe6eABtRje/Wu4PEZchxXnbZYppUsjjNGVC PzVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=xteZMpZdkPkQ7I7Ombo00Pf+flGo+AinDwwB1uosPNQ=; b=mAjJYK11cJJWu889OrjwJHPFArtx3z6+w/8kSGOPMnW8PdV1CYvtTbmXG+O4ECWQvl iz7R4nx2PKvz/b5QegLnP2PCVgdpmGECqOZJFgTEysv6lE03zJ7rbZtUE5lUWciGVtVv pEiIGnkAub3AKjKJ8lQJUcSP2c7mWbPX5cEgsU2sYTioiHaG7tv7CXVCdfudayPV2uJB +XAZELBytXda0tTLZQksxaYYvN1z8NZVP/6thWeqYP56eET4NTt4HvkiNID3Uz2Y0KgD MGEB56Zp0f01VTnlUbhLJuLqC2uzuyqYFwoisnF+TN453UD8or8AjOnTb30Un8duaF2h Yegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VDCU+mVL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d15si386103pfl.235.2021.10.13.10.50.39; Wed, 13 Oct 2021 10:51:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VDCU+mVL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238394AbhJMRvC (ORCPT + 99 others); Wed, 13 Oct 2021 13:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238532AbhJMRu0 (ORCPT ); Wed, 13 Oct 2021 13:50:26 -0400 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3F28C06178A for ; Wed, 13 Oct 2021 10:47:12 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id gg11-20020a056214252b00b00382e4692e72so3249294qvb.13 for ; Wed, 13 Oct 2021 10:47:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=xteZMpZdkPkQ7I7Ombo00Pf+flGo+AinDwwB1uosPNQ=; b=VDCU+mVLaUNE2BviVcFOaL/SUFeBqp/jgWZ+hRr8hWon19Vg93Np4//HtbEp0Y6Pca vGEk56qLeG3QCjOr8q3jgqihrbv6WMSwaY8AZWbTReplVbcVv+aQpBKhJ6KG+86Stow5 66OtIBgWlguJr8qTFA+OTpWyo4PCKFbzrnrYkH1alEhrYhVSKl7Q8tCBVDsBA4SpHgnl kh1funwC7Q56ki6wyf45jZ/GJTv1qyawv5VUzpD1mgY08LafGN8f+7MFhmjpV2FoIj4v iI9MeMB0s19XT4jwmj9dhse8pRjY3Wrd+osVEYYaPzW2LshI1+igx3bs4w4uv823VUEe W7ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=xteZMpZdkPkQ7I7Ombo00Pf+flGo+AinDwwB1uosPNQ=; b=QZUlKAx2xB9qlyRHiJCJr7YRaM79bPA2XYeZiRspFX19gftU9Df217S8E8AWQWBMk3 T1Ns89L5grA6wx5EPsgFiK3Kfq7X8kMxpsuE9KF8SeDh58jMjiEg8Hy0b9k4wgplLR40 d4A/VEWIxcGVUYavBf7KV6ckPg6I2HT47kh70Ac/VtrJcBckkKRCTODW0aQICfugXg1a xvZ2CH3wQZsCq2JFPuNYCqF6le7aPZpvc5Jw6XVlOadmcTyUHS+vZ7tCx9a3SAgo8pje rt8vUY0JZeGYVbObr12XxS9Y5OQ1IuYEKVCQ2AylbREvIDRm8wUcRsmaSqGYSq7uzHgl DySQ== X-Gm-Message-State: AOAM5324nJL2cViXwx195VJSorp679DrvkT2x7SDRNd385pRinZT60GR b55iUG8BAwB5oqe/w1mfN6OP7Mf9Y8A2 X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:aeaf:8e9e:3df2:aad9]) (user=irogers job=sendgmr) by 2002:ac8:5f54:: with SMTP id y20mr836208qta.324.1634147232095; Wed, 13 Oct 2021 10:47:12 -0700 (PDT) Date: Wed, 13 Oct 2021 10:46:03 -0700 In-Reply-To: <20211013174604.747276-1-irogers@google.com> Message-Id: <20211013174604.747276-22-irogers@google.com> Mime-Version: 1.0 References: <20211013174604.747276-1-irogers@google.com> X-Mailer: git-send-email 2.33.0.882.g93a45727a2-goog Subject: [PATCH v2 21/22] perf test: Remove is_supported function From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Jin Yao , John Garry , "Paul A . Clarke" , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Brendan Higgins , Daniel Latypov , David Gow Cc: eranian@google.com, Ian Rogers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All tests now return TEST_SKIP if not supported. Removing this function brings perf's test_suite struct more inline with kunit. Signed-off-by: Ian Rogers --- tools/perf/tests/builtin-test.c | 14 +------------- tools/perf/tests/tests.h | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 966948cacba3..086641f60015 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -150,11 +150,6 @@ static const char *test_description(const struct test_suite *t, int subtest) return t->desc; } -static bool is_supported(const struct test_suite *t) -{ - return !t->is_supported || t->is_supported(); -} - static test_fnptr test_function(const struct test_suite *t, int subtest) { if (subtest <= 0) @@ -480,12 +475,6 @@ static int __cmd_test(int argc, const char *argv[], struct intlist *skiplist) continue; } - if (!is_supported(t)) { - pr_debug("%2d: %-*s: Disabled\n", i, width, - test_description(t, -1)); - continue; - } - pr_info("%2d: %-*s:", i, width, test_description(t, -1)); if (intlist__find(skiplist, i)) { @@ -583,8 +572,7 @@ static int perf_test__list(int argc, const char **argv) for_each_test(j, k, t) { int curr = i++; - if (!perf_test__matches(test_description(t, -1), curr, argc, argv) || - !is_supported(t)) + if (!perf_test__matches(test_description(t, -1), curr, argc, argv)) continue; pr_info("%2d: %s\n", i, test_description(t, -1)); diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index 958f94dcc94c..15051801c790 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -44,7 +44,6 @@ struct test_suite { bool skip_if_fail; } subtest; struct test_case *test_cases; - bool (*is_supported)(void); void *priv; }; -- 2.33.0.882.g93a45727a2-goog