| Message ID | 20260126085747.36043-2-barnabas.pocze@ideasonboard.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
Hi Barnabás, Thank you for the patch. On Mon, Jan 26, 2026 at 09:57:47AM +0100, Barnabás Pőcze wrote: > This enables the removal of the exit code workaround since the exit code is > now propagated to the host[0]. However, the single argument `--rwdir` does > not work as it did in 1.18, and the `<path>=<path>` form must be used > otherwise virtme-ng refuses to start[1]: > > error: cannot initialize <path> inside the guest (path must be defined inside a valid overlay) > > And moreover, since virtme-ng now creates an overlay for `/tmp` by default[2], > and some tests require a /tmp with `O_TMPFILE` support, `/tmp` needs to be > mounted as tmpfs before running the tests. I suppose we can drop this if we merge your O_TMPFILE series first ? I'm fine merging the series in any order, we can always update this later, so > [0]: https://github.com/arighi/virtme-ng/pull/61 > [1]: https://github.com/arighi/virtme-ng/issues/409 > [2]: https://github.com/arighi/virtme-ng/pull/114 > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > changes in v2: > * move virtme-ng update to a separate commit > * use `--rwdir x=x` instead of `--overlay-rwdir` > * I created and referenced https://github.com/arighi/virtme-ng/issues/409 > because I don't really understand why the 1.18 behaviour was changed > > v1: https://patchwork.libcamera.org/patch/25942/ > --- > .gitlab-ci/test-lc-compliance.sh | 6 ++---- > .gitlab-ci/test-libcamera-qemu.sh | 11 +++++++---- > gitlab-ci.yml | 2 +- > 3 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/.gitlab-ci/test-lc-compliance.sh b/.gitlab-ci/test-lc-compliance.sh > index 6208723..a888cae 100755 > --- a/.gitlab-ci/test-lc-compliance.sh > +++ b/.gitlab-ci/test-lc-compliance.sh > @@ -14,7 +14,7 @@ libcamera_compliance() { > --verbose \ > --skip-modules \ > --force-9p \ > - --rwdir "$PWD/build" \ > + --rwdir "$PWD/build=$PWD/build" \ > --run /opt/linux/bzImage \ > --exec " \ > set -x; \ > @@ -25,12 +25,10 @@ libcamera_compliance() { > UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \ > GTEST_OUTPUT=xml:./build/lc-compliance-report.xml \ > lc-compliance -c Virtual0; \ > - echo \\\$? > ./build/.test-status; \ > " > > - local status=$(cat build/.test-status) > + local status=$? > echo "Test result exit state: $status" > - rm build/.test-status > > if [[ $status != 0 ]] ; then > exit $status > diff --git a/.gitlab-ci/test-libcamera-qemu.sh b/.gitlab-ci/test-libcamera-qemu.sh > index f9de5ab..03d39d3 100755 > --- a/.gitlab-ci/test-libcamera-qemu.sh > +++ b/.gitlab-ci/test-libcamera-qemu.sh > @@ -24,13 +24,16 @@ libcamera_unit_test() { > echo "Running libcamera tests in a qemu VM" > > virtme-ng --verbose --skip-modules --force-9p \ > - --rwdir "$PWD/build" \ > + --rwdir "$PWD/build=$PWD/build" \ > --run /opt/linux/bzImage \ > - --exec "meson test -C build --no-rebuild --print-errorlogs; echo \\\$? > build/.test-status" > + --exec " \ > + set -ex; \ > + mount -t tmpfs tmpfs /tmp/; \ > + meson test -C build --no-rebuild --print-errorlogs; \ > + " > > - local status=$(cat build/.test-status) > + local status=$? > echo "Test result exit state: $status" > - rm build/.test-status > > if [[ $status != 0 ]] ; then > exit $status > diff --git a/gitlab-ci.yml b/gitlab-ci.yml > index bd5df66..3f80cb8 100644 > --- a/gitlab-ci.yml > +++ b/gitlab-ci.yml > @@ -34,7 +34,7 @@ variables: > ca-certificates > git > VIRTME_GIT_URL: 'https://github.com/arighi/virtme-ng.git' > - VIRTME_GIT_REF: 'v1.18' > + VIRTME_GIT_REF: 'v1.40' You also need to update FDO_DISTRIBUTION_TAG. I know 1/2 already does so, and as we'll merge the two commits together nothing will break, but it's still a good practice. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > # Jobs that test individual commits need more history to find the common > # ancestor of the branch being tested and the default branch. Fetch up to 100
diff --git a/.gitlab-ci/test-lc-compliance.sh b/.gitlab-ci/test-lc-compliance.sh index 6208723..a888cae 100755 --- a/.gitlab-ci/test-lc-compliance.sh +++ b/.gitlab-ci/test-lc-compliance.sh @@ -14,7 +14,7 @@ libcamera_compliance() { --verbose \ --skip-modules \ --force-9p \ - --rwdir "$PWD/build" \ + --rwdir "$PWD/build=$PWD/build" \ --run /opt/linux/bzImage \ --exec " \ set -x; \ @@ -25,12 +25,10 @@ libcamera_compliance() { UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \ GTEST_OUTPUT=xml:./build/lc-compliance-report.xml \ lc-compliance -c Virtual0; \ - echo \\\$? > ./build/.test-status; \ " - local status=$(cat build/.test-status) + local status=$? echo "Test result exit state: $status" - rm build/.test-status if [[ $status != 0 ]] ; then exit $status diff --git a/.gitlab-ci/test-libcamera-qemu.sh b/.gitlab-ci/test-libcamera-qemu.sh index f9de5ab..03d39d3 100755 --- a/.gitlab-ci/test-libcamera-qemu.sh +++ b/.gitlab-ci/test-libcamera-qemu.sh @@ -24,13 +24,16 @@ libcamera_unit_test() { echo "Running libcamera tests in a qemu VM" virtme-ng --verbose --skip-modules --force-9p \ - --rwdir "$PWD/build" \ + --rwdir "$PWD/build=$PWD/build" \ --run /opt/linux/bzImage \ - --exec "meson test -C build --no-rebuild --print-errorlogs; echo \\\$? > build/.test-status" + --exec " \ + set -ex; \ + mount -t tmpfs tmpfs /tmp/; \ + meson test -C build --no-rebuild --print-errorlogs; \ + " - local status=$(cat build/.test-status) + local status=$? echo "Test result exit state: $status" - rm build/.test-status if [[ $status != 0 ]] ; then exit $status diff --git a/gitlab-ci.yml b/gitlab-ci.yml index bd5df66..3f80cb8 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -34,7 +34,7 @@ variables: ca-certificates git VIRTME_GIT_URL: 'https://github.com/arighi/virtme-ng.git' - VIRTME_GIT_REF: 'v1.18' + VIRTME_GIT_REF: 'v1.40' # Jobs that test individual commits need more history to find the common # ancestor of the branch being tested and the default branch. Fetch up to 100
This enables the removal of the exit code workaround since the exit code is now propagated to the host[0]. However, the single argument `--rwdir` does not work as it did in 1.18, and the `<path>=<path>` form must be used otherwise virtme-ng refuses to start[1]: error: cannot initialize <path> inside the guest (path must be defined inside a valid overlay) And moreover, since virtme-ng now creates an overlay for `/tmp` by default[2], and some tests require a /tmp with `O_TMPFILE` support, `/tmp` needs to be mounted as tmpfs before running the tests. [0]: https://github.com/arighi/virtme-ng/pull/61 [1]: https://github.com/arighi/virtme-ng/issues/409 [2]: https://github.com/arighi/virtme-ng/pull/114 Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- changes in v2: * move virtme-ng update to a separate commit * use `--rwdir x=x` instead of `--overlay-rwdir` * I created and referenced https://github.com/arighi/virtme-ng/issues/409 because I don't really understand why the 1.18 behaviour was changed v1: https://patchwork.libcamera.org/patch/25942/ --- .gitlab-ci/test-lc-compliance.sh | 6 ++---- .gitlab-ci/test-libcamera-qemu.sh | 11 +++++++---- gitlab-ci.yml | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) -- 2.52.0