diff mbox series

[v1,5/5] selftests/mm: soft-dirty should fail if a testcase fails

Message ID 20240419074344.2643212-6-ryan.roberts@arm.com (mailing list archive)
State New
Headers show
Series arm64/mm: uffd write-protect and soft-dirty tracking | expand

Commit Message

Ryan Roberts April 19, 2024, 7:43 a.m. UTC
Previously soft-dirty was unconditionally exiting with success, even if
one of it's testcases failed. Let's fix that so that failure can be
reported to automated systems properly.

Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
---
 tools/testing/selftests/mm/soft-dirty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.25.1

Comments

David Hildenbrand April 22, 2024, 9:33 a.m. UTC | #1
On 19.04.24 09:43, Ryan Roberts wrote:
> Previously soft-dirty was unconditionally exiting with success, even if
> one of it's testcases failed. Let's fix that so that failure can be
> reported to automated systems properly.
> 
> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
>   tools/testing/selftests/mm/soft-dirty.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/soft-dirty.c b/tools/testing/selftests/mm/soft-dirty.c
> index 7dbfa53d93a0..bdfa5d085f00 100644
> --- a/tools/testing/selftests/mm/soft-dirty.c
> +++ b/tools/testing/selftests/mm/soft-dirty.c
> @@ -209,5 +209,5 @@ int main(int argc, char **argv)
> 
>   	close(pagemap_fd);
> 
> -	return ksft_exit_pass();
> +	ksft_finished();
>   }
> --
> 2.25.1
> 

Guess that makes sense independent of all the other stuff?

Reviewed-by: David Hildenbrand <david@redhat.com>
Ryan Roberts April 23, 2024, 8:24 a.m. UTC | #2
On 22/04/2024 10:33, David Hildenbrand wrote:
> On 19.04.24 09:43, Ryan Roberts wrote:
>> Previously soft-dirty was unconditionally exiting with success, even if
>> one of it's testcases failed. Let's fix that so that failure can be
>> reported to automated systems properly.
>>
>> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
>> ---
>>   tools/testing/selftests/mm/soft-dirty.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/mm/soft-dirty.c
>> b/tools/testing/selftests/mm/soft-dirty.c
>> index 7dbfa53d93a0..bdfa5d085f00 100644
>> --- a/tools/testing/selftests/mm/soft-dirty.c
>> +++ b/tools/testing/selftests/mm/soft-dirty.c
>> @@ -209,5 +209,5 @@ int main(int argc, char **argv)
>>
>>       close(pagemap_fd);
>>
>> -    return ksft_exit_pass();
>> +    ksft_finished();
>>   }
>> -- 
>> 2.25.1
>>
> 
> Guess that makes sense independent of all the other stuff?

Yes definitely. What's the process here? Do I need to re-post as a stand-alone
patch? Or perhaps, Shuah, you could take this into your tree as is?

> 
> Reviewed-by: David Hildenbrand <david@redhat.com>

Thanks!
Muhammad Usama Anjum April 23, 2024, 8:44 a.m. UTC | #3
On 4/23/24 1:24 PM, Ryan Roberts wrote:
> On 22/04/2024 10:33, David Hildenbrand wrote:
>> On 19.04.24 09:43, Ryan Roberts wrote:
>>> Previously soft-dirty was unconditionally exiting with success, even if
>>> one of it's testcases failed. Let's fix that so that failure can be
>>> reported to automated systems properly.
>>>
>>> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

>>> ---
>>>   tools/testing/selftests/mm/soft-dirty.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/mm/soft-dirty.c
>>> b/tools/testing/selftests/mm/soft-dirty.c
>>> index 7dbfa53d93a0..bdfa5d085f00 100644
>>> --- a/tools/testing/selftests/mm/soft-dirty.c
>>> +++ b/tools/testing/selftests/mm/soft-dirty.c
>>> @@ -209,5 +209,5 @@ int main(int argc, char **argv)
>>>
>>>       close(pagemap_fd);
>>>
>>> -    return ksft_exit_pass();
>>> +    ksft_finished();
>>>   }
>>> -- 
>>> 2.25.1
>>>
>>
>> Guess that makes sense independent of all the other stuff?
> 
> Yes definitely. What's the process here? Do I need to re-post as a stand-alone
> patch? Or perhaps, Shuah, you could take this into your tree as is?
She can. But if she misses it or you want to post v2 of this current
series, you can just send this one separately. Usually I try to send
separate patches for trivial and discussion required patches so that there
isn't confusion of this kind.

> 
>>
>> Reviewed-by: David Hildenbrand <david@redhat.com>
> 
> Thanks!
> 
> 
>
Ryan Roberts April 24, 2024, 10:40 a.m. UTC | #4
On 23/04/2024 09:44, Muhammad Usama Anjum wrote:
> On 4/23/24 1:24 PM, Ryan Roberts wrote:
>> On 22/04/2024 10:33, David Hildenbrand wrote:
>>> On 19.04.24 09:43, Ryan Roberts wrote:
>>>> Previously soft-dirty was unconditionally exiting with success, even if
>>>> one of it's testcases failed. Let's fix that so that failure can be
>>>> reported to automated systems properly.
>>>>
>>>> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

Thanks!

> 
>>>> ---
>>>>   tools/testing/selftests/mm/soft-dirty.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/tools/testing/selftests/mm/soft-dirty.c
>>>> b/tools/testing/selftests/mm/soft-dirty.c
>>>> index 7dbfa53d93a0..bdfa5d085f00 100644
>>>> --- a/tools/testing/selftests/mm/soft-dirty.c
>>>> +++ b/tools/testing/selftests/mm/soft-dirty.c
>>>> @@ -209,5 +209,5 @@ int main(int argc, char **argv)
>>>>
>>>>       close(pagemap_fd);
>>>>
>>>> -    return ksft_exit_pass();
>>>> +    ksft_finished();
>>>>   }
>>>> -- 
>>>> 2.25.1
>>>>
>>>
>>> Guess that makes sense independent of all the other stuff?
>>
>> Yes definitely. What's the process here? Do I need to re-post as a stand-alone
>> patch? Or perhaps, Shuah, you could take this into your tree as is?
> She can. But if she misses it or you want to post v2 of this current
> series, you can just send this one separately. Usually I try to send
> separate patches for trivial and discussion required patches so that there
> isn't confusion of this kind.

Thanks - I'll do that.

> 
>>
>>>
>>> Reviewed-by: David Hildenbrand <david@redhat.com>
>>
>> Thanks!
>>
>>
>>
>
diff mbox series

Patch

diff --git a/tools/testing/selftests/mm/soft-dirty.c b/tools/testing/selftests/mm/soft-dirty.c
index 7dbfa53d93a0..bdfa5d085f00 100644
--- a/tools/testing/selftests/mm/soft-dirty.c
+++ b/tools/testing/selftests/mm/soft-dirty.c
@@ -209,5 +209,5 @@  int main(int argc, char **argv)

 	close(pagemap_fd);

-	return ksft_exit_pass();
+	ksft_finished();
 }