[libcamera-devel] [PATCH] test: camera: buffer_import: Don't include <random>

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Feb 17 11:05:12 CET 2020


Hi Laurent,

On 16/02/2020 22:13, Laurent Pinchart wrote:
> The <random> header isn't needed since commit 6e1e847753fd ("test:
> camera: buffer_import: Update to FrameBuffer restrictions"). Don't
> include it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> ---
>  test/camera/buffer_import.cpp | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
> index 7c9cfafc2a47..ab6e74bd1671 100644
> --- a/test/camera/buffer_import.cpp
> +++ b/test/camera/buffer_import.cpp
> @@ -10,7 +10,6 @@
>  #include <algorithm>
>  #include <iostream>
>  #include <numeric>
> -#include <random>

Ayeee, are we really using randomness in our /tests/ ... how do we
repeat said tests when they fail, and get the same failure?

Presumably this is (was in this case) to 'increase' coverage somehow...

But random in tests scares me a little ...

As a general comment:

If we really want randomness in tests, I think we ought to make sure we
print out the a seed in the logs, and make sure we can reproduce in
event of a failure.

/me now see's other patches using random and goes to repeat that message
there.

--
Kieran


>  #include <vector>
>  
>  #include "device_enumerator.h"
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list