Show a patch.

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

{
    "id": 22407,
    "url": "https://patchwork.libcamera.org/api/patches/22407/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22407/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20241219130932.520066-1-barnabas.pocze@ideasonboard.com>",
    "date": "2024-12-19T13:09:32",
    "name": "[libcamera-ci,RFC,v4] Add job to run lc-compliance on the virtual pipeline handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "550fa3cc3d8a22eb36f0d5be3fad6dd05fb10609",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22407/mbox/",
    "series": [
        {
            "id": 4918,
            "url": "https://patchwork.libcamera.org/api/series/4918/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4918",
            "date": "2024-12-19T13:09:32",
            "name": "[libcamera-ci,RFC,v4] Add job to run lc-compliance on the virtual pipeline handler",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/4918/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22407/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22407/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 4540EC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Dec 2024 13:09:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9FA126846C;\n\tThu, 19 Dec 2024 14:09:38 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF2AE61899\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Dec 2024 14:09:35 +0100 (CET)",
            "from pb-laptop.local (185.221.140.157.nat.pool.zt.hu\n\t[185.221.140.157])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 158C3161\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Dec 2024 14:08:57 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"diVjwzN2\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734613737;\n\tbh=tn877aAlKw02GdDx0I2Qy2ud9whiaaAs4PKPK8TmpJM=;\n\th=From:To:Subject:Date:From;\n\tb=diVjwzN2oS80wwSO/pKZCE/L5EdrlPHw1JrhmJewKwAdRezn8r0jdlD8290jjID+S\n\tP8EcEeDuQFzivPdzVNeWt3FI1F5HT+3ULEdY5JmdoZ/NG51rwtrvsl9+rCiSU9p7Xj\n\tCb1qD+C4+6SJSOOk25ILzzzCkL0B5JC9Y1g+BSNA=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[libcamera-ci] [RFC PATCH v4] Add job to run lc-compliance on the\n\tvirtual pipeline handler",
        "Date": "Thu, 19 Dec 2024 14:09:32 +0100",
        "Message-ID": "<20241219130932.520066-1-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.47.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "Add a new job named `test-lc-compliance:virtual` that uses the\nbuild artifacts created by the `build-package:debug` job\non amd64 to run `lc-compliance` on the \"Virtual0\" camera\nin a virtual machine.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\nThis needs libcamera changes to work and to run in reasonable time:\n  * https://patchwork.libcamera.org/project/libcamera/list/?series=4874\n  * https://patchwork.libcamera.org/patch/22379/\n  * https://patchwork.libcamera.org/patch/22406/\n\nChanges in v4:\n  * add `set -x` to see the full commands run inside the virtual machine\n  * activate installed example configuration of the virtual pipeline handler\n\nChanges in v2:\n  * publish lc-compliance results to gitlab\n  * add and use script to install libcamera binary package\n---\n .gitlab-ci/test-lc-compliance.sh  | 40 +++++++++++++++++++++++++++++++\n .gitlab-ci/unpackage-libcamera.sh | 17 +++++++++++++\n gitlab-ci.yml                     | 22 ++++++++++++++++-\n 3 files changed, 78 insertions(+), 1 deletion(-)\n create mode 100755 .gitlab-ci/test-lc-compliance.sh\n create mode 100755 .gitlab-ci/unpackage-libcamera.sh\n\n--\n2.47.1",
    "diff": "diff --git a/.gitlab-ci/test-lc-compliance.sh b/.gitlab-ci/test-lc-compliance.sh\nnew file mode 100755\nindex 0000000..6208723\n--- /dev/null\n+++ b/.gitlab-ci/test-lc-compliance.sh\n@@ -0,0 +1,40 @@\n+#!/bin/bash\n+\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+# SPDX-FileCopyrightText: © 2024 Google Inc.\n+\n+set -e\n+\n+source \"$(dirname \"$0\")/lib.sh\"\n+\n+libcamera_compliance() {\n+\techo \"Running libcamera compliance tests in a qemu VM\"\n+\n+\tvirtme-ng \\\n+\t\t--verbose \\\n+\t\t--skip-modules \\\n+\t\t--force-9p \\\n+\t\t--rwdir \"$PWD/build\" \\\n+\t\t--run /opt/linux/bzImage \\\n+\t\t--exec \" \\\n+\t\t\tset -x; \\\n+\t\t\tmv /usr/local/share/libcamera/pipeline/virtual/virtual.yaml.example \\\n+\t\t\t   /usr/local/share/libcamera/pipeline/virtual/virtual.yaml; \\\n+\t\t\tLIBCAMERA_LOG_LEVELS=*:DEBUG \\\n+\t\t\tASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \\\n+\t\t\tUBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \\\n+\t\t\tGTEST_OUTPUT=xml:./build/lc-compliance-report.xml \\\n+\t\t\tlc-compliance -c Virtual0; \\\n+\t\t\techo \\\\\\$? > ./build/.test-status; \\\n+\t\t\"\n+\n+\tlocal status=$(cat build/.test-status)\n+\techo \"Test result exit state: $status\"\n+\trm build/.test-status\n+\n+\tif [[ $status != 0 ]] ; then\n+\t\texit $status\n+\tfi\n+}\n+\n+run libcamera_compliance\ndiff --git a/.gitlab-ci/unpackage-libcamera.sh b/.gitlab-ci/unpackage-libcamera.sh\nnew file mode 100755\nindex 0000000..9eb3192\n--- /dev/null\n+++ b/.gitlab-ci/unpackage-libcamera.sh\n@@ -0,0 +1,17 @@\n+#!/bin/bash\n+\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+# SPDX-FileCopyrightText: © 2024 Google Inc.\n+\n+set -e\n+\n+source \"$(dirname \"$0\")/lib.sh\"\n+\n+libcamera_unpackage() {\n+\techo \"Unpackage libcamera binaries\"\n+\n+\ttar -xvf libcamera-${CI_COMMIT_SHA}.tar.xz -C /\n+\tldconfig -v\n+}\n+\n+run libcamera_unpackage\ndiff --git a/gitlab-ci.yml b/gitlab-ci.yml\nindex d268285..ec19f55 100644\n--- a/gitlab-ci.yml\n+++ b/gitlab-ci.yml\n@@ -280,7 +280,7 @@ build-package:debug:\n       -D b_sanitize=address,undefined\n       -D cpp_debugstl=true\n       -D force_fallback_for=['gtest']\n-      -D pipelines=['auto']\n+      -D pipelines=['auto','virtual']\n       -D auto_features=disabled\n       -D lc-compliance=enabled\n       -D test=false\n@@ -411,3 +411,23 @@ test-unit:\n   artifacts:\n     reports:\n       junit: build/meson-logs/testlog.junit.xml\n+\n+test-lc-compliance:virtual:\n+  extends:\n+    - .fdo.distribution-image@debian\n+    - .libcamera-ci.debian:12\n+    - .libcamera-ci.scripts\n+  stage: test\n+  needs:\n+    - job: build-package:debug\n+      parallel:\n+        matrix:\n+          - ARCH: amd64\n+  tags:\n+    - kvm\n+  script:\n+    - $CI_PROJECT_DIR/.gitlab-ci/unpackage-libcamera.sh\n+    - $CI_PROJECT_DIR/.gitlab-ci/test-lc-compliance.sh\n+  artifacts:\n+    reports:\n+      junit: build/lc-compliance-report.xml\n",
    "prefixes": [
        "libcamera-ci",
        "RFC",
        "v4"
    ]
}