Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3686925pxb; Wed, 13 Oct 2021 10:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyONyGOXykCz3MRt+rAj6jb/rNS1gCwxELh6nPtUW1Kb1l19EEEg516YQeObBbGErTrSv3I X-Received: by 2002:a63:7c1e:: with SMTP id x30mr448058pgc.374.1634147416079; Wed, 13 Oct 2021 10:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634147416; cv=none; d=google.com; s=arc-20160816; b=bl1QlNpftzZ2JrKR5duZIrF6dV4fEuDGrjnUEPBwc/rbfCdT+bVNSrnF4C9+iwDIWN eNQyJ29NtRJkkl/pi8TEdy8Wkp2BOZTzMdQpg4SDZZ2lT3N6neDepjG8L6rmeFHOXV5F ZY1h1XV/YrAkl3j1H07/WK3CZ7ikjlT5XY6Xt3bHF2ZxZabshW+vlImYczN4JJmrhOOt 08Mh+yHrl3iJYa2nqsAh9FLEhzxHAp/4S9W/RfpV8xbH6Y7qzDIHVptf2zb6tENzAhE2 YSkeDdKkhwGHyo+xX5iSMb5bn9se79DNsBbwT56vYGM1U1W5FMVH8En7yFm65MXH+pHB wLaw== 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=Xt1TFSDSUWFug6DVlfOCDuvb8C2sq6W0M9BYTuaRxyc=; b=N+C3eshcf/haVea6fqSw3x7ncTxp8KM7ZbL1tjeXmgl49E9JnZDWjtJNkdx585Y5kC C/b1um9rkXvi5f1/xoW2F4hm6M1/nSySKgbxVsXFVUrR2PiwiwsAhcYFxTYMh3XCAWTl sQOS7WxoywhrT7uErz2aBEMD01VTxN5jlBo3CKYBvm4eBe7VyrrxkWshQjzYowU87M0E nxbpY44a8ES68qJW9GXujDl8mbKr+Gh9Ms2qlH5Qs6/5XGN5nLWEaeBURIglgYfkpLJZ ETyUyHO72Vcx3FpXW5cfFYy2Mlyedz3kq1zQfVdMbIM1cSA4f3w5CoUqF20uLc7ufiPP WnbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RgK0Ruio; 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 o26si334394pfe.205.2021.10.13.10.50.02; Wed, 13 Oct 2021 10:50:16 -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=RgK0Ruio; 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 S238530AbhJMRuc (ORCPT + 99 others); Wed, 13 Oct 2021 13:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238626AbhJMRtn (ORCPT ); Wed, 13 Oct 2021 13:49:43 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 661F3C06177B for ; Wed, 13 Oct 2021 10:46:58 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id z2-20020a254c02000000b005b68ef4fe24so3971466yba.11 for ; Wed, 13 Oct 2021 10:46:58 -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=Xt1TFSDSUWFug6DVlfOCDuvb8C2sq6W0M9BYTuaRxyc=; b=RgK0RuioznOpmLB+Duy3GhEKZnCSVo98dQxDPV5kuF7tIKsfYLmcbRZpy0MRQZzazE qPpbjz4UTJ6RTrAE7MOaHHOdQUZ4jUx5nkCX9ux+6qYMfNOi6ix1NG7mfR+eIutwjV8L MUzMdPG09KaDyhEFa/b/X/PWRZTtkBJ3mDL9wfk2PsCRyamuQZbKW9VfFRNL6D/C9pww rzjk9j0yZ7c2kh3B4UrVIlt72n5Pc0efcWAU67tfw0WFj/HmhtqkYMiz5k9aL+jWNC2m vPtDT/6Hukf++smJuwNNBMJcWSH3JDWRZZv2vXlQaIWy/+RqAYksKrXIooWOaXPbGMUV TV/w== 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=Xt1TFSDSUWFug6DVlfOCDuvb8C2sq6W0M9BYTuaRxyc=; b=NEEAYqxPODIIKMTe8iHToMbycuggtCb+qvorudphYQ+amvklIdvpuoEzqfY1kbgUnd hWdDD3AXWhkcbRpvnpI2Rpu2JiJPCbObTQHZ7E3mnWrqJeev3JB6NnANsX/UK3TLi2gy fFU2dFSONXPDc5tIhmrEaS9EbohjCEh0r8O6CFqXTHODAN0iQ8WHM1Cir0drTh8U/ar4 1R1hP68qxruVojnlRtOryKpSD6rkwUbdHXOGeM3y8NcmvQTnYXhCrl9v7NJ9BhARSY/b muK/vc1AGaD3LeO6ZtkG2GFvbLf/1O+4vlQnPqTAVRe66tkpaEFSAvj3P7swIVSFy8b3 CI1g== X-Gm-Message-State: AOAM533B3IPnDnY/n3oiPNPR33bVDM+QE3Y41xOaNJq7MWpaT8v1d5az Wiwt4NO2N/E7D3BBn6CubDnrY8PF3s9J X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:aeaf:8e9e:3df2:aad9]) (user=irogers job=sendgmr) by 2002:a25:348b:: with SMTP id b133mr870613yba.264.1634147217655; Wed, 13 Oct 2021 10:46:57 -0700 (PDT) Date: Wed, 13 Oct 2021 10:45:57 -0700 In-Reply-To: <20211013174604.747276-1-irogers@google.com> Message-Id: <20211013174604.747276-16-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 15/22] perf test: Remove now unused subtest helpers 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 Replaced by null terminated test case array. Signed-off-by: Ian Rogers --- tools/perf/tests/builtin-test.c | 11 +---------- tools/perf/tests/tests.h | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 916faeee04ff..c98c7134b552 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -119,9 +119,6 @@ static int num_subtests(const struct test_suite *t) { int num; - if (t->subtest.get_nr) - return t->subtest.get_nr(); - if (!t->test_cases) return 0; @@ -134,14 +131,11 @@ static int num_subtests(const struct test_suite *t) static bool has_subtests(const struct test_suite *t) { - return t->subtest.get_nr || num_subtests(t) > 1; + return num_subtests(t) > 1; } static const char *skip_reason(const struct test_suite *t, int subtest) { - if (t->subtest.skip_reason) - return t->subtest.skip_reason(subtest); - if (t->test_cases) return t->test_cases[subtest].skip_reason; @@ -153,9 +147,6 @@ static const char *test_description(const struct test_suite *t, int subtest) if (t->test_cases && subtest >= 0) return t->test_cases[subtest].desc; - if (t->subtest.get_desc && subtest >= 0) - return t->subtest.get_desc(subtest); - return t->desc; } diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index f87129b63d92..9bf448f7429a 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -43,9 +43,6 @@ struct test_suite { test_fnptr func; struct { bool skip_if_fail; - int (*get_nr)(void); - const char *(*get_desc)(int subtest); - const char *(*skip_reason)(int subtest); } subtest; struct test_case *test_cases; bool (*is_supported)(void); -- 2.33.0.882.g93a45727a2-goog