Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2578359rdb; Wed, 21 Feb 2024 12:04:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWvlbedEMO6Kht7LRTIKSPzwEFgG0fV6sHtqtH1EX27K7anVVN/XkYhMWlvMDb4ednxd6IgSzNd3saRUSkJPaYps88mS9hS5X66thABNg== X-Google-Smtp-Source: AGHT+IGCoGRtHgtoWPPqpM/LGGRxHObj6Qj57yVkS5byrPW4yxHitDdlh3yC4GGvHuJdU161AYo/ X-Received: by 2002:a05:6402:3d9:b0:564:6bf1:e804 with SMTP id t25-20020a05640203d900b005646bf1e804mr6390031edw.42.1708545876502; Wed, 21 Feb 2024 12:04:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708545876; cv=pass; d=google.com; s=arc-20160816; b=clAE2OXmM7HXbCTJXVyH1WahzzjkMhRg+59PrQ6De78f3kNpTy9rhwRVBYqMnY17Rp QEnhw39P7hrOotIPTNDqHWOIByWIOF9HMlBWFb1Ahm2JW5poctvjG0/xeBNYXl/QwSE7 LuqM88pIhS2LWEIuuhYfHiRxBrGL1ha5/5pobmVYTdff2nK8tzGcK9jZTHMpSDxnLLwx qhWWvLO0RMfDqzfw5sf28NCCnhL1I1nluU/QGqdynk1ao7bY1SRIBWxxNc3IEfbjcHK9 p6Vl+PeQ1LvtyOwYbFPLzqrZFIxb2hZcDQKXAI+9WpoaQrAzxpglL15SCICoDpNPl+9E L9Yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HUxWnozNASldM6mLZUsm3giXihd3A7IaClJa0LXBxNU=; fh=cywHORSqrTVhetHaeDLhfbkXXl5xgzti+CbmmRpR+0U=; b=WmMXTS5VPXQ4K5VO79MPt2uYkeVWDrArevA8mF+PXqI8Usmk6NwWvqGO+wUTrtRwDt W8o4rVEaPYriZW4R9k8P9jCUmtRow9XP7aRox/9kzMMsyE7QVj5EDjrBLGUD9xqeO5x8 NvjgPEZY76IM1ieTIfTgslTmfvX84FaIdanDn67SshdxEhcTogVAIhCHOMTpIsym9IGm j9A/ycIfnT/k6NR/b8nNpaXs+J3tzd4DEKIlE9qYvkpnEIWpLJVZ8fFC2pdjmkJMRDL2 iMrNkHN5NVqJxH9rggib2tTjeHeoCg1/km+/MEZb84jNaqxP0ults3r1xnrQBbUbFwY/ C5ig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3m+74o8S; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-75442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r7-20020a056402234700b0055fea2e2bccsi4772201eda.403.2024.02.21.12.04.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 12:04:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3m+74o8S; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-75442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4214A1F29983 for ; Wed, 21 Feb 2024 20:04:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E46F286654; Wed, 21 Feb 2024 20:04:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="3m+74o8S" Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (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 95FC28613C for ; Wed, 21 Feb 2024 20:04:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708545867; cv=none; b=McnWSq+jTG/hP3n2emlXrnkIV6SyUh2qFwPjzbHd0tmODJFhnjQ5bwfzXK7XvNKWQDEVIJf9KVfv0se9UU3wJA8Bz9ZS3T5GETY1UCs06pwlrlZHojEOh01NprUi529dFJhZMs2jQ9ZTcyv2Vi/oaDtc1e0vKVWAgr1RWZ1fsOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708545867; c=relaxed/simple; bh=OA1/1MIUS+P/xii3X+kUs1opugBAYp2FXnCE8iim2Fs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aNTYJYjp8myImCXURXrNQNYh/wlF730xiy3EZWVl4JF7rpU18G7PB3cT0gwqcS2RocsVS1uHgzTg/VFzMG2s2lhsqhldnYOGU6MU1VDh0XBPFPaA6uOaligNDPtXrYckeAy10LXXc+o4GM3wvvUovsKmUaMb92tlC8iWxGjYcXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=3m+74o8S; arc=none smtp.client-ip=209.85.166.43 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=google.com Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-7bed9fb159fso327731539f.1 for ; Wed, 21 Feb 2024 12:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708545865; x=1709150665; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HUxWnozNASldM6mLZUsm3giXihd3A7IaClJa0LXBxNU=; b=3m+74o8SjvRsdmUgcYcVhHtkQ5gtjFXUrXn6POXh1c7bs4FNNLFfqhCoweEw0t6rVC 1gwzCq7K8wG2mewcUH2FA551uDimGj2Ajm4SVSdCyDNHl4+rqoAO5P9Hn6kzTK4pM6mD MJCR/dYGEVDqVbPN3yr6STHiC8ZpEXAyZ9MD29xvbsWnaImAmx7Pc4PwXmurgb/Tes65 8/+sCDGnn0uta56Orh5loeKJolOEzWejwsObm98RrnI5Go2s4sZH+4qQj7IVSLUSRbGc H/N8zYGffOrHaABy3J+cKHCtTG0ogUFtzi0InKaEuFy1ChIC/QCz2GxbDvO9cJSuogPd RhZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708545865; x=1709150665; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HUxWnozNASldM6mLZUsm3giXihd3A7IaClJa0LXBxNU=; b=t3gz7HNCFDpEIp41dWxCkR4QRKRKmPd9JqTLDaKr245ZAit6oxzHv4CrtLFrAHwGiC uMHgZo835SnSStrIdK6ugSyl5uCaduzSG86haPF3PYDTRn+nAwGtgytDWedEG3PEAywP SVuRuYZK3gR97LgUprX6KndQ4wffphLXgPtDoS9FxKKH/aF+Iufx3Mxg3KqAW9+BUE4P HSh4cA7X3G+1z50BldYmzvudLhaWq68aTlK4CV/xCc/IOypTYI8yETgaeng5F6PlXMD2 tyceksTrcDAoer884W1e/M4Euee/+iL1KJoHenZbrIO/28Athq3KtmdcEAlSYvoAE8PC MXeA== X-Forwarded-Encrypted: i=1; AJvYcCVMDyGwHl3NnnaZhlE9XLnrrHu6hrDrDEErch38SUfiMnBbD6HeCsZDIP60KcRdBQcxLftG/pQ96si4Deb/fqN9oNGnvHkgxERHIBS3 X-Gm-Message-State: AOJu0YwhiV6vu0ABoSTun6u1stJONcflpNgQw6klGizG0/aYCDwJ95et YmDR0dqYE9e/HYNSqnPVR++voDJusZgtDR2kMJ2LlfvIl+AVLEI+0uEbxlOIOA== X-Received: by 2002:a5d:9b10:0:b0:7c7:6e49:2208 with SMTP id y16-20020a5d9b10000000b007c76e492208mr4170773ion.13.1708545864703; Wed, 21 Feb 2024 12:04:24 -0800 (PST) Received: from google.com (161.74.123.34.bc.googleusercontent.com. [34.123.74.161]) by smtp.gmail.com with ESMTPSA id dl5-20020a056638278500b004742837424fsm1881404jab.53.2024.02.21.12.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 12:04:23 -0800 (PST) Date: Wed, 21 Feb 2024 20:04:21 +0000 From: Justin Stitt To: David Gow Cc: Linus Torvalds , Shuah Khan , Guenter Roeck , Rae Moar , Matthew Auld , Arunpravin Paneer Selvam , Christian =?utf-8?B?S8O2bmln?= , Kees Cook , =?utf-8?B?TWHDrXJh?= Canal , Rodrigo Vivi , Matthew Brost , Willem de Bruijn , Florian Westphal , Cassio Neri , Javier Martinez Canillas , Arthur Grillo , Brendan Higgins , Daniel Latypov , Stephen Boyd , David Airlie , Maxime Ripard , "David S . Miller" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org, linux-rtc@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-hardening@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 1/9] kunit: test: Log the correct filter string in executor_test Message-ID: <20240221200421.us26bqteeihiwiwu@google.com> References: <20240221092728.1281499-1-davidgow@google.com> <20240221092728.1281499-2-davidgow@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240221092728.1281499-2-davidgow@google.com> Hi, On Wed, Feb 21, 2024 at 05:27:14PM +0800, David Gow wrote: > KUnit's executor_test logs the filter string in KUNIT_ASSERT_EQ_MSG(), > but passed a random character from the filter, rather than the whole > string. > > This was found by annotating KUNIT_ASSERT_EQ_MSG() to let gcc validate > the format string. > > Fixes: 76066f93f1df ("kunit: add tests for filtering attributes") > Signed-off-by: David Gow Reviewed-by: Justin Stitt > --- > lib/kunit/executor_test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/kunit/executor_test.c b/lib/kunit/executor_test.c > index 22d4ee86dbed..3f7f967e3688 100644 > --- a/lib/kunit/executor_test.c > +++ b/lib/kunit/executor_test.c > @@ -129,7 +129,7 @@ static void parse_filter_attr_test(struct kunit *test) > GFP_KERNEL); > for (j = 0; j < filter_count; j++) { > parsed_filters[j] = kunit_next_attr_filter(&filter, &err); > - KUNIT_ASSERT_EQ_MSG(test, err, 0, "failed to parse filter '%s'", filters[j]); > + KUNIT_ASSERT_EQ_MSG(test, err, 0, "failed to parse filter from '%s'", filters); > } > > KUNIT_EXPECT_STREQ(test, kunit_attr_filter_name(parsed_filters[0]), "speed"); > -- > 2.44.0.rc0.258.g7320e95886-goog > Thanks Justin