Re: [PATCH] selftests: proc: remove unreached code and fix build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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).




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux