From: Shuah Khan <skhan@linuxfoundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Amer Al Shanawany <amer.shanawany@gmail.com>,
Shuah Khan <shuah@kernel.org>,
Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com>,
Hugh Dickins <hughd@google.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Javier Carrasco <javier.carrasco.cruz@gmail.com>,
kernel test robot <lkp@intel.com>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: proc: remove unreached code and fix build warning
Date: Tue, 11 Jun 2024 09:04:24 -0600 [thread overview]
Message-ID: <0556ee55-6bdf-4392-8933-03539768f671@linuxfoundation.org> (raw)
In-Reply-To: <eb9b2d6e-91eb-4fdc-b352-b3d0c290da2f@p183>
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@gmail.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
prev parent reply other threads:[~2024-06-11 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202404010211.ygidvMwa-lkp@intel.com>
2024-06-03 12:42 ` [PATCH] selftests: proc: remove unreached code and fix build warning Amer Al Shanawany
2024-06-03 14:24 ` Alexey Dobriyan
2024-06-05 3:25 ` Andrew Morton
2024-06-07 15:25 ` Alexey Dobriyan
2024-06-11 15:04 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0556ee55-6bdf-4392-8933-03539768f671@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=amer.shanawany@gmail.com \
--cc=hughd@google.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lkp@intel.com \
--cc=shuah@kernel.org \
--cc=swarupkotikalapudi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox