From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f73.google.com (mail-dl1-f73.google.com [74.125.82.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BE2E4204E for ; Mon, 1 Jun 2026 00:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780272388; cv=none; b=Kun7+m+q6ufPbA5W0891PHynwB7wh7vY3hlWlB/KHN/6EAleSX6a+Gw32kQLmWVR5I41plXBApTxLQm9Npi0jUvZqTueC/yWX/YwBjGi5wb3ZcRv4NQR9UP6VC7sUFUv/5D5qTlzMUsBngwllLChJhYv+XPLQicj78OanLVMCJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780272388; c=relaxed/simple; bh=kwIpUas8CmAyFq9rUING30MN44XBQkAG67T0YWFq4oc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=gzvX3zsLs+xBSj5t3MjeuiCIXNDysLe6zuhaUaLlHq8YlbYWB+a5c4Yzw9XUV6a8Is5I1QUQQ1575crxDD3Lfd3WdKnnFa+ENiuHh6vztBTmTIOQz2aVssApOLPMYWAWxOENojxtMA89N8eLUhCwotInCs4/De0CYfUy4uhz4/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=LrShGWuf; arc=none smtp.client-ip=74.125.82.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LrShGWuf" Received: by mail-dl1-f73.google.com with SMTP id a92af1059eb24-137dd5171feso1172081c88.1 for ; Sun, 31 May 2026 17:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780272381; x=1780877181; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=1IOal3hqFXb7r1up/rx+u30ZeQHjxIhWl995ZJvn/b8=; b=LrShGWufFkoltPpLN0bvLAwgSrkdvp4YyvXBEVaXPyaEOK5AzSFYTOprmQvZ0xyc00 BcJZ8th4eK5q131NJuvYc50idF/BkNz03DD6DoTTWIxdp/hKr8os1nRn1ZetLFDnyH1Q 8/oFfv/CnNbHEuekllRKzR9WmNpI2ZNrbB1DeDhaL2ePdGaHNL6021g+2gP9otKtT1HI gqvk5trnOXCk02tVujVIBdFP2jo+HnAu8jFmNiXOpWGotEYyGZESJl0MUzpDwZT/floB u6+75+bBA8dlOfVX6fj4Pol1igAE/cYq+c2867gVO90G5fEs8I2Spb/k/lYxpozLrYWv vSWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780272381; x=1780877181; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1IOal3hqFXb7r1up/rx+u30ZeQHjxIhWl995ZJvn/b8=; b=U2JXYMZEM3nBoR8CvPAswnTRtl5MjUFfGlgu9cV6aDyYxItI7Z4e3WAAXBTbPWNqy+ XCM7iLKBRjuPx6ncNt4VLjS2BvFnQbzoh0BNPHHD4OobleZ1wxorySpuqK4hOU1T/j6v Yf65UbMqyvJpYpYz0w5VbZDfYfwF6v3ZL0BBwOm6eqrraU6uMbQi2Gi6LvwtaZKRJuJU ujWg3kROtZuuw3GuQnDLaXEF5zVu9OKa1q+WjXhHdxiZx2zDZ+SZKQldQZyLAVbYOrTu CN4EhTz6dWnVqL1JhYEXwP2G5AogC1Y4hvdBhxh0GISA1qAERzoRE1n9V4SJ/8t3u7xZ EbcQ== X-Forwarded-Encrypted: i=1; AFNElJ+2NmBX+8hiNxZhQfz09IuoyHhZNlCt7KiuFke2Y4OmG9LTUhLjWmDaTxFGKHFoQL3nKypicPTlDwRnBaE=@vger.kernel.org X-Gm-Message-State: AOJu0YzLwO4lO0PoHJw7IPFJilNFdDqH/7UOaHvTBkaYKgWRJxTP95Ps OlJBEST0/VawMLQ8n6swQpFe6+dwDZ4KV5YSrYdZRajqzNnOfTNe+Yb4vY/uHmOZuwnlz8MAdvI cKTSyOTGFSw== X-Received: from dlee6.prod.google.com ([2002:a05:7022:6286:b0:135:7fdc:4c00]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:f96:b0:136:5c88:d928 with SMTP id a92af1059eb24-137d426d0e5mr3126630c88.19.1780272380346; Sun, 31 May 2026 17:06:20 -0700 (PDT) Date: Sun, 31 May 2026 17:05:45 -0700 In-Reply-To: <20260601000548.1195604-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260531082235.940833-1-irogers@google.com> <20260601000548.1195604-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.823.g6e5bcc1fc9-goog Message-ID: <20260601000548.1195604-13-irogers@google.com> Subject: [PATCH 12/15] perf test: Split monolithic 'util' test suite into sub-tests From: Ian Rogers To: irogers@google.com, acme@kernel.org, adrian.hunter@intel.com, namhyung@kernel.org Cc: alexander.shishkin@linux.intel.com, james.clark@linaro.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mingo@redhat.com, peterz@infradead.org Content-Type: text/plain; charset="UTF-8" Refactor the monolithic 'util' test suite into distinct 'String replacement' and 'BLAKE2s hash' sub-tests using the struct test_case framework. This improves test reporting granularity and is used in a subsequent perf test for JUnit XML test result reporting. Assisted-by: Gemini-CLI:Google Gemini 3 Signed-off-by: Ian Rogers --- tools/perf/tests/util.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/perf/tests/util.c b/tools/perf/tests/util.c index bf2c5b133884..f9abd9911e6c 100644 --- a/tools/perf/tests/util.c +++ b/tools/perf/tests/util.c @@ -86,7 +86,12 @@ static int test_blake2s(void) return 0; } -static int test__util(struct test_suite *t __maybe_unused, int subtest __maybe_unused) +static int test__blake2s_case(struct test_suite *t __maybe_unused, int subtest __maybe_unused) +{ + return test_blake2s(); +} + +static int test__strreplace(struct test_suite *t __maybe_unused, int subtest __maybe_unused) { TEST_ASSERT_VAL("empty string", test_strreplace(' ', "", "123", "")); TEST_ASSERT_VAL("no match", test_strreplace('5', "123", "4", "123")); @@ -95,7 +100,16 @@ static int test__util(struct test_suite *t __maybe_unused, int subtest __maybe_u TEST_ASSERT_VAL("replace long", test_strreplace('a', "abcabc", "longlong", "longlongbclonglongbc")); - return test_blake2s(); + return 0; } -DEFINE_SUITE("util", util); +static struct test_case tests__util[] = { + TEST_CASE("String replacement", strreplace), + TEST_CASE("BLAKE2s hash", blake2s_case), + { .name = NULL, } +}; + +struct test_suite suite__util = { + .desc = "util", + .test_cases = tests__util, +}; -- 2.54.0.823.g6e5bcc1fc9-goog