Skip to contentSkip to conversation

.cirrus.yml: basic compile and test for FreeBSD

PATCH In review Ed Maste 6 participants 16 messages Jan 16, 2019 – Jan 23, 2019

lore
Share & tools
lore

Ed Maste

author
#0 lore raw

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

From: Ed Maste <[email protected]>

---
 .cirrus.yml | 16 ++++++++++++++++
 MAINTAINERS |  8 ++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 .cirrus.yml
.cirrus.yml new file +16 -0
new file mode 100644
index 0000000000..df39d8e573
@@ -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 V=1
+    - gmake -j8 V=1 check
MAINTAINERS +8 -0
index af339b86db..f9da8c9cf0 100644
@@ -2483,6 +2483,14 @@ W: https://travis-ci.org/qemu/qemu
 W: https://app.shippable.com/github/qemu/qemu
 W: http://patchew.org/QEMU/
 
+FreeBSD Hosted Continuous Integration
+M: Ed Maste <[email protected]>
+M: Li-Wen Hsu <[email protected]>
+L: [email protected]
+S: Maintained
+F: .cirrus.yml
+W: https://cirrus-ci.com/github/qemu/qemu
+
 Guest Test Compilation Support
 M: Alex Bennée <[email protected]>
 R: Philippe Mathieu-Daudé <[email protected]>
Signature · 1 line
2.20.1
#1 lore raw
Quoted 16 lines · Ed Maste

From: Ed Maste <[email protected]>

---
 .cirrus.yml | 16 ++++++++++++++++
 MAINTAINERS |  8 ++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 .cirrus.yml
.cirrus.yml new file +0 -0
new file mode 100644
index 0000000000..df39d8e573

.cirrus.yml line 9

Quoted 9 lines
.cirrus.yml new file +9 -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

I'm still wondering why you need fontconfig and freetype2 here?

.cirrus.yml line 16

Quoted 7 lines
.cirrus.yml new file +7 -0
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8 V=1
+    - gmake -j8 V=1 check

Thomas

#2 lore raw
Quoted 4 lines · Thomas Huth
Quoted 2 lines

+ bison curl cyrus-sasl fontconfig freetype2 git glib gmake gnutls

I'm still wondering why you need fontconfig and freetype2 here?

They must have crept in from previous experimentation; confirmed still builds and tests pass on FreeBSD without them. New patch coming.

#3 lore raw

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

In reply to Ed Maste

From: Ed Maste <[email protected]>

---
Changes since v2:
* remove fontconfig and freetype2, noted by Thomas Huth

After this patch is applied someone with appropriate permissions will need to add the Cirrus-CI application in GitHub.

 .cirrus.yml | 16 ++++++++++++++++
 MAINTAINERS |  8 ++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 .cirrus.yml
.cirrus.yml new file +16 -0
new file mode 100644
index 0000000000..84d6f0519b
@@ -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 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8 V=1
+    - gmake -j8 V=1 check
MAINTAINERS +8 -0
index af339b86db..f9da8c9cf0 100644
@@ -2483,6 +2483,14 @@ W: https://travis-ci.org/qemu/qemu
 W: https://app.shippable.com/github/qemu/qemu
 W: http://patchew.org/QEMU/
 
+FreeBSD Hosted Continuous Integration
+M: Ed Maste <[email protected]>
+M: Li-Wen Hsu <[email protected]>
+L: [email protected]
+S: Maintained
+F: .cirrus.yml
+W: https://cirrus-ci.com/github/qemu/qemu
+
 Guest Test Compilation Support
 M: Alex Bennée <[email protected]>
 R: Philippe Mathieu-Daudé <[email protected]>
Signature · 1 line
2.20.1
Reviewed-by Tested-by on v3 1/1
#4 lore raw
Quoted 9 lines · On 2019-01-18 15:47, [email protected] wrote:

From: Ed Maste <[email protected]>

---
Changes since v2:
* remove fontconfig and freetype2, noted by Thomas Huth

After this patch is applied someone with appropriate permissions will need to add the Cirrus-CI application in GitHub.

Maybe even more important: It also works for forked repositories (once you've enabled the Cirrus-CI application from the marketplace), so people can use this to test their branches before sending PULL requests, e.g.:

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

Thus this sounds like a good idea to me.

Quoted 47 lines
 .cirrus.yml | 16 ++++++++++++++++
 MAINTAINERS |  8 ++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 .cirrus.yml
.cirrus.yml new file +16 -0
new file mode 100644
index 0000000000..84d6f0519b
@@ -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 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8 V=1
+    - gmake -j8 V=1 check
MAINTAINERS +8 -0
index af339b86db..f9da8c9cf0 100644
@@ -2483,6 +2483,14 @@ W: https://travis-ci.org/qemu/qemu
 W: https://app.shippable.com/github/qemu/qemu
 W: http://patchew.org/QEMU/
 
+FreeBSD Hosted Continuous Integration
+M: Ed Maste <[email protected]>
+M: Li-Wen Hsu <[email protected]>
+L: [email protected]
+S: Maintained
+F: .cirrus.yml
+W: https://cirrus-ci.com/github/qemu/qemu
+
 Guest Test Compilation Support
 M: Alex Bennée <[email protected]>
 R: Philippe Mathieu-Daudé <[email protected]>
#5 lore raw
Quoted 16 lines · Thomas Huth
Quoted 9 lines · On 2019-01-18 15:47, [email protected] wrote:

From: Ed Maste <[email protected]>

---
Changes since v2:
* remove fontconfig and freetype2, noted by Thomas Huth

After this patch is applied someone with appropriate permissions will need to add the Cirrus-CI application in GitHub.

Maybe even more important: It also works for forked repositories (once you've enabled the Cirrus-CI application from the marketplace), so people can use this to test their branches before sending PULL requests, e.g.:

Quoted 6 lines

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

Thus this sounds like a good idea to me.

Actually, scratch that Tested-by: My build timed out after 1 hour:

https://cirrus-ci.com/task/5113243459649536

I think you need to split it up / only build a subset of the targets with the --target-list of the configure script, to make sure that the task always finishes in < 1 h.
Something similar is also done in .travis.yml already, and I am also had to split it up for my gitlab-ci.yml, see here:

https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00226.html

Are you also sure that you can run with 8 CPUs here? ... I somehow doubt that, otherwise the build should not take more than 1 h, I think.

Thomas

#6 lore raw
Quoted 4 lines · Thomas Huth

Actually, scratch that Tested-by: My build timed out after 1 hour:

https://cirrus-ci.com/task/5113243459649536

Interesting. My build reports successful completion after a bit under 1/2 hr: https://cirrus-ci.com/build/5717787416723456

I notice that both your failing result and my successful result have as the last test:

PASS 57 test-hmp /aarch64/hmp/none+2MB

so I wonder if yours actually finished in 1/2 hr, but then waited for 1/2 hr on something that got stuck?

Quoted 2 lines

Are you also sure that you can run with 8 CPUs here? ... I somehow doubt that, otherwise the build should not take more than 1 h, I think.

To confirm, I have another build running now with
echo "Running with hw.ncpu=$(sysctl -n hw.ncpu)"
added.

#7 lore raw
Quoted 4 lines · Ed Maste

To confirm, I have another build running now with
echo "Running with hw.ncpu=$(sysctl -n hw.ncpu)"
added.

Confirmed - https://cirrus-ci.com/build/5768962257190912:
Running with hw.ncpu=8

If there is some sort of hanging test issue I could try wrapping it in timeout and outputting ps and other info upon failure.

#8 lore raw
Quoted 11 lines · Ed Maste
Quoted 4 lines · Ed Maste

To confirm, I have another build running now with
echo "Running with hw.ncpu=$(sysctl -n hw.ncpu)"
added.

Confirmed - https://cirrus-ci.com/build/5768962257190912:
Running with hw.ncpu=8

If there is some sort of hanging test issue I could try wrapping it in timeout and outputting ps and other info upon failure.

Ok, I did some more tests today. First two runs were simply killed:

https://cirrus-ci.com/build/5478092878381056
https://cirrus-ci.com/build/5754149284085760

Then I tried to decrease the amount of resources to 4 CPUs and 8G of RAM, but that timed out:

https://cirrus-ci.com/build/6003268728651776

Then I finally increased the CPUs back to 8 again, but stick with 8G of RAM, and that indeed finished in time successfully:

https://cirrus-ci.com/build/6218565876187136

So yes, looks like 8 CPUs should work indeed, but I think you should decrease the amount of memory of the VM, to make sure that it does not get killed so easily. 8 GB of RAM should also be enough to compile QEMU, as far as I can tell.

Thomas

PS: I also removed the V=1 in my tests since otherwise the log was way to verbose for my taste ... but that's likely really just a matter of taste.

#9 lore raw
Quoted 2 lines · Thomas Huth

PS: I also removed the V=1 in my tests since otherwise the log was way to verbose for my taste ... but that's likely really just a matter of taste.

I tend to run the 'make' step without V, and the 'make check' step with V=1 -- the compile part is fine at lower verbosity because the compiler will always emit a useful error message if something fails, but our test harness and tests are very bad at providing information about why something failed and so you need all the clues you can get when you're looking at the logfile for a failed build.

thanks
-- PMM

#10 lore raw
In reply to Thomas Huth
Quoted 10 lines · Thomas Huth

Then I finally increased the CPUs back to 8 again, but stick with 8G of RAM, and that indeed finished in time successfully:

https://cirrus-ci.com/build/6218565876187136

So yes, looks like 8 CPUs should work indeed, but I think you should decrease the amount of memory of the VM, to make sure that it does not get killed so easily. 8 GB of RAM should also be enough to compile QEMU, as far as I can tell.

Ok. I think Cirrus-CI might be having some growing pains.

I can submit a v4 patch with 8G for the VM and V=1 only on the tests, then after it gets merged keep an eye on results for a while before we consider enabling build notifications etc.

#11 lore raw
Quoted 12 lines · Ed Maste
Quoted 10 lines · Thomas Huth

Then I finally increased the CPUs back to 8 again, but stick with 8G of RAM, and that indeed finished in time successfully:

https://cirrus-ci.com/build/6218565876187136

So yes, looks like 8 CPUs should work indeed, but I think you should decrease the amount of memory of the VM, to make sure that it does not get killed so easily. 8 GB of RAM should also be enough to compile QEMU, as far as I can tell.

Quoted 5 lines

Ok. I think Cirrus-CI might be having some growing pains.

I can submit a v4 patch with 8G for the VM and V=1 only on the tests, then after it gets merged keep an eye on results for a while before we consider enabling build notifications etc.

Sounds like a plan!

Thanks,
Thomas

#12 lore raw
In reply to [email protected]
Quoted 9 lines · [email protected] writes:

From: Ed Maste <[email protected]>

---
Changes since v2:
* remove fontconfig and freetype2, noted by Thomas Huth

After this patch is applied someone with appropriate permissions will need to add the Cirrus-CI application in GitHub.

I should be able to add CirrusCI to the QEMU project github when we merge. I see there is another revision coming in so I''ll wait for that before I queue it up.

Quoted 36 lines
 .cirrus.yml | 16 ++++++++++++++++
 MAINTAINERS |  8 ++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 .cirrus.yml
.cirrus.yml new file +16 -0
new file mode 100644
index 0000000000..84d6f0519b
@@ -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 git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8 V=1
+    - gmake -j8 V=1 check
MAINTAINERS +1 -0
index af339b86db..f9da8c9cf0 100644
@@ -2483,6 +2483,14 @@ W: https://travis-ci.org/qemu/qemu
 W: https://app.shippable.com/github/qemu/qemu
 W: http://patchew.org/QEMU/
 
+FreeBSD Hosted Continuous Integration

MAINTAINERS W: https://travis-ci.org/qemu/qemu · line 2496

Quoted 10 lines
MAINTAINERS +7 -0
+M: Ed Maste <[email protected]>
+M: Li-Wen Hsu <[email protected]>
+L: [email protected]
+S: Maintained
+F: .cirrus.yml
+W: https://cirrus-ci.com/github/qemu/qemu
+
 Guest Test Compilation Support
 M: Alex Bennée <[email protected]>
 R: Philippe Mathieu-Daudé <[email protected]>

--
Alex Bennée

#13 lore raw
Quoted 4 lines · Alex Bennée

I should be able to add CirrusCI to the QEMU project github when we merge. I see there is another revision coming in so I''ll wait for that before I queue it up.

Do you mean my eadd119 commit "cirrus: tail dmesg to see if this is due to OOM"? I didn't intend to submit that (at least not in exactly the current form); I added it while looking at what I believe was a transient Cirrus failure.

#14 lore raw
Quoted 10 lines · Ed Maste
Quoted 4 lines · Alex Bennée

I should be able to add CirrusCI to the QEMU project github when we merge. I see there is another revision coming in so I''ll wait for that before I queue it up.

Do you mean my eadd119 commit "cirrus: tail dmesg to see if this is due to OOM"? I didn't intend to submit that (at least not in exactly the current form); I added it while looking at what I believe was a transient Cirrus failure.

Ahh no - I thought Thomas had a failure with long build times. However if it's a hanging test that goes away on retry it's good to go.

--
Alex Bennée

#15 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 block/curl.o
CC block/ssh.o
/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

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]