Skip to contentSkip to conversation

gitlab-ci: Test Fedora capstone package

PATCH In review Philippe Mathieu-Daudé 3 participants 7 messages Jan 26, 2021

lore
Share & tools
lore
#0 lore raw

cover gitlab-ci: Test Fedora capstone package

Add a job for a supported feature: capstone.

Philippe Mathieu-Daudé (2):
docker: Install libcastone on Fedora
gitlab-ci: Test Fedora capstone package

 .gitlab-ci.yml                         | 7 +++++++
 tests/docker/dockerfiles/fedora.docker | 1 +
 2 files changed, 8 insertions(+)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 docker: Install libcastone on Fedora

As other packages might install the system capstone library, we want to test it too in our CI.

By default QEMU clones libcapstone from git, but a developer can force to use the system packaged library using:

  $ ./configure --enable-capstone=system
---
 tests/docker/dockerfiles/fedora.docker | 1 +
 1 file changed, 1 insertion(+)
tests/docker/dockerfiles/fedora.docker +1 -0
index 0b5053f2d09..a8d01c6703c 100644
@@ -6,6 +6,7 @@ ENV PACKAGES \
     brlapi-devel \
     bzip2 \
     bzip2-devel \
+    capstone-devel \
     ccache \
     clang \
     cyrus-sasl-devel \
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 gitlab-ci: Test Fedora capstone package

In reply to Philippe Mathieu-Daudé

Test building the 4 targets using the capstone disassembler with the capstone package provided on Fedora.

---
 .gitlab-ci.yml | 7 +++++++
 1 file changed, 7 insertions(+)
.gitlab-ci.yml +7 -0
index de3a3d25b58..913940656de 100644
@@ -493,6 +493,13 @@ build-tci:
     - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
     - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
 
+build-capstone-distrib:
+  <<: *native_build_job_definition
+  variables:
+    IMAGE: fedora
+    CONFIGURE_ARGS: --enable-capstone=system --disable-tools --disable-docs
+    TARGETS: arm-softmmu ppc-softmmu x86_64-linux-user s390x-linux-user
+
 # Alternate coroutines implementations are only really of interest to KVM users
 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
 build-coroutine-ucontext:
Signature · 1 line
2.26.2
#3 lore raw
Quoted 13 lines · Philippe Mathieu-Daudé

Test building the 4 targets using the capstone disassembler with the capstone package provided on Fedora.

---
 .gitlab-ci.yml | 7 +++++++
 1 file changed, 7 insertions(+)
.gitlab-ci.yml +0 -0
index de3a3d25b58..913940656de 100644

.gitlab-ci.yml build-tci: · line 501

Quoted 9 lines
.gitlab-ci.yml +6 -0
@@ -493,6 +493,13 @@ build-tci:
     - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
     - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
 
+build-capstone-distrib:
+  <<: *native_build_job_definition
+  variables:
+    IMAGE: fedora
+    CONFIGURE_ARGS: --enable-capstone=system --disable-tools --disable-docs
+    TARGETS: arm-softmmu ppc-softmmu x86_64-linux-user s390x-linux-user

Won't one of the existing jobs using Fedora automatically enable use of the system capstone ? I don't think we want to keep adding jobs for each new possible configure arg. Instead try to re-use existing jobs whereever possible.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#4 lore raw
Quoted 17 lines · Daniel P. Berrangé
Quoted 16 lines · Philippe Mathieu-Daudé

Test building the 4 targets using the capstone disassembler with the capstone package provided on Fedora.

---
 .gitlab-ci.yml | 7 +++++++
 1 file changed, 7 insertions(+)
.gitlab-ci.yml +0 -0
index de3a3d25b58..913940656de 100644
@@ -493,6 +493,13 @@ build-tci:
     - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
     - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
 
Quoted 11 lines

.gitlab-ci.yml build-tci: · line 501

Quoted 6 lines
.gitlab-ci.yml +6 -0
+build-capstone-distrib:
+  <<: *native_build_job_definition
+  variables:
+    IMAGE: fedora
+    CONFIGURE_ARGS: --enable-capstone=system --disable-tools --disable-docs
+    TARGETS: arm-softmmu ppc-softmmu x86_64-linux-user s390x-linux-user

Won't one of the existing jobs using Fedora automatically enable use of the system capstone ? I don't think we want to keep adding jobs for each new possible configure arg. Instead try to re-use existing jobs whereever possible.

I looked but couldn't find one. Eventually the TCI job.

As this is unlikely to fail often, I'll see with Thomas the other possible policies. Building this every month/release should be enough.

#5 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

Add a job for a supported feature: capstone.

Philippe Mathieu-Daudé (2):
docker: Install libcastone on Fedora
gitlab-ci: Test Fedora capstone package

  .gitlab-ci.yml                         | 7 +++++++
  tests/docker/dockerfiles/fedora.docker | 1 +
  2 files changed, 8 insertions(+)

I've posted a patch for this a couple of days ago already:

https://www.mail-archive.com/[email protected]/msg775255.html

Thomas

#6 lore raw
Quoted 7 lines · Thomas Huth
Quoted 6 lines · Philippe Mathieu-Daudé

Add a job for a supported feature: capstone.

Philippe Mathieu-Daudé (2):
   docker: Install libcastone on Fedora
   gitlab-ci: Test Fedora capstone package

Quoted 7 lines
Quoted 3 lines

  .gitlab-ci.yml                         | 7 +++++++ tests/docker/dockerfiles/fedora.docker | 1 +

  2 files changed, 8 insertions(+)

I've posted a patch for this a couple of days ago already:

https://www.mail-archive.com/[email protected]/msg775255.html

Oh I missed it, thanks.

Quoted 3 lines

 Thomas