www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Phobos unittests either spuriously fail or spuriously pass

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
I was surprised to see this in phobos master:

make -f posix.mak unittest

This passes. So do these:

make -f posix.mak BUILD=debug unittest
make -f posix.mak BUILD=release unittest

Now, this also passes:

make -f posix.mak BUILD=debug std/algorithm/sorting.test

But this fails in std/algorithm/sorting.d line 2266!

make -f posix.mak BUILD=release std/algorithm/sorting.test

I'll investigate this. Any insight is welcome!


Thanks,

Andrei
Aug 12 2016
parent reply Seb <seb wilzba.ch> writes:
On Friday, 12 August 2016 at 18:45:54 UTC, Andrei Alexandrescu 
wrote:
 I was surprised to see this in phobos master:

 make -f posix.mak unittest

 This passes. So do these:

 make -f posix.mak BUILD=debug unittest
 make -f posix.mak BUILD=release unittest

 Now, this also passes:

 make -f posix.mak BUILD=debug std/algorithm/sorting.test

 But this fails in std/algorithm/sorting.d line 2266!

 make -f posix.mak BUILD=release std/algorithm/sorting.test

 I'll investigate this. Any insight is welcome!


 Thanks,

 Andrei
That is known as well ;-) std.algorithm.sorting fails in the individual test due to entropy behaving weird in std.math: A couple of pointers: - https://github.com/dlang/phobos/pull/4587 (recognizes this problem and ignores std.algorithm.sorting from Travis) - https://github.com/dlang/phobos/pull/4719 (switches back to just run test_runner)
Aug 12 2016
parent reply Seb <seb wilzba.ch> writes:
On Friday, 12 August 2016 at 18:57:37 UTC, Seb wrote:
 On Friday, 12 August 2016 at 18:45:54 UTC, Andrei Alexandrescu 
 wrote:
 I was surprised to see this in phobos master:

 make -f posix.mak unittest

 This passes. So do these:

 make -f posix.mak BUILD=debug unittest
 make -f posix.mak BUILD=release unittest

 Now, this also passes:

 make -f posix.mak BUILD=debug std/algorithm/sorting.test

 But this fails in std/algorithm/sorting.d line 2266!

 make -f posix.mak BUILD=release std/algorithm/sorting.test

 I'll investigate this. Any insight is welcome!


 Thanks,

 Andrei
That is known as well ;-) std.algorithm.sorting fails in the individual test due to entropy behaving weird in std.math: A couple of pointers: - https://github.com/dlang/phobos/pull/4587 (recognizes this problem and ignores std.algorithm.sorting from Travis) - https://github.com/dlang/phobos/pull/4719 (switches back to just run test_runner)
I answered to quickly: 1) entropy is in std.numeric, not std.math 2) the issue has been reported a month ago - https://issues.dlang.org/show_bug.cgi?id=16227 for its caller
Aug 12 2016
parent Gary Willoughby <dev nomad.so> writes:
Maybe related: https://issues.dlang.org/show_bug.cgi?id=16204
Aug 14 2016