[libcamera-devel] [PATCH 3/3] test: v4l2_videodevice: buffer_cache: Fail the test if no buffer from cache is obtained

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Apr 15 16:12:19 CEST 2020


Hi Umang,

On Wed, Apr 15, 2020 at 03:09:57AM +0000, Umang Jain wrote:
> On Wed, Apr 15, 2020 at 00:56, Laurent Pinchart wrote:
> > On Tue, Apr 14, 2020 at 07:06:59AM +0000, Umang Jain wrote:
> >> Failing the test guards against negative index (-ENOENT in this case)
> >> being passed to V4L2BufferCache::put().
> > 
> > Can this happens in practice ?
> 
> Well, V4L2BufferCache::put() accepts only unsigned int argument, so I 
> would say, it won't happen in practice.
> Still the patches seems correct to me but commit message should be 
> tweaked, is that right?

What I mean is, given how we use V4L2BufferCache in this test, can get()
return a negative value here ?

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list