Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1485243pxb; Wed, 20 Oct 2021 06:09:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9rGKWW5QeYjAUY54Hv+GVRQol/Mx4wBsOwYp5t5anmgT5t0WpUTFw9qVadC/WaR2vKD/g X-Received: by 2002:a7b:c406:: with SMTP id k6mr13700091wmi.170.1634735386029; Wed, 20 Oct 2021 06:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634735386; cv=none; d=google.com; s=arc-20160816; b=bc9bZFZODf2skz2McJSS2GvF7+DgYRaRLgrFIOdn2QkpBaPiqOUv5jpchJgxoySnEi qqckXcJNWBp4M7+LynnulcPy7rGOxFtGma/yLFk9b5Ud3yx1je02CTSDr4bM01P7y+cK kaE1tsywP+yDQLUtyUYrcVYru6htuG0YAb8bD4RFbm7hIAWgzjlVcyTR5Heih+H2eLyC PeDgAMi7a6mR8t3fWwzvM6Km9RzMIGK7zIOvF8hUtgh3Ut+b0JLo6W9dWoOEZ1+iZc1/ z6CcoecspQzxITas5cumiKlvBfOQ7/6LlbJj3PdLYa7m3CR4hT71EIzV6FmEYrVaYefO XmbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F2gH7rb7/m5w1MSubEzeVAyg/+4ulkXtrUYC/5EhnAA=; b=TuU38Lquu5yEsZ72KF6F/Osgpt/KDeo1cQVpV1Hf7krgykaIgSf1SongLfbok9ZiTa Ecd69qsexhbHIbeYxSoBSx/Y48aYipZ7J3EzSPRRclhbRp1tqRoikPFV3WzjqT9IfIXL jusXjJXGKAmbyXQha2fuN7pf3/PqOk4jlgE08N1iWbT3MVEKXe1sRMk0l7K8PLKYFZvH +ADpoE1jtgzydfT16lnX6OQIH4Lc4nm0G4nCE2cim+fRLgj/AiuTcQgWdFmjgU8kog6Y Sq2aFmrHIyI50PniX17L25/fImcGxm6YIX638LuEydvQBh6oqrpMlYARMOJDlu8vhnxk 7G4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MyXwqgQa; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e22si2737841edc.121.2021.10.20.06.09.10; Wed, 20 Oct 2021 06:09:46 -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=@redhat.com header.s=mimecast20190719 header.b=MyXwqgQa; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbhJTNIs (ORCPT + 99 others); Wed, 20 Oct 2021 09:08:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59112 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhJTNIs (ORCPT ); Wed, 20 Oct 2021 09:08:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F2gH7rb7/m5w1MSubEzeVAyg/+4ulkXtrUYC/5EhnAA=; b=MyXwqgQa3CD2zxVdu4cHzUDJ77BohQ3gV6vplYH19C3/AjZKyaN7c8BdMSYqBX/XwAVxYc 8mlDQXE7vr2tbYAn75OFhaWOQlk0lDaVxyimeb11qhcNSJr7MkXqNZVVLYJYLv9JFMUiq8 ux/Ub7KtDLGeY4tSNxKr5JiCa/7sM08= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-Az6YpRUfPJmQ21k2ZMfYuA-1; Wed, 20 Oct 2021 09:06:32 -0400 X-MC-Unique: Az6YpRUfPJmQ21k2ZMfYuA-1 Received: by mail-ed1-f70.google.com with SMTP id x5-20020a50f185000000b003db0f796903so20930878edl.18 for ; Wed, 20 Oct 2021 06:06:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F2gH7rb7/m5w1MSubEzeVAyg/+4ulkXtrUYC/5EhnAA=; b=Hka4D+rUdmFeYu6aa3CCpqEZxDZl8mespLOhaVVsfCuRaJLgwpCTtmCWaSNPTCBLMB v7cmZwxTzIVS+jlZIPmadTazXzua79E0HytGCZaDeh4gN5+EuZM9vK4cmr3S4rxeFTs9 xc6Iiqi0/iZk0RBMbjI4aFYHRMeKojywGAAw/j2CFC0uzHJzpHSuNwHBh0XSnI6d0uSu paMJHpW4/MMTKosctv3Tt41mZwEbFKCd0TWds4yFzM44M3JB66eSfSk0zTaVf236YGhy WlVZ6KHzur+Dp/cgIm2AQ8Ue6ok19qJvUAQbCzRn3VGkOrUMeWbq7KGEIU8iLe0Ea6kv Nr9g== X-Gm-Message-State: AOAM533gZp8+XhXur+dXMktwe7ueP436NcJC5Tof4CPoMw3cMZ0CJuFe xne//VEDYUkRTbuOfPG0ANtSTDbyYdKNo11zxKU/ciRyANnKdY9Rywv2m/Kjc+HeLFp1VYlSR5S F2W3EDxuSphnMEm6NCXeK/+Tu X-Received: by 2002:a05:6402:3554:: with SMTP id f20mr62789701edd.354.1634735191135; Wed, 20 Oct 2021 06:06:31 -0700 (PDT) X-Received: by 2002:a05:6402:3554:: with SMTP id f20mr62789681edd.354.1634735190914; Wed, 20 Oct 2021 06:06:30 -0700 (PDT) Received: from krava ([83.240.63.48]) by smtp.gmail.com with ESMTPSA id b26sm1047355ejl.82.2021.10.20.06.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 06:06:30 -0700 (PDT) Date: Wed, 20 Oct 2021 15:06:28 +0200 From: Jiri Olsa To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , 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 , eranian@google.com Subject: Re: [PATCH v2 21/22] perf test: Remove is_supported function Message-ID: References: <20211013174604.747276-1-irogers@google.com> <20211013174604.747276-22-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013174604.747276-22-irogers@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 10:46:03AM -0700, Ian Rogers wrote: > All tests now return TEST_SKIP if not supported. Removing this function > brings perf's test_suite struct more inline with kunit. ah ok, forget my previous comment then ;-) jirka > > 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 >