[{"id":32832,"web_url":"https://patchwork.libcamera.org/comment/32832/","msgid":"<20241217164129.GE20432@pendragon.ideasonboard.com>","date":"2024-12-17T16:41:29","subject":"Re: [libcamera-ci] [RFC PATCH v3 4/4] Add job to run lc-compliance\n\ton the virtual pipeline handler","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Barnabás,\n\nThank you for the patch.\n\nOn Tue, Dec 17, 2024 at 04:31:53PM +0100, Barnabás Pőcze wrote:\n> Add a new job named `test-lc-compliance:virtual` that uses the\n> build artifacts created by the `build-package:debug` job\n> on amd64 to run `lc-compliance` on the \"Virtual0\" camera\n> in a virtual machine.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n> \n> This 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://gitlab.freedesktop.org/pobrn/libcamera/-/commit/ed4b5bc179ea405f2f01b85b4114720f67ce3595\n\nI've reviewed the first two links. I think you can already push patches\n1/4 to 3/4 from this series, until we finish discussing how to handle\nthe configuration file.\n\n> Changes in v2:\n>   * publish lc-compliance results to gitlab\n>   * add and use script to install libcamera binary package\n> \n> ---\n>  .gitlab-ci/test-lc-compliance.sh  | 37 +++++++++++++++++++++++++++++++\n>  .gitlab-ci/unpackage-libcamera.sh | 17 ++++++++++++++\n>  gitlab-ci.yml                     | 22 +++++++++++++++++-\n>  3 files changed, 75 insertions(+), 1 deletion(-)\n>  create mode 100755 .gitlab-ci/test-lc-compliance.sh\n>  create mode 100755 .gitlab-ci/unpackage-libcamera.sh\n> \n> diff --git a/.gitlab-ci/test-lc-compliance.sh b/.gitlab-ci/test-lc-compliance.sh\n> new file mode 100755\n> index 0000000..8c726fa\n> --- /dev/null\n> +++ b/.gitlab-ci/test-lc-compliance.sh\n> @@ -0,0 +1,37 @@\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\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\n> diff --git a/.gitlab-ci/unpackage-libcamera.sh b/.gitlab-ci/unpackage-libcamera.sh\n> new file mode 100755\n> index 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\n> diff --git a/gitlab-ci.yml b/gitlab-ci.yml\n> index 205c6ff..701d02f 100644\n> --- a/gitlab-ci.yml\n> +++ b/gitlab-ci.yml\n> @@ -273,7 +273,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> @@ -408,3 +408,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","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 734C7C32F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Dec 2024 16:41:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B884967FE6;\n\tTue, 17 Dec 2024 17:41:32 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 64B5F67FD3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Dec 2024 17:41:31 +0100 (CET)","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 CE0434C7;\n\tTue, 17 Dec 2024 17:40:53 +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=\"QGu+F8Kf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734453654;\n\tbh=csifHNVYO5w5cdEZEL6eTcZKeHZgMf3Uz1q/0s1aWgU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QGu+F8KfME4FmdJgefg5JTKSaiUA3Klu1cIIICaKaBZ06fxRwNX0Irwtr/54qoAKb\n\txA95O8N50AuQC2LYgfv7hJS2iIk7RLDJYtrvoBYlhCowWehOSEjLPxkmUF+xUu9Hzq\n\twLAORaXw2XDpttRtznvP0/Z6XUs7DzXKCCHAkqnk=","Date":"Tue, 17 Dec 2024 18:41:29 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-ci] [RFC PATCH v3 4/4] Add job to run lc-compliance\n\ton the virtual pipeline handler","Message-ID":"<20241217164129.GE20432@pendragon.ideasonboard.com>","References":"<20241217153153.140417-1-barnabas.pocze@ideasonboard.com>\n\t<20241217153153.140417-4-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20241217153153.140417-4-barnabas.pocze@ideasonboard.com>","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>"}},{"id":32871,"web_url":"https://patchwork.libcamera.org/comment/32871/","msgid":"<3ee4dd93-46a2-485f-933a-e126c3f4254f@ideasonboard.com>","date":"2024-12-18T12:51:10","subject":"Re: [libcamera-ci] [RFC PATCH v3 4/4] Add job to run lc-compliance\n\ton the virtual pipeline handler","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2024. 12. 17. 17:41 keltezéssel, Laurent Pinchart írta:\n> Hi Barnabás,\n> \n> Thank you for the patch.\n> \n> On Tue, Dec 17, 2024 at 04:31:53PM +0100, Barnabás Pőcze wrote:\n>> Add a new job named `test-lc-compliance:virtual` that uses the\n>> build artifacts created by the `build-package:debug` job\n>> on amd64 to run `lc-compliance` on the \"Virtual0\" camera\n>> in a virtual machine.\n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>> ---\n>>\n>> This 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://gitlab.freedesktop.org/pobrn/libcamera/-/commit/ed4b5bc179ea405f2f01b85b4114720f67ce3595\n> \n> I've reviewed the first two links. I think you can already push patches\n> 1/4 to 3/4 from this series, until we finish discussing how to handle\n> the configuration file.\n\nDone.\n\n\nRegards,\nBarnabás Pőcze\n\n> \n>> Changes in v2:\n>>    * publish lc-compliance results to gitlab\n>>    * add and use script to install libcamera binary package\n>>\n>> ---\n>>   .gitlab-ci/test-lc-compliance.sh  | 37 +++++++++++++++++++++++++++++++\n>>   .gitlab-ci/unpackage-libcamera.sh | 17 ++++++++++++++\n>>   gitlab-ci.yml                     | 22 +++++++++++++++++-\n>>   3 files changed, 75 insertions(+), 1 deletion(-)\n>>   create mode 100755 .gitlab-ci/test-lc-compliance.sh\n>>   create mode 100755 .gitlab-ci/unpackage-libcamera.sh\n>>\n>> diff --git a/.gitlab-ci/test-lc-compliance.sh b/.gitlab-ci/test-lc-compliance.sh\n>> new file mode 100755\n>> index 0000000..8c726fa\n>> --- /dev/null\n>> +++ b/.gitlab-ci/test-lc-compliance.sh\n>> @@ -0,0 +1,37 @@\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\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\n>> diff --git a/.gitlab-ci/unpackage-libcamera.sh b/.gitlab-ci/unpackage-libcamera.sh\n>> new file mode 100755\n>> index 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\n>> diff --git a/gitlab-ci.yml b/gitlab-ci.yml\n>> index 205c6ff..701d02f 100644\n>> --- a/gitlab-ci.yml\n>> +++ b/gitlab-ci.yml\n>> @@ -273,7 +273,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>> @@ -408,3 +408,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>","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 D5C08C32FE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Dec 2024 12:51:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ED470680A0;\n\tWed, 18 Dec 2024 13:51:15 +0100 (CET)","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 214CF68087\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Dec 2024 13:51:15 +0100 (CET)","from [192.168.33.16] (185.221.140.157.nat.pool.zt.hu\n\t[185.221.140.157])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CDE5B59D;\n\tWed, 18 Dec 2024 13:50:36 +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=\"HjKt6ww0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734526237;\n\tbh=rUuW2kAZbbFWOubSKkcpYAm5A/ULn806p9weyo6bw0k=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=HjKt6ww07FsnppB2JVLv21wKv6BWTWcoC84caZgOQtkZKUuaYyAIffnJ1Svz66JfU\n\t+Ia6nY3XUwTaTMohsyRWHj1Myw+86tmnPbnKsLlxLLsCmHT25lZ72RkBQGUk0+Butt\n\t12MxC9moLZkowt57T1dEygnzwvPUUMb2OXrRISR4=","Message-ID":"<3ee4dd93-46a2-485f-933a-e126c3f4254f@ideasonboard.com>","Date":"Wed, 18 Dec 2024 13:51:10 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [libcamera-ci] [RFC PATCH v3 4/4] Add job to run lc-compliance\n\ton the virtual pipeline handler","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20241217153153.140417-1-barnabas.pocze@ideasonboard.com>\n\t<20241217153153.140417-4-barnabas.pocze@ideasonboard.com>\n\t<20241217164129.GE20432@pendragon.ideasonboard.com>","Content-Language":"en-US, hu-HU","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","In-Reply-To":"<20241217164129.GE20432@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]