Skip to contentSkip to conversation

.cirrus.yml: basic compile and test for FreeBSD

PATCH Superseded Ed Maste 9 participants 14 messages Jan 15, 2019 – Jan 21, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ed Maste

author
#0 lore raw

PATCH 1/1 .cirrus.yml: basic compile and test for FreeBSD

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

---
 .cirrus.yml     | 16 ++++++++++++++++
 create mode 100644 .cirrus.yml
.cirrus.yml new file +16 -0
new file mode 100644
index 0000000000..ff4bf75ad1
@@ -0,0 +1,16 @@
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-0-release-amd64
+    cpu: 8
+    memory: 24G
+  env:
+    CIRRUS_CLONE_DEPTH: 1
+  install_script: pkg install -y
+    bison curl cyrus-sasl fontconfig freetype2 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8
+    - gmake -j8 check
Signature · 1 line
2.20.1
#1 lore raw
Quoted 2 lines · Ed Maste

From: Ed Maste <[email protected]>

I'm not sure what part of the path between git send-email and the list moved this From: into the message body, but it's not intentional. If someone's going to pick up this patch please edit the commit message.

Quoted 2 lines

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other

...

#2 lore raw
Quoted 8 lines · Ed Maste
Quoted 2 lines · Ed Maste

From: Ed Maste <[email protected]>

I'm not sure what part of the path between git send-email and the list moved this From: into the message body, but it's not intentional. If someone's going to pick up this patch please edit the commit message.

I think this is 'git send-email' default behavior when your mail config FROM (here [email protected]) is different from the commit FROM ([email protected]), so if this patch is applied the author email is enforced to the commit FROM.

Quoted 5 lines
Quoted 3 lines

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other

...

#3 lore raw
In reply to Ed Maste
Quoted 6 lines · Ed Maste
Quoted 2 lines · Ed Maste

From: Ed Maste <[email protected]>

I'm not sure what part of the path between git send-email and the list moved this From: into the message body, but it's not intentional.

It doesn't hurt. 'git am' prefers the From: in the message body over the
From: from the message headers, if the two differ, because that is the only way some people have to get git to record their commits correctly due to the list having to rewrite their headers to avoid the mail being rejected from over-strict SPF settings. In your case, the two lines look identical (the list didn't rewrite your header From: to work around SPF); but it may be due to your 'git config format.from' settings.

Quoted 2 lines

If someone's going to pick up this patch please edit the commit message.

'git am' already does it automatically.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#4 lore raw
Quoted 8 lines · Eric Blake
Quoted 6 lines · Ed Maste
Quoted 2 lines · Ed Maste

From: Ed Maste <[email protected]>

I'm not sure what part of the path between git send-email and the list moved this From: into the message body, but it's not intentional.

Quoted 7 lines

It doesn't hurt. 'git am' prefers the From: in the message body over the
From: from the message headers, if the two differ, because that is the only way some people have to get git to record their commits correctly due to the list having to rewrite their headers to avoid the mail being rejected from over-strict SPF settings. In your case, the two lines look identical (the list didn't rewrite your header From: to work around SPF); but it may be due to your 'git config format.from' settings.

Hmm - I wrote that they looked identical, but I was reading your reply (where the From: matched your body), and not your original patch (where the two differed - the header From: included a subdomain not present in the commit authorship). You may also want to look at 'git config sendemail.from' and sendemail.envelopeSender configurations.

Quoted 6 lines
Quoted 3 lines

If someone's going to pick up this patch please edit the commit message.

'git am' already does it automatically.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#5 lore raw
In reply to Ed Maste

Hi

Quoted 7 lines · Ed Maste

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

Although I have never tested it, gitlab CI supports FreeBSD, macosx, windows...

What about patchew?

Quoted 31 lines
---
 .cirrus.yml     | 16 ++++++++++++++++
 create mode 100644 .cirrus.yml
.cirrus.yml new file +16 -1
new file mode 100644
index 0000000000..ff4bf75ad1
@@ -0,0 +1,16 @@
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-0-release-amd64
+    cpu: 8
+    memory: 24G
+  env:
+    CIRRUS_CLONE_DEPTH: 1
+  install_script: pkg install -y
+    bison curl cyrus-sasl fontconfig freetype2 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8
+    - gmake -j8 check
--

2.20.1

Signature · 1 line
Marc-André Lureau
#6 lore raw
Quoted 5 lines · Marc-André Lureau

Hi

Quoted 1 line · Ed Maste
Quoted 8 lines
Quoted 6 lines

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

Although I have never tested it, gitlab CI supports FreeBSD, macosx, windows...

I haven't looked into it in great detail. As far as I can tell it supports running tests on a provided FreeBSD instance via gitlab-runner, and is not a fully hosted CI service like Cirrus-CI, Travis, etc.

Quoted 1 line

What about patchew?

I'm also not very familiar with patchew. I did look at the three VM BSD scripts (tests/vm/*bsd) reported in my Cirrus-CI thread, but am not sure how they're invoked or how results are reported.

#7 lore raw
Quoted 14 lines · Ed Maste
Quoted 12 lines · Marc-André Lureau

Hi

Quoted 7 lines · Ed Maste

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

Quoted 6 lines
Quoted 1 line

Although I have never tested it, gitlab CI supports FreeBSD, macosx, windows...

I haven't looked into it in great detail. As far as I can tell it supports running tests on a provided FreeBSD instance via gitlab-runner, and is not a fully hosted CI service like Cirrus-CI, Travis, etc.

I'm using gitlab CI for my own tests before I send PULL requests, and as far as I understood the system, you only get a hosted Ubuntu- or Debian-based hosted CI on gitlab.com, see e.g.:

https://gitlab.com/huth/qemu/pipelines/43295916

For other environments, you've got to provide your own infrastructure with the appropriate runner scripts.

So yes, I think supporting Cirrus-CI makes sense indeed if we get FreeBSD coverage this way.

Thomas

#8 lore raw
In reply to Ed Maste
Quoted 18 lines · Ed Maste

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

---
 .cirrus.yml     | 16 ++++++++++++++++
 create mode 100644 .cirrus.yml
.cirrus.yml new file +0 -0
new file mode 100644
index 0000000000..ff4bf75ad1

.cirrus.yml line 10

Quoted 10 lines
.cirrus.yml new file +10 -0
@@ -0,0 +1,16 @@
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-0-release-amd64
+    cpu: 8
+    memory: 24G
+  env:
+    CIRRUS_CLONE_DEPTH: 1
+  install_script: pkg install -y
+    bison curl cyrus-sasl fontconfig freetype2 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir

Why freetype2 and fontconfig? QEMU does not use freetype, as far as I know...

Maybe rather add SDL2 or gtk3 if available?

.cirrus.yml line 16

Quoted 6 lines
.cirrus.yml new file +6 -0
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8
+    - gmake -j8 check

I think it would also be good to have an entry in the MAINTAINERS file for this new yml file - either in the section where we already have .travis.yml or in a new subsection under "Build and test automation"?

Thomas

#9 lore raw
In reply to Ed Maste
Quoted 6 lines · Ed Maste

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

Do you know if there is anyway to eyeball the state of the tree? So far I can watch the build run at:

https://cirrus-ci.com/github/stsquad/qemu

but unlike Travis and Shippable there doesn't seem to be a badge I could transclude into the wiki page:

https://wiki.qemu.org/Template:CIStatus

which means no one will know if the build fails. Travis also makes some noise on the IRC channel although given it's stability it's debatable how much longer we shall do that.

Quoted 18 lines
---
 .cirrus.yml     | 16 ++++++++++++++++
 create mode 100644 .cirrus.yml
.cirrus.yml new file +6 -0
new file mode 100644
index 0000000000..ff4bf75ad1
@@ -0,0 +1,16 @@
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-0-release-amd64
+    cpu: 8
+    memory: 24G
+  env:

.cirrus.yml line 16

Quoted 10 lines
.cirrus.yml new file +10 -0
+    CIRRUS_CLONE_DEPTH: 1
+  install_script: pkg install -y
+    bison curl cyrus-sasl fontconfig freetype2 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8
+    - gmake -j8 check

--
Alex Bennée

#10 lore raw
Quoted 15 lines · Alex Bennée
Quoted 6 lines · Ed Maste

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

Do you know if there is anyway to eyeball the state of the tree? So far I can watch the build run at:

https://cirrus-ci.com/github/stsquad/qemu

Quoted 8 lines

but unlike Travis and Shippable there doesn't seem to be a badge I could transclude into the wiki page:

https://wiki.qemu.org/Template:CIStatus

which means no one will know if the build fails. Travis also makes some noise on the IRC channel although given it's stability it's debatable how much longer we shall do that.

There is a badge:
https://cirrus-ci.org/guide/writing-tasks/#embedded-badges

For your case it'll be:
https://api.cirrus-ci.com/github/stsquad/qemu.svg?branch=review/dynamic-tlb-v6

Quoted 34 lines
Quoted 19 lines
---
 .cirrus.yml     | 16 ++++++++++++++++
 create mode 100644 .cirrus.yml
.cirrus.yml new file +6 -0
new file mode 100644
index 0000000000..ff4bf75ad1
@@ -0,0 +1,16 @@
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-0-release-amd64
+    cpu: 8
+    memory: 24G
+  env:

.cirrus.yml line 16

Quoted 10 lines
.cirrus.yml new file +10 -0
+    CIRRUS_CLONE_DEPTH: 1
+  install_script: pkg install -y
+    bison curl cyrus-sasl fontconfig freetype2 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8
+    - gmake -j8 check

--
Alex Bennée

Reviewed-by on v1 1/1
#11 lore raw
In reply to Ed Maste
Quoted 24 lines · Ed Maste

From: Ed Maste <[email protected]>

Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services.

---
 .cirrus.yml     | 16 ++++++++++++++++
 create mode 100644 .cirrus.yml
.cirrus.yml new file +6 -0
new file mode 100644
index 0000000000..ff4bf75ad1
@@ -0,0 +1,16 @@
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-0-release-amd64
+    cpu: 8
+    memory: 24G
+  env:

.cirrus.yml line 16

Quoted 10 lines
.cirrus.yml new file +10 -0
+    CIRRUS_CLONE_DEPTH: 1
+  install_script: pkg install -y
+    bison curl cyrus-sasl fontconfig freetype2 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8
+    - gmake -j8 check

While debugging I ended up adding V=1 to the two gmake invocations because it wasn't quite clear why it had failed last time. With that:

Does this patch come with an offer to be maintainer for FreeBSD/Cirrus CI stuff? In which case it will need a new entry in MAINTAINERS. I'm happy to feed patches to Peter until you can get keys signed and generate your own pull requests.

--
Alex Bennée

#12 lore raw
Quoted 8 lines · Alex Bennée

While debugging I ended up adding V=1 to the two gmake invocations because it wasn't quite clear why it had failed last time. With that:

Does this patch come with an offer to be maintainer for FreeBSD/Cirrus CI stuff? In which case it will need a new entry in MAINTAINERS.

OK - I'll send a v2 with V=1 added and adding myself (and another FreeBSD developer who's been adding FreeBSD Cirrus-CI support to a few projects) to MAINTAINERS.

#13 lore raw
In reply to Ed Maste
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END ===

CC hw/cpu/cluster.o
In function 'acpi_table_install',

    inlined from 'acpi_table_add' at /tmp/qemu-test/src/hw/acpi/core.c:296:5:
/tmp/qemu-test/src/hw/acpi/core.c:184:9: error: 'strncpy' specified bound 4 equals destination size [-Werror=stringop-truncation]
         strncpy(ext_hdr->sig, hdrs->sig, sizeof ext_hdr->sig);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/core.c:203:9: error: 'strncpy' specified bound 6 equals destination size [-Werror=stringop-truncation]
         strncpy(ext_hdr->oem_id, hdrs->oem_id, sizeof ext_hdr->oem_id);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/core.c:207:9: error: 'strncpy' specified bound 8 equals destination size [-Werror=stringop-truncation]
         strncpy(ext_hdr->oem_table_id, hdrs->oem_table_id,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 sizeof ext_hdr->oem_table_id);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/core.c:216:9: error: 'strncpy' specified bound 4 equals destination size [-Werror=stringop-truncation]
         strncpy(ext_hdr->asl_compiler_id, hdrs->asl_compiler_id,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 sizeof ext_hdr->asl_compiler_id);

---
make: *** [/tmp/qemu-test/src/rules.mak:69: hw/acpi/core.o] Error 1
make: *** Waiting for unfinished jobs....
/tmp/qemu-test/src/block/sheepdog.c: In function 'find_vdi_name':
/tmp/qemu-test/src/block/sheepdog.c:1239:5: error: 'strncpy' specified bound 256 equals destination size [-Werror=stringop-truncation]

     strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_VDI_TAG_LEN);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
make: *** [/tmp/qemu-test/src/rules.mak:69: block/sheepdog.o] Error 1
/tmp/qemu-test/src/hw/acpi/aml-build.c: In function 'build_header':
/tmp/qemu-test/src/hw/acpi/aml-build.c:1535:9: error: 'strncpy' specified bound 6 equals destination size [-Werror=stringop-truncation]

         strncpy((char *)h->oem_id, oem_id, sizeof h->oem_id);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/aml-build.c:1541:9: error: 'strncpy' specified bound 8 equals destination size [-Werror=stringop-truncation]
         strncpy((char *)h->oem_table_id, oem_table_id, sizeof(h->oem_table_id));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors

The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]