darcs

Issue 1412 some unit tests fail sometimes

Title some unit tests fail sometimes
Priority urgent Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, tux_rocker
Assigned To tux_rocker
Topics

Created on 2009-04-02.19:46:53 by tux_rocker, last changed 2009-08-27.14:22:44 by admin.

Files
File name Uploaded Type Edit Remove
checking-commutex-either-way-fail.txt tux_rocker, 2009-04-19.15:02:37 text/plain
checking-inverses-being-valid-fail.txt tux_rocker, 2009-04-19.16:22:52 text/plain
checking-other-inverse-being-valid-fail-case-1.txt tux_rocker, 2009-04-02.19:46:50 text/plain
checking-other-inverse-being-valid-fail-case-2.txt tux_rocker, 2009-04-02.19:47:07 text/plain
Messages
msg7571 (view) Author: tux_rocker Date: 2009-04-02.19:46:50
Some unit tests fail sometimes. 

I have seen failures for "checking that merges are valid" and for "checking
other inverse being valid". I attached two failing data structures for the
latter case.
Attachments
msg7579 (view) Author: kowey Date: 2009-04-06.01:54:50
Sounds like something that should be high up on our priority list, even if it's
just to find out that our tests are too strict.
msg7721 (view) Author: tux_rocker Date: 2009-04-19.15:02:36
Now I see a failure in 'checking commutex either way'. Failing data attached.
Attachments
msg7722 (view) Author: kowey Date: 2009-04-20.09:29:40
Is there a good procedure for shrinking these down, perhaps automatically or
semi-automatically?
msg7899 (view) Author: tux_rocker Date: 2009-06-04.20:17:18
If, with the new capability of choosing the QuickCheck seed and size, you do a:

dist/build/unit/unit -r '1387922338 2147483372,86'

you get no less than five failures:

87 tests passed.Failing tests:
    Checking commutex either way... :
        Falsifiable (seed: 1814836306 2147483325, size: 86)
    Checking other inverse being valid... :
        Falsifiable (seed: 1387922338 2147483372, size: 86)
    Checking inverses being valid... :
        Falsifiable (seed: 1387922338 2147483372, size: 86)
    Checking that merges are valid... :
        Falsifiable (seed: 1814836306 2147483325, size: 86)
    Checking that commutes are equivalent... :
        Falsifiable (seed: 1814836306 2147483325, size: 86)

This hints that this QuickCheck seed and size combination makes QuickCheck
generate a very evil patch.
msg7902 (view) Author: kowey Date: 2009-06-05.07:04:04
We have reproducibility!  Thanks for the new framework.  Is there some sort of
useful textual representation of the patch (and the history) that we could save
and translate into something human-readable?
msg7903 (view) Author: tux_rocker Date: 2009-06-05.10:16:37
On Friday 05 June 2009 09:04:08 Eric Kow wrote:
> Eric Kow <kowey@darcs.net> added the comment:
>
> We have reproducibility!  Thanks for the new framework.  Is there some sort
> of useful textual representation of the patch (and the history) that we
> could save and translate into something human-readable?

The next step, I guess, is to introduce some trace statements in the test that 
print the patch using the show instance.  And introduce more statements to see 
where exactly it goes wrong. I'm going to publish testrunner to hackage first, 
and then I'll attack this issue if no-one else has taken it up yet.
msg7904 (view) Author: tux_rocker Date: 2009-06-05.11:00:44
BTW, QuickCheck already dumps the whole failing patch to the terminal so you can
already examine the offending patch without modifying a letter of code. But it
is quite big iirc.
msg7906 (view) Author: tux_rocker Date: 2009-06-10.09:11:57
The following patch updated the status of issue1412 to be resolved:

* resolve issue1412: also adjust maxline in PatchCheck upon insert_line 
Ignore-this: e7d84f5c6bc0175fff252296189abe1f
History
Date User Action Args
2009-04-02 19:46:53tux_rockercreate
2009-04-02 19:47:09tux_rockersetfiles: + checking-other-inverse-being-valid-fail-case-2.txt
nosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
2009-04-06 01:54:54koweysetpriority: bug -> urgent
nosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
status: unread -> unknown
messages: + msg7579
2009-04-19 15:02:40tux_rockersetfiles: + checking-commutex-either-way-fail.txt
nosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
messages: + msg7721
2009-04-19 16:22:55tux_rockersetfiles: + checking-inverses-being-valid-fail.txt
nosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
2009-04-20 09:29:42koweysetnosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
messages: + msg7722
2009-06-04 20:17:21tux_rockersetnosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
messages: + msg7899
2009-06-05 07:04:07koweysetnosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
messages: + msg7902
2009-06-05 10:16:40tux_rockersetnosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
messages: + msg7903
2009-06-05 11:00:47tux_rockersetnosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
messages: + msg7904
2009-06-09 12:52:50tux_rockersetnosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
assignedto: tux_rocker
2009-06-10 09:11:59tux_rockersetstatus: unknown -> resolved
nosy: kowey, simon, thorkilnaur, tux_rocker, dmitry.kurochkin
messages: + msg7906
2009-08-10 19:52:19tux_rockerlinkissue1160 superseder
2009-08-11 14:17:54koweylinkissue1280 superseder
2009-08-25 17:42:48adminsetnosy: + darcs-devel, - simon
2009-08-27 14:22:44adminsetnosy: kowey, darcs-devel, thorkilnaur, tux_rocker, dmitry.kurochkin