Subject: Re: [bug#36692] test failures

From: Robert Vollmert <[email-masked]>
Date: Tue, 16 Jul 2019 18:36:35 +0200

> On 16. Jul 2019, at 18:28, Marius Bakke <[email-masked]> wrote:
> 
> Robert Vollmert <[email-masked]> writes:
> 
>> I was able to run both tests from the build directory in /tmp,
>> and they both passed fine. Also they both involve user ids, I
>> suspect those might differ in the build container?
>> 
>> main = do
>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>    threadDelay (3*1000*1000)
>> 
>> main = do
>>    root <- getUserEntryForName "root"
>>    putStrLn (ue2String root)
>>    root' <- getUserEntryForID (userID root)
>>    putStrLn (ue2String root')
>>    if homeDirectory root == homeDirectory root' &&
>>       userShell     root == userShell     root'
>>        then putStrLn "OK"
>>        else putStrLn “Mismatch"
> 
> The only reliable user ID available in the build container is 'nobody'
> with UID and GID 65534 and the (see nix/libstore/build.cc:1862).
> 
> You can likely patch these tests to refer to that instead.

Thanks, I’ll give that a shot!

There’s something I don’t understand: Comments above the definition
of ghc-7 mention test failures, particularly one of these (posix010):

;; - Test posix010 tries to check the existence of a user on the system:
;;   getUserEntryForName: does not exist (no such user)

But I don’t see any place in the definitions of any of the GHC packages
(ghc-7, ghc-8.0, ghc-8.4) that patch any tests out, and tests aren’t
disabled either. So how can these packages apparently be fine?