[GHC] #1487: unix package: test needed for getLoginName

GHC ghc-devs at haskell.org
Fri Aug 22 23:38:40 UTC 2014


#1487: unix package: test needed for getLoginName
-------------------------------------+-------------------------------------
              Reporter:  simonmar    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  lowest      |        Milestone:
             Component:              |          Version:
  libraries/unix                     |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:  Linux       |       Difficulty:  Easy (less than 1
       Type of failure:  Incorrect   |  hour)
  result at runtime                  |       Blocked By:
             Test Case:              |  Related Tickets:  #8293
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by ezyang):

 * owner:  thomie =>
 * status:  closed => new
 * resolution:  fixed =>


Comment:

 Hello, the test is still failing for me, using GHC HEAD and the latest
 version of unix:

 {{{
 =====> user001(normal) 5 of 29 [0, 0, 0]
 cd . && '/5playpen/t-edyang/ghc-master/inplace/bin/ghc-stage2' -fforce-
 recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db
 -rtsopts -fno-ghci-history -o user001 user001.hs  -package unix
 >user001.comp.stderr 2>&1
 cd . && ./user001    >user001.run.stdout 2>user001.run.stderr
 Actual stdout output differs from expected:
 --- ./user001.stdout    2014-08-22 23:28:41.969906580 +0100
 +++ ./user001.run.stdout        2014-08-23 00:33:07.631841764 +0100
 @@ -3,11 +3,11 @@
  getEffectiveUserID: OK
  getEffectiveGroupID: OK
  getGroups: OK
 -getLoginName: OK
 +getLoginName: ERROR: getLoginName: does not exist (No such file or
 directory)
  getEffectiveUserName: OK
  getGroupEntryForID: OK
  getGroupEntryForName: OK
  getAllGroupEntries: OK
  getUserEntryForID: OK
 -getUserEntryForName: OK
 +getUserEntryForName: ERROR: getLoginName: does not exist (No such file or
 directory)
  getAllUserEntries: OK
 *** unexpected failure for user001(normal)

 Unexpected results from:
 TEST="user001"
 }}}

 On my box, running the following C program in terminal returns null:

 {{{
 #include <stdio.h>
 #include <unistd.h>
 int main() {
     printf("%p\n", getlogin());
 }
 }}}

 This StackOverflow post suggests that getlogin works quite unreliably:
 http://stackoverflow.com/questions/4785126/getlogin-c-function-returns-
 null-and-error-no-such-file-or-directory

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1487#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list