lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cfc6a3e-e618-4ddd-adca-4d6bf81a5e17@roeck-us.net>
Date: Wed, 21 Feb 2024 05:25:27 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: David Gow <davidgow@...gle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
	Shuah Khan <skhan@...uxfoundation.org>, Rae Moar <rmoar@...gle.com>,
	Matthew Auld <matthew.auld@...el.com>,
	Arunpravin Paneer Selvam <arunpravin.paneerselvam@....com>,
	Christian König <christian.koenig@....com>,
	Kees Cook <keescook@...omium.org>,
	Maíra Canal <mcanal@...lia.com>,
	Rodrigo Vivi <rodrigo.vivi@...el.com>,
	Matthew Brost <matthew.brost@...el.com>,
	Willem de Bruijn <willemb@...gle.com>,
	Florian Westphal <fw@...len.de>,
	Cassio Neri <cassio.neri@...il.com>,
	Javier Martinez Canillas <javierm@...hat.com>,
	Arthur Grillo <arthur.grillo@....br>,
	Brendan Higgins <brendan.higgins@...ux.dev>,
	Daniel Latypov <dlatypov@...gle.com>,
	Stephen Boyd <sboyd@...nel.org>, David Airlie <airlied@...il.com>,
	Maxime Ripard <mripard@...nel.org>,
	"David S . Miller" <davem@...emloft.net>,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	intel-xe@...ts.freedesktop.org, linux-rtc@...r.kernel.org,
	linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
	linux-hardening@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/9] kunit: test: Log the correct filter string in
 executor_test

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 <davidgow@...gle.com>

Tested-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ