[libcamera-devel] [PATCH] test: gstreamer: Fix indentation in comments

Nicolas Dufresne nicolas at ndufresne.ca
Thu Dec 7 16:43:02 CET 2023


Le mercredi 06 décembre 2023 à 00:49 +0000, Kieran Bingham via libcamera-devel a
écrit :
> Quoting Laurent Pinchart via libcamera-devel (2023-12-06 00:44:25)
> > A couple of comments are mis-indented in the gstreamer unit test. Fix
> > them, and reflow the text while at it.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> 
> 
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> 
> I think that's straightforward enough to just merge already.

Ack. It highlights the code though, which I wasn't aware of. Seems generally a
bad idea to always disable the protection again a possibly broken/crashing
plugin init in the system. I might suggest to find a way to only enable it for
specific "ASAN" issue workaround.


Nicolas

> 
> --
> Kieran
> 
> 
> > ---
> >  test/gstreamer/gstreamer_test.cpp | 23 +++++++++++------------
> >  1 file changed, 11 insertions(+), 12 deletions(-)
> > 
> > diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp
> > index 6ad0c15cd0e2..091f7bf70288 100644
> > --- a/test/gstreamer/gstreamer_test.cpp
> > +++ b/test/gstreamer/gstreamer_test.cpp
> > @@ -31,15 +31,14 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)
> >         : pipeline_(nullptr), libcameraSrc_(nullptr)
> >  {
> >         /*
> > -       * GStreamer by default spawns a process to run the
> > -       * gst-plugin-scanner helper. If libcamera is compiled with ASan
> > -       * enabled, and as GStreamer is most likely not, this causes the
> > -       * ASan link order check to fail when gst-plugin-scanner
> > -       * dlopen()s the plugin as many libraries will have already been
> > -       * loaded by then. Fix this issue by disabling spawning of a
> > -       * child helper process when scanning the build directory for
> > -       * plugins.
> > -       */
> > +        * GStreamer by default spawns a process to run the gst-plugin-scanner
> > +        * helper. If libcamera is compiled with ASan enabled, and as GStreamer
> > +        * is most likely not, this causes the ASan link order check to fail
> > +        * when gst-plugin-scanner dlopen()s the plugin as many libraries will
> > +        * have already been loaded by then. Fix this issue by disabling
> > +        * spawning of a child helper process when scanning the build directory
> > +        * for plugins.
> > +        */
> >         gst_registry_fork_set_enabled(false);
> >  
> >         /* Initialize GStreamer */
> > @@ -53,9 +52,9 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)
> >         }
> >  
> >         /*
> > -       * Remove the system libcamera plugin, if any, and add the
> > -       * plugin from the build directory.
> > -       */
> > +        * Remove the system libcamera plugin, if any, and add the plugin from
> > +        * the build directory.
> > +        */
> >         GstRegistry *registry = gst_registry_get();
> >         g_autoptr(GstPlugin) plugin = gst_registry_lookup(registry, "libgstlibcamera.so");
> >         if (plugin)
> > 
> > base-commit: 4eba2dc73c096d037a8a6390ff4a91ebbf1cedd4
> > -- 
> > Regards,
> > 
> > Laurent Pinchart
> > 



More information about the libcamera-devel mailing list