[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202404091644.9CFF82A@keescook>
Date: Tue, 9 Apr 2024 16:46:40 -0700
From: Kees Cook <keescook@...omium.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Sean Christopherson <seanjc@...gle.com>, Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
linux-kselftest@...r.kernel.org, llvm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests: kselftest_harness: Print empty string, not
empty fmt on PASS/FAIL
On Tue, Apr 09, 2024 at 04:09:20PM -0700, Jakub Kicinski wrote:
> On Tue, 9 Apr 2024 15:42:56 -0700 Sean Christopherson wrote:
> > - ksft_test_result_code(t->exit_code, test_name,
> > - diagnostic ? "%s" : "", diagnostic);
> > + ksft_test_result_code(t->exit_code, test_name, "%s", diagnostic);
>
> Have you tested that to make sure it doesn't change the output?
>
> .. warning: ^^ leading question ;)
Probably should be just this, without changing the NULL init?
ksft_test_result_code(t->exit_code, test_name, "%s",
diagnostic ?: "");
--
Kees Cook
Powered by blists - more mailing lists