[pkg-go] Bug#802340: golang-github-spf13-fsync: FTBFS: TestSync is overly sensitive about mtimes

Anthony Fok foka at debian.org
Tue Nov 10 22:21:01 UTC 2015


Source: golang-github-spf13-fsync
Followup-For: Bug #802340

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello Chris,

Thank you very much for bringing this issue to my attention.

I have forwarded this issue to both the upstream and upstream^2 authors
at https://github.com/mostafah/fsync/issues/5.
(github/spf13/fsync was forked from github.com/mostafah/fsync in order
to add "Afero" filesystem abstraction support.

And indeed, I think you have discovered not only one,
but two separate problems!

> Me:
>     dh_auto_test -O--buildsystem=golang
>     go test -v github.com/spf13/fsync
>     === RUN TestSync
>     --- FAIL: TestSync (0.01s)
>             fsync_test.go:136: modification time for "dst" is 2015-10-18 17:53:51.170102485 +0000 UTC, should be 2015-10-18 17:53:51.166102492 +0000 UTC.
>     FAIL

Here, the modification times are off by milliseconds.  I can reliably
produce this like so:

    cd $GOPATH/src/github.com/spf13/fsync
    go test -c
    ./fsync.test -test.count 1000

Roughly 10% of the repeated tests would fail on my computer, whether it
is with ext4 or with tmpfs.  The upstream author investigated and confirmed
the bug, and is thinking how to best solve this problem.

> Builder:
>     fsync_test.go:136: modification time for "dst/a/b" is 2015-10-17 16:23:22.048 +0000 UTC, should be 2015-10-17 15:23:22.051578088 +0000 UTC.
>     fsync_test.go:136: modification time for "dst/c" is 2015-10-17 16:23:22.048 +0000 UTC, should be 2015-10-17 15:23:22.051578088 +0000 UTC.

Here, the modification times are off by an hour.  I wonder if it had
anything to do with daylight saving times at TZ=Etc/GMT-14 or some other
intentionally weird build conditions at jenkins.debian.net.  I haven't
been able to reproduce it yet myself.

But I am going to chicken out and just fix this FTBFS bug like this:

    override_dh_auto_test:
            dh_auto_test -O--buildsystem=golang || :

Hope the build systems will still trigger the second bug and show it
in the buildlog so we can investigate further, but let it pass without
complaining.  :-)

Thanks again, Chris!

Cheers,
Anthony

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJWQm3DAAoJEOolALQSxZrPlogP/jsA41ecoARKPv33XSrTxLg/
xmCCLZBn8a/ty3QIgtREaM/o5jSkGoxYdZ8FqPpPmRpFzxbRRyI7smVEgGmetJPV
cTPNXY/JvBAYJJI3vGnIKRTBimageIgY5bxy+ngz7VjWYuOZEBKYpKoEbKmgIUzm
3JbPcvNUeA2KYpVw4QsF2xsVfiO9bcIhv88Irz2DFNngPneG2MPUnqth5gdHV/OJ
U9Kr9C6GoiuIdkKG7q9eg/dR6o/WSbmEnUoTAh45sA6LMBt1iEJHy/Lk4c8Nma1W
NDE2SXHZ42iu2L0uLUu9OgYOhtEgUEjscr4wZC9ZnIxfQJGkzuYKbaIIwsC4O2tN
TBuxQpGekvFSY4Dy8gkMRC0LAv9YmsM2ySVUiM2sxTijOK6CKuwWoIk/5huIfoy2
ZIXNiH793LHRkbpm+OUGVP2u1BubCtQ+dDtqbSJlfjDyV2ZF0oJY2FlBv6cZuaxd
XFK4Om8DRlsSGuAs4cNYnLTfPG2xi5Bub9f7CRddlYIe5VXfTsMRAdyeg3Xxon/p
6/DXbJyX0BsOkxUqEWh+34oZSWTgbTWVdJ2b82SX37UJ0zM08FdjXfI05cRySgcT
nf8U8bpdd6V8TsRzgWovH1tSIL7bAgc97EbRcOv7VAWr02EjmUwxNw2wMQBPUYRY
JPdmbT+8M4v7wly7SrsW
=D/n1
-----END PGP SIGNATURE-----



More information about the Pkg-go-maintainers mailing list