[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0556ee55-6bdf-4392-8933-03539768f671@linuxfoundation.org>
Date: Tue, 11 Jun 2024 09:04:24 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Amer Al Shanawany <amer.shanawany@...il.com>,
Shuah Khan <shuah@...nel.org>,
Swarup Laxman Kotiaklapudi <swarupkotikalapudi@...il.com>,
Hugh Dickins <hughd@...gle.com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
kernel test robot <lkp@...el.com>, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests: proc: remove unreached code and fix build
warning
On 6/7/24 09:25, Alexey Dobriyan wrote:
> On Tue, Jun 04, 2024 at 08:25:31PM -0700, Andrew Morton wrote:
>> On Mon, 3 Jun 2024 17:24:47 +0300 Alexey Dobriyan <adobriyan@...il.com> wrote:
>>
>>> On Mon, Jun 03, 2024 at 02:42:20PM +0200, Amer Al Shanawany wrote:
>>>> fix the following warning:
>>>> proc-empty-vm.c:385:17: warning: ignoring return value of ‘write’
>>>
>>>> --- a/tools/testing/selftests/proc/proc-empty-vm.c
>>>> +++ b/tools/testing/selftests/proc/proc-empty-vm.c
>>>> @@ -381,9 +381,6 @@ static int test_proc_pid_statm(pid_t pid)
>>>
>>>> - if (0) {
>>>> - write(1, buf, rv);
>>>> - }
>>>
>>> no thanks
>>
>> Why not?
>>
>> Why does that code exist anyway? It at least needs a comment.
>
> OK, whatever.
>
> If test fails, it better record buggy output somewhere (to coredump or to terminal).
+1 on reporting results - the best way to do this is to add a meaningful message
for users to understand what went wrong.
Please suggest how you would like this warning addressed and report the error.
thanks,
-- Shuah
Powered by blists - more mailing lists