[phobos] unittest failure on wine

Andrei Alexandrescu andrei at erdani.com
Fri Sep 17 06:54:58 PDT 2010


Yes, I always use -j. We should design unittests so they can be run in 
parallel, it saves a bunch of time.

Thanks for changing the unittest!

Andrei

On 9/17/10 3:38 CDT, Lars Tandle Kyllingstad wrote:
> Thanks, Shin!
>
> Now I understand what has happened.  I got thrown off by the fact that
> Andrei's mail indicated that the error originated in std.socket, but I
> suspect he was running make with -j.  Am I right, Andrei?  (That's
> probably not a good idea, btw. :)
>
> So the error actually occurs in the std.process unittest.  You are
> right, Shin, it's a Wine bug.  Or, I should say, *another* Wine bug -- I
> was already aware of a similar thing happening when a variable has a
> zero-length *name* (which shouldn't be allowed at all, I think).  I had
> already taken that fact into account in the unittest, and now I'll add
> this case too.
>
> -Lars
>
>
>
> On Fri, 2010-09-17 at 07:05 +0900, Shin Fujishiro wrote:
>> Lars Tandle Kyllingstad<lars at kyllingen.net>  wrote:
>>> I am not seeing that error.
>>>
>>> Also, I wrote the code that throws that exception, namely
>>> std.process.environment.opIndex(), and I have absolutely no clue how it
>>> can be thrown.  environment is rather new, and the only place it's used
>>> in Phobos right now is in its own unittest...
>>
>> Repro:
>>
>>      environment["std_process_empty"] = "";
>>      assert (environment["std_process_empty"] == "");
>>
>> I think it's a bug of Wine.  When a variable is an empty string ("\0"),
>> GetEnvironmentVariable(var, null, 0) should return 1.  But Wine's impl
>> returns 0.
>>
>>
>> Shin
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list