darcs

Patch 1402 make test-framework imports explicit (and 3 more)

Title make test-framework imports explicit (and 3 more)
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To
Milestone 2.10.2

Created on 2015-10-28.21:19:23 by ganesh, last changed 2015-11-07.18:11:22 by gh.

Files
File name Status Uploaded Type Edit Remove
add-comments-about-the-rejected-_hasduplicate_-cases.dpatch ganesh, 2015-11-06.23:50:04 application/x-darcs-patch
make-test_framework-imports-explicit.dpatch ganesh, 2015-10-28.21:19:21 application/x-darcs-patch
patch-preview.txt ganesh, 2015-10-28.21:19:21 text/x-darcs-patch
patch-preview.txt ganesh, 2015-11-06.23:50:04 text/x-darcs-patch
unnamed ganesh, 2015-10-28.21:19:21 text/plain
unnamed ganesh, 2015-11-06.23:50:04 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg18813 (view) Author: ganesh Date: 2015-10-28.21:19:22
The final patch in this sequence should hopefully make the
QuickCheck tests reliable - I've run them with a repeat
count of 10000 to smoke out the intermittent failures,
and then put in guards to avoid the cases that produce them.

4 patches for repository darcs-unstable@darcs.net:screened:

patch 654d84e69ba1dee198d799cce0f808a53f5b0aeb
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Mon Oct 26 18:45:50 GMT 2015
  * make test-framework imports explicit

patch 05a799ef3aab4ed511add489f5522219734b6ded
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Tue Oct 27 06:32:13 GMT 2015
  * Add an option to control the number of QuickCheck iterations

patch da5596a301aa5700a2769c8c3273cf51734c2fbf
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Tue Oct 27 22:26:06 GMT 2015
  * disambiguate imports in some test code

patch b1132764b60b343c0e5fa8a22f6082f26bfcb0ba
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Oct 28 19:53:43 GMT 2015
  * "Fix" some intermittent QuickCheck failures
Attachments
msg18818 (view) Author: gh Date: 2015-10-31.01:51:45
First 3 patches look good. So the idea is that the last patch introduces
the MightHaveDuplicate and MightBeEmptyHunk type classes to avoid
running tests on cases where they do not make sense.

Tests that are affected are in Generic.hs:

* recommute: not run if one of the patches is a duplicate. Why? Because
a duplicate patch has no effect, hence commuting it neither? Why does
not the 'hasDuplicate' tests occur earlier in the function?
* mergeCommute: same
* effectPreserving: rejected for empty hunks
* coalesceCommute: same

Changes in GenericUnwitnessed.hs reflect the changes in the
aforementioned functions.

The bundle applies cleanly in the 2.10 branch. It would be nice to have
them in 2.10.2 so we can really showcase quickcheck tests.
msg18820 (view) Author: ganesh Date: 2015-10-31.22:30:44
On 31/10/2015 01:51, Guillaume Hoffmann wrote:
> 
> Guillaume Hoffmann <guillaumh@gmail.com> added the comment:
> 
> First 3 patches look good. So the idea is that the last patch introduces
> the MightHaveDuplicate and MightBeEmptyHunk type classes to avoid
> running tests on cases where they do not make sense.
> 
> Tests that are affected are in Generic.hs:
> 
> * recommute: not run if one of the patches is a duplicate. Why? Because
> a duplicate patch has no effect, hence commuting it neither? 

In principle this test should pass, but in practice we know that there
are problems with duplicates in V2 conflict patches, and we don't have
any realistic hope of fixing them. So it seems simpler to just give up
on testing them too.

> Why does not the 'hasDuplicate' tests occur earlier in the function?

I think the duplicates appear after the merge operation, rather than in
the original patches.

Let me know if I can improve the comments in the code to make this
clearer (or of course if you disagree with the approach).

Cheers,

Ganesh
msg18821 (view) Author: gh Date: 2015-11-01.22:42:44
> Let me know if I can improve the comments in the code to make this
> clearer (or of course if you disagree with the approach).

Yes we probably need them..

I can inline your answers as comments and accept the bundle, or if you
want to be more accurate please go ahead and write them.

Guillaume
msg18836 (view) Author: ganesh Date: 2015-11-06.23:50:04
1 patch for repository darcs-unstable@darcs.net:screened:

patch b13e84921addfd0503190ea69726cabb448fb146
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Fri Nov  6 23:57:24 GMT 2015
  * add comments about the rejected 'hasDuplicate' cases
Attachments
msg18838 (view) Author: gh Date: 2015-11-07.18:11:21
Thanks!
History
Date User Action Args
2015-10-28 21:19:23ganeshcreate
2015-10-31 01:51:45ghsetmessages: + msg18818
2015-10-31 22:30:45ganeshsetmessages: + msg18820
2015-11-01 22:42:45ghsetmessages: + msg18821
2015-11-06 23:50:05ganeshsetfiles: + patch-preview.txt, add-comments-about-the-rejected-_hasduplicate_-cases.dpatch, unnamed
messages: + msg18836
2015-11-07 12:23:42ganeshsetstatus: needs-screening -> needs-review
2015-11-07 18:11:22ghsetstatus: needs-review -> accepted
messages: + msg18838
milestone: 2.10.2