On Fri, Dec 01, 2023 at 08:08:31AM -0800, Sean Christopherson wrote: > On Thu, Nov 30, 2023, Sean Christopherson wrote: > > On Thu, Nov 30, 2023, Andrew Jones wrote: > > > A few __TEST_REQUIRE callers are appending their own newline, resulting > > > in an extra one being output. Rather than remove the newlines from > > > those callers, remove it from __TEST_REQUIRE and add newlines to all > > > the other callers, as __TEST_REQUIRE was the only output function > > > appending newlines and consistency is a good thing. > > > > > > Signed-off-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx> > > > --- > > > > > > Applies to kvm-x86/selftests (I chose that branch to ensure I got the > > > MAGIC_TOKEN change) > > > > Heh, and then I went and created a conflict anyways :-) > > > > https://lore.kernel.org/all/20231129224042.530798-1-seanjc@xxxxxxxxxx > > > > If there are no objections, I'll grab this in kvm-x86/selftests and sort out the > > MAGIC_TOKEN conflict. > > Actually, I misread the patch. I thought you were removing newlines, not adding > them. My thinking for TEST_REQUIRE() is that it should look and behave like > TEST_ASSERT(), not like a raw printf(). I.e. the caller provides the raw message, > and the framework handles formatting the final output. Darn. I'm not sure how I forgot about the other TEST_* functions. We indeed want them to be consistent. I'll reverse the patch. Also, it looks like when errno == EACCES, test_assert() will be missing a newline. I'll do a quick audit of TEST_* functions and their callers this time around. Thanks, drew