aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/all.T
diff options
context:
space:
mode:
authorGravatar Gregory Collins <greg@gregorycollins.net>2014-07-15 13:16:07 +0200
committerGravatar Gregory Collins <greg@gregorycollins.net>2014-07-15 13:16:07 +0200
commit30248d77d87ac7ec69b71cb3075d3ec64fa389fa (patch)
treeb11073e33e0a2dc9bce5d698022d2f0b34155854 /tests/all.T
parentc566040bf3a31bc83e7ecc29d819e058d6077625 (diff)
parentcad1ef27bb0a51bc68ebadb1297de1ae05bee9db (diff)
Merge pull request #1 from thomie/master
Enable test for getLoginName (Fixes #1487)
Diffstat (limited to 'tests/all.T')
-rw-r--r--tests/all.T14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/all.T b/tests/all.T
index 6b9fa15..b6bd433 100644
--- a/tests/all.T
+++ b/tests/all.T
@@ -11,7 +11,19 @@ test('forkprocess01', [ only_compiler_types(['ghc']),
# user001 may fail due to this bug in glibc:
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466647
#
-test('user001', normal, compile_and_run, ['-package unix'])
+# user001 may also fail on GNU/Linux when using a terminal emulator that doesn't
+# write login records to /var/run/utmp. Running:
+# $ logname
+# should print your login name. If it doesn't, the getLoginName test in user001
+# will fail, and that's why you are here. Try xterm.
+#
+# Ticket #1487. The glibc implementation of getlogin, which is called by
+# getLoginName, requires that a terminal is connected to filedescriptor 0.
+# See: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/getlogin.c
+# Therefore, we use the no_stdin option, and have to omit the 'ghci' way,
+# because it relies on redirecting stdin from file.
+#
+test('user001', [no_stdin, omit_ways(['ghci'])], compile_and_run, ['-package unix'])
test('resourceLimit', normal, compile_and_run, ['-package unix'])
x86FreeBsdFail = when(platform('i386-unknown-freebsd'), expect_fail)