[libcamera-devel] [PATCH 5/5] test: v4l2_device: Switch most tests to vimc
Niklas Söderlund
niklas.soderlund at ragnatech.se
Sat May 11 13:07:26 CEST 2019
Hi Laurent,
Thanks for your feedback.
On 2019-05-11 05:49:27 +0300, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Wed, May 08, 2019 at 06:58:14PM +0200, Niklas Söderlund wrote:
> > The vimc driver delivers frames much faster then the vivid driver hence
> > most v4l2 device tests complete much quicker if vimc is used. The only
> > v4l2 device test which can't be switched is buffer_sharing as it needs
> > to import buffers somewhere, something vimc do not support.
> >
> > With this change I manage to shave of almost 7 seconds for each run of
> > all v4l2 device tests.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
>
> Nice improvement!
>
> How does this work after you reset all the links without enabling new
> ones ?
All tests based on vimc uses the "Raw Capture 0" node which is enabled
with an immutable link so there is no need (yet) to explicit enable
links for vimc based tests.
I'm hoping we can get vimc multistreaming support upstream somehow and a
test based on that would need to enable links in it's run() before
executing its tests.
>
> > ---
> > test/v4l2_device/capture_async.cpp | 2 +-
> > test/v4l2_device/double_open.cpp | 2 +-
> > test/v4l2_device/formats.cpp | 2 +-
> > test/v4l2_device/request_buffers.cpp | 2 +-
> > test/v4l2_device/stream_on_off.cpp | 2 +-
> > 5 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/test/v4l2_device/capture_async.cpp b/test/v4l2_device/capture_async.cpp
> > index fd428ff909f32999..69b1d5a13ed8675a 100644
> > --- a/test/v4l2_device/capture_async.cpp
> > +++ b/test/v4l2_device/capture_async.cpp
> > @@ -18,7 +18,7 @@ class CaptureAsyncTest : public V4L2DeviceTest
> > {
> > public:
> > CaptureAsyncTest()
> > - : V4L2DeviceTest("vivid", "vivid-000-vid-cap"), frames(0) {}
> > + : V4L2DeviceTest("vimc", "Raw Capture 0"), frames(0) {}
> >
> > void receiveBuffer(Buffer *buffer)
> > {
> > diff --git a/test/v4l2_device/double_open.cpp b/test/v4l2_device/double_open.cpp
> > index b402de04fca5ddbb..53850620889b0972 100644
> > --- a/test/v4l2_device/double_open.cpp
> > +++ b/test/v4l2_device/double_open.cpp
> > @@ -15,7 +15,7 @@ class DoubleOpen : public V4L2DeviceTest
> > {
> > public:
> > DoubleOpen()
> > - : V4L2DeviceTest("vivid", "vivid-000-vid-cap") {}
> > + : V4L2DeviceTest("vimc", "Raw Capture 0") {}
> > protected:
> > int run()
> > {
> > diff --git a/test/v4l2_device/formats.cpp b/test/v4l2_device/formats.cpp
> > index 3ac47f5cc665b62b..6be045ff754c4258 100644
> > --- a/test/v4l2_device/formats.cpp
> > +++ b/test/v4l2_device/formats.cpp
> > @@ -19,7 +19,7 @@ class Format : public V4L2DeviceTest
> > {
> > public:
> > Format()
> > - : V4L2DeviceTest("vivid", "vivid-000-vid-cap") {}
> > + : V4L2DeviceTest("vimc", "Raw Capture 0") {}
> > protected:
> > int run()
> > {
> > diff --git a/test/v4l2_device/request_buffers.cpp b/test/v4l2_device/request_buffers.cpp
> > index 794b083eb84d8d2e..7b7b06b2b409bd23 100644
> > --- a/test/v4l2_device/request_buffers.cpp
> > +++ b/test/v4l2_device/request_buffers.cpp
> > @@ -11,7 +11,7 @@ class RequestBuffersTest : public V4L2DeviceTest
> > {
> > public:
> > RequestBuffersTest()
> > - : V4L2DeviceTest("vivid", "vivid-000-vid-cap") {}
> > + : V4L2DeviceTest("vimc", "Raw Capture 0") {}
> >
> > protected:
> > int run()
> > diff --git a/test/v4l2_device/stream_on_off.cpp b/test/v4l2_device/stream_on_off.cpp
> > index 4902d5fd6d58a73d..b158b8e402c83156 100644
> > --- a/test/v4l2_device/stream_on_off.cpp
> > +++ b/test/v4l2_device/stream_on_off.cpp
> > @@ -11,7 +11,7 @@ class StreamOnStreamOffTest : public V4L2DeviceTest
> > {
> > public:
> > StreamOnStreamOffTest()
> > - : V4L2DeviceTest("vivid", "vivid-000-vid-cap") {}
> > + : V4L2DeviceTest("vimc", "Raw Capture 0") {}
> > protected:
> > int run()
> > {
>
> --
> Regards,
>
> Laurent Pinchart
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list