From nobody Mon Jun 8 04:20:20 2026 Received: from mail-dl1-f74.google.com (mail-dl1-f74.google.com [74.125.82.74]) (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 E03323B47F0 for ; Tue, 2 Jun 2026 07:32:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780385533; cv=none; b=dXhPS7gIjNxP+hFWutq5aAyuTpE2TXyFALJINfgQEKSZJ9Y1BguDm79bxsvjWEhRqgo1yFmS11o70zbYGqNZe3rbLf62tJmn8DBSQAp0hsHzaGMSduJDZSjMKH3Z2b+BaZw9kxdYAENATwTdGDEjUd2hgqHlfyjf8/Mr4SXH2gk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780385533; c=relaxed/simple; bh=DgJy33f3qaFp+PUFLJjCzac2PYOqX/26bXyhRtGVTFg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=sQxMto4fgo5F631hpvspI+0ymfOJplgjDL00ztZ+S+L7zdGxL+QbZUztK85YP7lULh5o+TOHKJGaUuiIMR1OFM4xRBANuDkq0EV3SXPZp6QCeXYaDYiXWjh0p1labBnVEFb8pBSthT5ZFa/T3NZYUASEourLhwiIzAtnpRElZ1Q= 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=nsR76+wY; arc=none smtp.client-ip=74.125.82.74 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="nsR76+wY" Received: by mail-dl1-f74.google.com with SMTP id a92af1059eb24-135916eefa0so18606475c88.1 for ; Tue, 02 Jun 2026 00:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780385527; x=1780990327; 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=Va+s/EEbKn/51zgYeOxmoieRWOD/n3cBCji4k/GXkQs=; b=nsR76+wY8PoEmaRoLnAPWNnod3hAFoqbJLT3MOo1Y8wFN6XybhIsTWkb3MFUXN7FHC +Mpr8mbNOZFWFBqFEKZwvQI3OgziGRI7zbKK0cnhO56I7t3xgag/sDS+TfRiMT55Vgus oJVmTsYksTCLuEtR6yjXYtqj6tZ7nlocOdqJvKRcIH+appr/o8avIHZlCyqL7a0mSUAz /BCIjAzcArfGPoWBYktmlx7Fqbn0+gCFK2tynm9A09Z3IXq6Z+R7LcLRP+aVOfIG/+6L 1M4JHn4ZH6jkjzFDxZ1poSFDttLyfObwOTnFAOusGd5cKFwoxpYg8L9MfzNfsUfira3E 5Hfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780385527; x=1780990327; 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=Va+s/EEbKn/51zgYeOxmoieRWOD/n3cBCji4k/GXkQs=; b=oQUXeLkN0fViDlQ1jLsovQzz0WDocFzYZxb9EZSaThwhJ9Hp5i85TP+a/ybAHnZB+5 lhYZZBhbwBZfCw/bKydb9zB0n+H6ym/kmulw/j1u/58zUhidwtYXmCO7XGysrqXm6yEe WeMfsT9Qjn/hiVSab34gGL9UpCXGCE66+og8kJ8OdYOXZv9kEK57b0A4ga1GEuHqKq+y 7i4sJpf/UgvcD6+Xq4O1gnN5DmnFW4Y1lzcjfpuww8VNslpa1hil40E57g78/MH3PiJS 3SKhhA0zh9qGWhtm28itEscgVyAscQi1X+Bm2KtW8xskksvQBGIknnpJ/MBTCUhox1wN WTpw== X-Forwarded-Encrypted: i=1; AFNElJ8ELRr9pSol1INapxHxtiWLOoVCmevFyonwIHMqbnQUZZplg7EWmtid7DQR/gObWYIOMngT54EKHS5I47Y=@vger.kernel.org X-Gm-Message-State: AOJu0YzzDqaAYdnwpSieOJIfWAmYcFt3H98Bf/FRIjCgSQbvmQ8lvU4Y dd/wKBDjATyg8udRuuEoN8RQglZ1u4gBYEIGpbg49pqa8L5eYAV6tCWkcGJ3NfMmp1N2mU2PyVp +qAjTFhZ8Og== X-Received: from dlbbo37.prod.google.com ([2002:a05:7022:43a5:b0:135:d0cf:93de]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:981:b0:135:52d3:d9de with SMTP id a92af1059eb24-137d3f0cd3emr7093132c88.15.1780385526646; Tue, 02 Jun 2026 00:32:06 -0700 (PDT) Date: Tue, 2 Jun 2026 00:31:28 -0700 In-Reply-To: <20260602073132.2653307-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: <20260601061401.1541457-1-irogers@google.com> <20260602073132.2653307-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.929.g9b7fa37559-goog Message-ID: <20260602073132.2653307-14-irogers@google.com> Subject: [PATCH v7] perf test: Split monolithic 'util' test suite into sub-tests From: Ian Rogers To: irogers@google.com, acme@kernel.org, namhyung@kernel.org Cc: adrian.hunter@intel.com, 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-Transfer-Encoding: quoted-printable 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; } =20 -static int test__util(struct test_suite *t __maybe_unused, int subtest __m= aybe_unused) +static int test__blake2s_case(struct test_suite *t __maybe_unused, int sub= test __maybe_unused) +{ + return test_blake2s(); +} + +static int test__strreplace(struct test_suite *t __maybe_unused, int subte= st __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_unus= ed, int subtest __maybe_u TEST_ASSERT_VAL("replace long", test_strreplace('a', "abcabc", "longlong", "longlongbclonglongbc")); =20 - return test_blake2s(); + return 0; } =20 -DEFINE_SUITE("util", util); +static struct test_case tests__util[] =3D { + TEST_CASE("String replacement", strreplace), + TEST_CASE("BLAKE2s hash", blake2s_case), + { .name =3D NULL, } +}; + +struct test_suite suite__util =3D { + .desc =3D "util", + .test_cases =3D tests__util, +}; --=20 2.54.0.929.g9b7fa37559-goog