Your message dated Fri, 18 Mar 2016 18:35:08 +0000
with message-id <[email protected]>
and subject line Bug#815519: fixed in haskell-mockery 0.3.2-4
has caused the Debian Bug report #815519,
regarding haskell-mockery: testsuite fails on some filesystems
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
815519: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815519
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:haskell-mockery
Version: 0.3.2-3
Severity: normal
Tags: patch
Hi,
haskell-mockery has a test that:
* creates file 'foo'
* gets its mtime (t0)
* sleeps ~10ms
* touches it
* gets its mtime (t1)
* asserts t1 > t0
This doesn't work on some filesystems, such as GNU/kFreeBSD's ufs or
GNU/Hurd's implementation of extfs, because those don't store mtime
with sub-second precision. Maybe not all Linux filesystems do either.
| Test.Mockery.Directory
| withFile
| creates a temporary file with the given contents
| touch
| creates an empty file
| creates any missing directories
| when file already exists
| updates modification time FAILED [1]
| does not modify file content
| Test.Mockery.Logging
| captureLogs
| returns all log messages of an action
| restores the original log sink
|
| Failures:
|
| test/Test/Mockery/DirectorySpec.hs:42:
| 1) Test.Mockery.Directory.touch, when file already exists, updates
| modification time
| predicate failed on: 2016-02-22 00:15:19 UTC
|
| Randomized with seed 569868309
|
| Finished in 0.0244 seconds
Since the test ran for only a fraction of a second, it's very unlikely
the file mtime (in whole seconds) would increment during that time.
Please could you increase the delay to >= 1 second so that the test
works properly on such filesystems.
I've attached a patch, although I don't know Haskell and I wasn't sure
what the two different intervals mean. So I added some extra zeros to
both, and it now runs for 1-2 seconds and it gets the expected result on
kfreebsd-amd64 with UFS.
Thanks!
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)
Kernel: kFreeBSD 10.1-0-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Subject: delay >1sec between testing mtime
From: Steven Chamberlain <[email protected]>
Date: Mon, 22 Feb 2016 00:03:42 +0000
Not all filesystems store mtime with sub-second precision. So,
delay for at least 1 second between sampling the test file's mtime.
--- ./test/Test/Mockery/DirectorySpec.hs.orig 2015-08-08 03:50:38.000000000 +0100
+++ ./test/Test/Mockery/DirectorySpec.hs 2016-02-21 23:59:34.327640846 +0000
@@ -35,8 +35,8 @@
before_ (writeFile name "bar") $ do
it "updates modification time" $ do
t0 <- getModificationTime name
- threadDelay 10000
- whenTravis (threadDelay 1000000)
+ threadDelay 1000000
+ whenTravis (threadDelay 10000000)
touch name
t1 <- getModificationTime name
t0 `shouldSatisfy` (< t1)
--- End Message ---
--- Begin Message ---
Source: haskell-mockery
Source-Version: 0.3.2-4
We believe that the bug you reported is fixed in the latest version of
haskell-mockery, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Joachim Breitner <[email protected]> (supplier of updated haskell-mockery
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 18 Mar 2016 19:22:55 +0100
Source: haskell-mockery
Binary: libghc-mockery-dev libghc-mockery-prof libghc-mockery-doc
Architecture: source amd64 all
Version: 0.3.2-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Haskell Group
<[email protected]>
Changed-By: Joachim Breitner <[email protected]>
Description:
libghc-mockery-dev - ${haskell:ShortDescription}${haskell:ShortBlurb}
libghc-mockery-doc - ${haskell:ShortDescription}${haskell:ShortBlurb}
libghc-mockery-prof - ${haskell:ShortDescription}${haskell:ShortBlurb}
Closes: 815519
Changes:
haskell-mockery (0.3.2-4) unstable; urgency=medium
.
* Ensure test suite works on file systems with low timestamp granularity
(Closes: #815519). Thanks to Steven Chamberlain for the patch.
Checksums-Sha1:
17b5636b86067857c1814937fabf4839fe19196f 2395 haskell-mockery_0.3.2-4.dsc
9e33f58b4ab59168061dd139104e3adf9ce50957 2532
haskell-mockery_0.3.2-4.debian.tar.xz
456fc98342cd968303425791c3ee4d3882f974d6 18106
libghc-mockery-dev_0.3.2-4_amd64.deb
9e8961cce13f497230bd9c4d740748dc0582165e 29916
libghc-mockery-doc_0.3.2-4_all.deb
50380e3eb3b3a4c076294af9d5316015c8e5d30d 14698
libghc-mockery-prof_0.3.2-4_amd64.deb
Checksums-Sha256:
e5b56c690437b0d869e8222e12d9d0bdd9e236df05dab29a61dec02b63140c27 2395
haskell-mockery_0.3.2-4.dsc
44ae9f32bada04ea410f200a64e5d286eb2839f57966ea7131fa975e87e7ab00 2532
haskell-mockery_0.3.2-4.debian.tar.xz
986ef58c434ed10b8f90ed3afad50851ae9661eae6fbff48f46f1ed2b8e9ee4b 18106
libghc-mockery-dev_0.3.2-4_amd64.deb
182fec287692117fea8520ad7320a0f92126d6d3f53b38799964c20e0ae650db 29916
libghc-mockery-doc_0.3.2-4_all.deb
49f65e59ea5cd9d3e143d7cc9fff68681fb1a3e8e4d7b72f3b2533eb6b9466ee 14698
libghc-mockery-prof_0.3.2-4_amd64.deb
Files:
d436e08ad40fdab5e4d7e49f9160ef87 2395 haskell extra haskell-mockery_0.3.2-4.dsc
9d84058666d37b675fb46e164481b1c5 2532 haskell extra
haskell-mockery_0.3.2-4.debian.tar.xz
f768d08c2d934c8ed4be2c7ef7db5266 18106 haskell extra
libghc-mockery-dev_0.3.2-4_amd64.deb
2a9594ec661e97fe93f87cb88bde3cdd 29916 doc extra
libghc-mockery-doc_0.3.2-4_all.deb
a424b5d75c0b387a03eb940b78b2e6da 14698 haskell extra
libghc-mockery-prof_0.3.2-4_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJW7Ef1AAoJED2QirPw+/UfqYEQAJv4js01/lvEH5GCJcMNnKxy
2FiJGzrTQJGNftJOJocRpax7iW/IMifqvLiA+tu7wwOEKYepHYjhZTvVGdW4Mug5
hR89+xcXJO21m8yNQu8I1mskeKN/ry4Q47Naet+c94LgopZk6/HlvionFdNp7FVr
DLDWePgXuAbsnULT6bXUX12D6bFyej/sEKtfQvNdEc5ZyzbwFGC0yZlMlJzgFn0+
iATDlc0sFSg644o8pPqVaQQM35nbtu4W/ZeuoTreS6brAmLWzymx/aJ4O69GetX4
kmF68BUR9Xp+/ZiHa7DD+9z8TrKKcTu4Q51EcgtdOloS1Pdat5xNuMP/x+zKrOMX
0AzPSHIcwBw07fGqfpuv14Uj9Xkc0PvFGN6sb4XIIicB33GkxQrLXqOhnS8os07X
r0rn8fX10ihKi84/rDJVvf5W9TPnC0wH/IJFM2XHxCzGagCZvVHZ6JQg6jq8i2xA
LIoLPyRQfGpCLHgT4xYGG553DwdSZqGHYO90xpICUm2RAf6IU4Bjf1Y9BEIW2tn8
zwuEQpnCyPs94xXdwEXlYa5Iwt9LxP1ah7Mu2Uh0r88aBWUsa9bw8dUeFilXyRRR
Pob7f1TzUp5w+XoAOMJrhsb0S3KwW+8WMkCLosBgd+/jXHGI5ycRkxFbuEy0IsqU
me7ZR9/C/ii+bsle/cCL
=PSAf
-----END PGP SIGNATURE-----
--- End Message ---