On Wed, Jun 18, 2025 at 07:47:19AM +0200, Thomas Weißschuh wrote:
>On Tue, Jun 17, 2025 at 11:57:48PM +0000, Wei Yang wrote:
>> On Tue, Jun 17, 2025 at 09:35:12AM +0200, Thomas Weißschuh wrote:
>
><snip>
>
>> >> +FIXTURE_SETUP(fixture_variant) {
>> >> + TH_LOG("setup %d", variant->value);
>> >> + self->testpid = getpid();
>> >> +}
>> >> +
>> >> +FIXTURE_TEARDOWN(fixture_variant) {
>> >> + TH_LOG("teardown same-process=%d", self->testpid == getpid());
>> >> +}
>> >> +
>> >> +TEST_F(fixture_variant, pass) {
>> >> + TH_LOG("before");
>> >> + ASSERT_EQ(0, 0);
>> >
>> >Please log the variant value from the test itself and the teardown function.
>> >Also I don't think we need the pid logging and before/after/ASSERT in this 
>> >test
>> >also, it is already validated in the other ones.
>> >
>> 
>> Sure, per my understanding, is this what you prefer?
>> 
>> 
>> FIXTURE_SETUP(fixture_variant) {
>>      TH_LOG("setup %d", variant->value);
>> }
>> 
>> FIXTURE_TEARDOWN(fixture_variant) {
>>      TH_LOG("teardown %d", variant->value);
>> }
>> 
>> TEST_F(fixture_variant, pass) {
>>      TH_LOG("before %d", variant->value);
>>      ASSERT_EQ(0, 0);
>>      TH_LOG("after %d", variant->value);
>
>I would drop the three lines above and just do:
>
>TH_LOG("test function %d", variant->value);
>

Got it, thanks.

>Also please note that my earlier comment about the patch prefix
>"selftests: harness:" should only apply to the patches really related to the
>harness.
>Not patch 2, which should use "selftests: kselftest:".
>

Hmm.. for patch 2, Muhammad mentioned it not comply with TAP guideline.

So I plan to drop it in next version.

>> }
>> 
>> 
>> -- 
>> Wei Yang
>> Help you, Help me

-- 
Wei Yang
Help you, Help me

Reply via email to