Bug#906429: systemd: Please raise timeout for tests (for riscv64)

2018-10-22 Thread Michael Biebl
Am 22.10.18 um 21:15 schrieb Karsten Merker:
> may I ping you on the merge request above? It would be great
> if it could be merged soon as that would resolve a large
> roadblock for the Debian riscv64 port.

If this is a pressing issue, you might want to consider adding
"nocheck" to your build environment.
Afaics, other unofficial ports do that as well and given the special
situation (slow architecture due to being fully emulated via qemu at
this point), this might help other packages as well which run a test suite.



Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#906429: systemd: Please raise timeout for tests (for riscv64)

2018-09-29 Thread Manuel A. Fernandez Montecelo
Em sáb, 29 de set de 2018 às 01:32, Manuel A. Fernandez Montecelo
 escreveu:
>
> Submitted merge request:
> https://salsa.debian.org/systemd-team/systemd/merge_requests/17
>
> Not tested, but will do during the weekend and will report back.

I have modified it slightly from the 1st version that I submitted as
Merge Request, and it works fine and passes all the tests when
building the package in 3 porterboxes: amd64, ppc64el and s390x.

So please tell me if you're happy with it in its current form, or
prefer to have it in other way.  If you want to change it slightly
yourself I'm happy that you do it without consultation -- I'm more
concerned with getting the issue fixed than authorship :)

Cheers.
-- 
Manuel A. Fernandez Montecelo 



Bug#906429: systemd: Please raise timeout for tests (for riscv64)

2018-09-28 Thread Manuel A. Fernandez Montecelo
Hi,

2018-09-04 22:44 GMT+02:00 Michael Biebl :
> On Fri, 17 Aug 2018 23:07:39 +0200 "Manuel A. Fernandez Montecelo"
>  wrote:
>
>> So perhaps debian/rules should be changed to use "meson test" instead,
>> as Meson upstream recommended, and so we can pass on the "-t 10" for
>> riscv64.
>
> I would prefer this approach
>
> Ideally this would be split into two commits:
> 1/ switching the existing ninja test to meson test
> 2/ adding the multiplier (for riscv64 alone or generally)
>
> Would be awesome if you can create a MR on salsa for that.

Submitted merge request:
https://salsa.debian.org/systemd-team/systemd/merge_requests/17

Not tested, but will do during the weekend and will report back.

Cheers.
-- 
Manuel A. Fernandez Montecelo 



Bug#906429: systemd: Please raise timeout for tests (for riscv64)

2018-09-04 Thread Michael Biebl
On Fri, 17 Aug 2018 23:07:39 +0200 "Manuel A. Fernandez Montecelo"
 wrote:

> So perhaps debian/rules should be changed to use "meson test" instead,
> as Meson upstream recommended, and so we can pass on the "-t 10" for
> riscv64.

I would prefer this approach

Ideally this would be split into two commits:
1/ switching the existing ninja test to meson test
2/ adding the multiplier (for riscv64 alone or generally)

Would be awesome if you can create a MR on salsa for that.

Regards,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#906429: systemd: Please raise timeout for tests (for riscv64)

2018-08-17 Thread Manuel A. Fernandez Montecelo

Hi again,

2018-08-17 16:24 Manuel A. Fernandez Montecelo:

[...]
To try to address it, I first tried to increase the timeout only for the riscv64
architecture, with this recipe in debian/rules (the lines added and commented
out):

 
 +++ systemd-239/debian/rules2018-08-16 17:02:43.0 +0200
 @@ -5,6 +5,12 @@

  export LC_ALL = C.UTF-8

 +#include /usr/share/dpkg/architecture.mk
 +#
 +#ifeq ($(DEB_HOST_ARCH),riscv64)
 +#TEST_TIMEOUT_MULTIPLIER = "-t 10"
 +#endif
 +
  include /usr/share/dpkg/default.mk

  ifeq ($(DEB_VENDOR),Ubuntu)
 @@ -282,6 +288,8 @@
  ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
 echo "01234567890123456789012345678901" > build-deb/machine-id
 # some tests hang under fakeroot, so disable fakeroot
 +#  env -u LD_PRELOAD 
SYSTEMD_MACHINE_ID_PATH=$(CURDIR)/build-deb/machine-id ninja 
$(TEST_TIMEOUT_MULTIPLIER) -C build-deb test || ( \
 +#
 env -u LD_PRELOAD 
SYSTEMD_MACHINE_ID_PATH=$(CURDIR)/build-deb/machine-id ninja -C build-deb test 
|| ( \
 cat build-deb/meson-logs/testlog.txt; \
 exit 1)
 

However, I believe that this would have worked if invoking "meson test"
directly, but not when invoking "ninja", because it doesn't pass the -t argument
down to "meson test", and there doesn't seem to be any other way to achieve
this.

There's an open issue about this upstream, but it doesn't seem like it's to be
implemented any time soon:

 https://github.com/mesonbuild/meson/issues/2037

 (An environment variable would be a possible solution, I left a comment
 there).


In that bug report, a devel said:

 "ninja test just calls meson test, so they should definitely switch to
 meson test if they can."

And they are not happy with using env variables to change the default
timeouts.

So perhaps debian/rules should be changed to use "meson test" instead,
as Meson upstream recommended, and so we can pass on the "-t 10" for
riscv64.

However, as I said, I don't have experience with meson/ninja, so I am
unaware of possible problems or drawbacks.


Cheers.
--
Manuel A. Fernandez Montecelo 



Bug#906429: systemd: Please raise timeout for tests (for riscv64)

2018-08-17 Thread Manuel A. Fernandez Montecelo
Source: systemd
Version: 239-7
Severity: normal
Tags: upstream patch
User: debian-ri...@lists.debian.org
Usertags: riscv64

Hi,

This package fails to build in riscv64 due to timeout of the tests (it varies,
but it's often around 5 test cases of the current ~300).

systemd is one of the two remaining packages left from the base set that we have
to patch and ship from "unreleased" instead of "unstable", and possibly the only
remaining one that makes impossible to use "debootstrap" at the moment, so it
would be very nice if this could be sorted out soonish.

Admittedly, this is a problem specially in this architecture due to having
buildds using qemu-system at the moment.  However, it's not the only one with
buildds running in qemu (although the others use qemu-user, AFAIK), or with slow
hardware or potentially with systems under load for other reasons, so it could
become a problem for other arches in the future also due to changes upstream (if
the tests start to take more time).

In my opinion, the fact that the buildds are slow by itself shouldn't be a
reason to fail tests, unless the times are truly disproportionate or disruptive
(e.g. taking hours, or more time than the build itself).  This is clearly not
the case, waiting 300s instead of 30s is still a very small % of the total time
to build, probably less than 1%.


To try to address it, I first tried to increase the timeout only for the riscv64
architecture, with this recipe in debian/rules (the lines added and commented
out):

  
  +++ systemd-239/debian/rules2018-08-16 17:02:43.0 +0200
  @@ -5,6 +5,12 @@
  
   export LC_ALL = C.UTF-8
  
  +#include /usr/share/dpkg/architecture.mk
  +#
  +#ifeq ($(DEB_HOST_ARCH),riscv64)
  +#TEST_TIMEOUT_MULTIPLIER = "-t 10"
  +#endif
  +
   include /usr/share/dpkg/default.mk
  
   ifeq ($(DEB_VENDOR),Ubuntu)
  @@ -282,6 +288,8 @@
   ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
  echo "01234567890123456789012345678901" > build-deb/machine-id
  # some tests hang under fakeroot, so disable fakeroot
  +#  env -u LD_PRELOAD 
SYSTEMD_MACHINE_ID_PATH=$(CURDIR)/build-deb/machine-id ninja 
$(TEST_TIMEOUT_MULTIPLIER) -C build-deb test || ( \
  +#
  env -u LD_PRELOAD 
SYSTEMD_MACHINE_ID_PATH=$(CURDIR)/build-deb/machine-id ninja -C build-deb test 
|| ( \
  cat build-deb/meson-logs/testlog.txt; \
  exit 1)
  

However, I believe that this would have worked if invoking "meson test"
directly, but not when invoking "ninja", because it doesn't pass the -t argument
down to "meson test", and there doesn't seem to be any other way to achieve
this.

There's an open issue about this upstream, but it doesn't seem like it's to be
implemented any time soon:

  https://github.com/mesonbuild/meson/issues/2037

  (An environment variable would be a possible solution, I left a comment
  there).


Anyway, so what I did was to use the patch attached to modify upstream in a
couple of places to increase or add explicitly timeout for some tests (instead
of the default of 30s), and this makes it build fine in the same systems used as
buildds now.

So please consider to apply this patch or any equivalent solution that you
prefer, to make unnecessary to build this package every time that there's a new
version, and to be able to use "debootstrap".


Thanks and cheers.
--
Manuel A. Fernandez Montecelo 
diff -Nru systemd-239/debian/changelog systemd-239/debian/changelog
--- systemd-239/debian/changelog2018-07-22 13:40:15.0 +0200
+++ systemd-239/debian/changelog2018-08-16 17:02:43.0 +0200
@@ -1,3 +1,10 @@
+systemd (239-7+0.riscv64.1) unreleased; urgency=medium
+
+  * Non-maintainer upload.
+  * riscv64: increase timeout for tests
+
+ -- Manuel A. Fernandez Montecelo   Thu, 16 Aug 2018 17:02:43 
+0200
+
 systemd (239-7) unstable; urgency=medium
 
   * autopkgtest: Add iputils-ping dependency to root-unittests.
diff -Nru systemd-239/debian/patches/riscv64-support.patch 
systemd-239/debian/patches/riscv64-support.patch
--- systemd-239/debian/patches/riscv64-support.patch1970-01-01 
01:00:00.0 +0100
+++ systemd-239/debian/patches/riscv64-support.patch2018-08-16 
17:02:43.0 +0200
@@ -0,0 +1,41 @@
+--- a/meson.build
 b/meson.build
+@@ -2382,7 +2382,8 @@
+ 
+ test('test-systemd-tmpfiles',
+  test_systemd_tmpfiles_py,
+- args : exe.full_path())
++ args : exe.full_path(),
++ timeout : 300)
+ # https://github.com/mesonbuild/meson/issues/2681
+ endif
+ 
+@@ -2559,7 +2560,7 @@
+ type = tuple.length() >= 5 ? tuple[4] : ''
+ defs = tuple.length() >= 6 ? tuple[5] : []
+ incs = tuple.length() >= 7 ? tuple[6] : includes
+-timeout = 30
++timeout = 300
+ 
+ name = sources[0].split('/')[-1].split('.')[0]
+ if