Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2358081rdb; Wed, 21 Feb 2024 05:27:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULcrKsY3Sj0mJmRytjVujUjHPHb+apP8oTkS7vLh3XxUx4Tv9Tm170mxtq7SgWb6lFw0eAXEEPBmAPkguJJb1/RMpLofzKD9F5OR+8Wg== X-Google-Smtp-Source: AGHT+IHnRkMxmz8VRFufTkOdAt/ridGSoc0uL6BA2wgYxWfwZBCdljXzhgVA8j1q7GaiLGsJVTXD X-Received: by 2002:a05:6808:1141:b0:3c0:448a:5d61 with SMTP id u1-20020a056808114100b003c0448a5d61mr21530545oiu.32.1708522036219; Wed, 21 Feb 2024 05:27:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708522036; cv=pass; d=google.com; s=arc-20160816; b=eH6eUlYDPTI6zMItQn1ZyKb8QOTY2qbEj4Wm+7UzrMQ06N9W37neS1xYB4GnnOfJHs bHy8915mY1PzglGi20ViWk2VqDOYKct6pn05pKvHzkU2ySGdJSmky2OuGkwoo4pyd5/q c3Dbj+nCtHadz52cIaHXyqnCuLetGkvkwJO/+VOvmH5V13li8br9m10uGTbzWeV2HDvp u/dRvNe1zXoKObGW1xqubzw1B4iRW6zK1ow+bjD6XlSamh1t8Jh5VApnGbVbt566i7CK svSz17WgR4rkCTj5c7ew12uRVG0ME/Q0BUJdKJ8qWGo0atuHDHP+GPFltrwHli1pGb1m LpDA== 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:sender:dkim-signature; bh=OI7tqbj6mWKb61MysMY2DivYivNGwAjWTxPQEZuJVHY=; fh=2/wxfzTsxq764rpi/M8wUpTqNmrjg0S8QVfHzdmb2hM=; b=xF4/vayaMELP2Fh/d73pfPBUav9PBqNBFuj3RL8hyAbwno+OHvrPYqXjP52rkTb7fG sVGtpN1kjBGg7DWw2XaiwgofCpTYDYYx8F/QbIgQ4dKh74k620jqSyVbbzHnemG7zWcu 3E+OuzhVgrSoN6x9VxfGKKexf6pNc6g1IV6RuFLD1bT6I0uQwU2YgEU2kD0nVSF+IDU+ 4Pd6yxJgpbr1yumktt6yeYoC1QaE2vGENXZDHuw4AYQDeWGSrDE7RzEpsOlIo4xK429t 1HgJHFRPQEVuWoDjd77kZL3jxDWvRyfumpb+mQNjZU+dzwNm2F53DhoadHpL14RfRjEE EK9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y1LvHDmD; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-74789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74789-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iw12-20020a0562140f2c00b0068f2b0ee1edsi10694365qvb.265.2024.02.21.05.27.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 05:27:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y1LvHDmD; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-74789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74789-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EEB1F1C22EBC for ; Wed, 21 Feb 2024 13:27:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C20A7D3EE; Wed, 21 Feb 2024 13:25:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y1LvHDmD" Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 61F4D762C1; Wed, 21 Feb 2024 13:25:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521932; cv=none; b=c3zhOI5onkEJB06GrkE5h/wOfV1ykG4A0oID8H70Lhf1jqXeL84dXxSrKLwbhH4QzVlE03pRIqU566Loi1OcAWOr7nwZrRfHlMt9qp09s7BpwZDxmNPXihgSzUyEkua4Y19+nPnDPuDFlGmLm9xKLvdYV/xWBM+YrIPP2HdgFbs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521932; c=relaxed/simple; bh=Awv2ya/dCmyXIz+PUwM1HeJ90+1RVeiqxObGWE0hzLY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=b/YKcn8fD7cpaVmMd2hedUF7LL4ydXYgl6zeVzUqNHYUQl9xDO+4gEpdIythX9PA51lpIx8+vZssTbtro/1OgIgqx/V0JOd/pSHgg/hAsk1gf8oWq/71VqbyW74oI/Qt70VzPA7DKHIwhMsmVAL9OM8tOyiKWH1w1bEY9YK9ISA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Y1LvHDmD; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2997a9f4d61so2615130a91.3; Wed, 21 Feb 2024 05:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708521929; x=1709126729; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=OI7tqbj6mWKb61MysMY2DivYivNGwAjWTxPQEZuJVHY=; b=Y1LvHDmD+j9EJUHYcVk/3g7FWLgNLMLl8nz+xHgs18O9Be0EngqZsn3/XrOvN0EBOb 5Qyj3WntFZPlRmW1CcjsccFJguyw5u2lcF/WaV2GnRxu8hndChR/a0+EjGbmoJrsvZmd fEWOEb+Oa5+J0jBA3EV91bVZZXQkxGnHFjUQJ0XzyMputWn0rJeptGVP60S6ndZwy6vY 0/Pl4neVEHTVqwhS2hnQTIRuftU+BdoLYqVmfp9NVKVj9W3snL/Q/C+1xgcNU0qFB5o/ KWzJ++546+pSZ2rEwdCWVZLnqI6ZSowWJewRKnCYr4cuKUOQyPPbZAmbz9PS6vstJDWw BbFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708521929; x=1709126729; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OI7tqbj6mWKb61MysMY2DivYivNGwAjWTxPQEZuJVHY=; b=CHlFagmO5Xtst1d6lN3IzEmx2axZbkKifysUDAS1ViKtk8En7AIH0HUDZ+ncz51Pit itp35h3Tvykou1kTVL+FM6yc2lWcW9bqm8kSPLDvjDavoc4aXovYFj6TEbwvIZfVJPlN KVXJBfajOntaQ9s7TCneAU312uSNfAUDsapuVtjUlD7YOjtSZfOl9+YY1zTBBtSC6k/3 cc3E9Y0qQZr8L9oyNupZ/3V+lfMVHpaR/6r6FukcE85EHEd7mg+TTgwYZBKPtDV4y8rb Mac7cAcZOb/9yUL4AaW98tkPstPRUx+KkGpAUOuaA3wdz+iJQTqfBJHCD0oSLtCz6NVG 9D/A== X-Forwarded-Encrypted: i=1; AJvYcCVKlZ170aEBx72/zlaq6hL/y3MbzJileHXEFIIgM6ivrHTl8OmlP5aUTL7f3+K+x+LnpiTyVTVy9zuqVQV93qav90+psSWDg8V0uVhkD713SCjHGQQPprVlODYV55dxcJbYdQIT1k/xtjyBAKwVxyXILqyQ9/+bbXhRVVPsLWF79U7bkBpwcoVPBSIF6LW/wvS0ixQvs+4eXPsoqVjrEIdHPbxJuNztMi6/Vyg+TRiA0TVOY0HR9RwcpRR9QjdYU4Qh X-Gm-Message-State: AOJu0YwjQjenJThJJzPA7SF1BlqBuy1gmuqV2NKvkDOIsBHqQPtU1btl fEltS9y+4FPnMljIvemibqO60VyAfXsFEkNbL643e8QSoM0njbIk X-Received: by 2002:a17:90a:dd82:b0:299:5186:1989 with SMTP id l2-20020a17090add8200b0029951861989mr10159029pjv.37.1708521929579; Wed, 21 Feb 2024 05:25:29 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id ds15-20020a17090b08cf00b002992cf08af0sm1359109pjb.23.2024.02.21.05.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 05:25:28 -0800 (PST) Sender: Guenter Roeck Date: Wed, 21 Feb 2024 05:25:27 -0800 From: Guenter Roeck To: David Gow Cc: Linus Torvalds , Shuah Khan , Rae Moar , Matthew Auld , Arunpravin Paneer Selvam , Christian =?iso-8859-1?Q?K=F6nig?= , Kees Cook , =?iso-8859-1?Q?Ma=EDra?= 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: <8cfc6a3e-e618-4ddd-adca-4d6bf81a5e17@roeck-us.net> 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> 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 Tested-by: Guenter Roeck > --- > 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 >