Show a patch.

GET /api/1.1/patches/20376/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 20376,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20376/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20376/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20240624192941.22943-10-laurent.pinchart@ideasonboard.com>",
    "date": "2024-06-24T19:29:40",
    "name": "[09/10] test: gstreamer: Include missing sanitizer/asan_interface.h header",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "96ebf492e78e228c4048749be527a3762a710336",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20376/mbox/",
    "series": [
        {
            "id": 4413,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4413/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4413",
            "date": "2024-06-24T19:29:31",
            "name": "libcamera: Enable -Wmissing-declarations",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4413/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20376/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20376/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D6468BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Jun 2024 19:30:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4254A654BC;\n\tMon, 24 Jun 2024 21:30:27 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 27729654AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jun 2024 21:30:16 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 185B818D7;\n\tMon, 24 Jun 2024 21:29:54 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"UlZwKVqf\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719257394;\n\tbh=MLJQcwfndfHJYzzUbAmcbbUv6ZRcW1lyfHCSN7X2JW0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=UlZwKVqf78+mEp6pDwN7QsBR08YSwSUBwY5Zg/tkIs4yj+qL5aelvSDXu630kSM4D\n\tJfUN2u6g4+JpuQ7qQSYBb4OrodIZOO1w/Ewd7k6ifM+Q6655chDTHj71N7y8i3k/32\n\tVlBq+zzKTz1p7eBYxhmAHZm5CTSHWVBwQVGeBRig=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>",
        "Subject": "[PATCH 09/10] test: gstreamer: Include missing\n\tsanitizer/asan_interface.h header",
        "Date": "Mon, 24 Jun 2024 22:29:40 +0300",
        "Message-ID": "<20240624192941.22943-10-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.44.2",
        "In-Reply-To": "<20240624192941.22943-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20240624192941.22943-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The GStreamet tests define a __asan_default_options() function to\ninfluence the behaviour of ASan. The function is declared in\nsanitizer/asan_interface.h, but we don't include the header. This will\ncause missing declaration warnings when we enable the\n-Wmissing-declarations option.\n\nInclude the header to fix the issue. It can't be done unconditionally as\nnot all toolchains provide ASan, so check for its availability at\nconfiguration time.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/gstreamer/gstreamer_test.cpp | 6 ++++++\n test/gstreamer/meson.build        | 7 +++++++\n 2 files changed, 13 insertions(+)",
    "diff": "diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\nindex e8119b853e7e..a15fef0e0c07 100644\n--- a/test/gstreamer/gstreamer_test.cpp\n+++ b/test/gstreamer/gstreamer_test.cpp\n@@ -9,12 +9,17 @@\n \n #include <libcamera/base/utils.h>\n \n+#if HAVE_ASAN\n+#include <sanitizer/asan_interface.h>\n+#endif\n+\n #include \"gstreamer_test.h\"\n \n #include \"test.h\"\n \n using namespace std;\n \n+#if HAVE_ASAN\n extern \"C\" {\n const char *__asan_default_options()\n {\n@@ -26,6 +31,7 @@ const char *__asan_default_options()\n \treturn \"detect_leaks=false\";\n }\n }\n+#endif\n \n GstreamerTest::GstreamerTest(unsigned int numStreams)\n \t: pipeline_(nullptr), libcameraSrc_(nullptr)\ndiff --git a/test/gstreamer/meson.build b/test/gstreamer/meson.build\nindex f3ba5a23dfba..37ad125ef3fd 100644\n--- a/test/gstreamer/meson.build\n+++ b/test/gstreamer/meson.build\n@@ -11,8 +11,15 @@ gstreamer_tests = [\n ]\n gstreamer_dep = dependency('gstreamer-1.0', required : true)\n \n+gstreamer_test_args = []\n+\n+if asan_enabled\n+    gstreamer_test_args += ['-D', 'HAVE_ASAN=1']\n+endif\n+\n foreach test : gstreamer_tests\n     exe = executable(test['name'], test['sources'], 'gstreamer_test.cpp',\n+                     cpp_args : gstreamer_test_args,\n                      dependencies : [libcamera_private, gstreamer_dep],\n                      link_with : test_libraries,\n                      include_directories : test_includes_internal)\n",
    "prefixes": [
        "09/10"
    ]
}