GNU bug report logs - #14768
portage build of sys-apps/coreutils-8.20 fails tests

Previous Next

Package: coreutils;

Reported by: ReubenGarrett <at> gmail.com

Date: Tue, 2 Jul 2013 16:20:02 UTC

Severity: normal

Tags: moreinfo

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 14768 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: ReubenGarrett <at> gmail.com
Cc: 14768 <at> debbugs.gnu.org
Subject: Re: bug#14768: portage build of sys-apps/coreutils-8.20 fails tests
Date: Tue, 02 Jul 2013 10:40:07 -0700
Thanks for the bug report.
Does the following patch work, when applied to gnulib-tests/test-getlogin.c?
If so, the bug is already fixed upstream.
If not, please run test-getlogin under GDB and see why it's failing.

--- old/test-getlogin.c	2012-10-23 07:17:25.000000000 -0700
+++ new/test-getlogin.c	2013-04-24 14:38:30.257537968 -0700
@@ -1,5 +1,5 @@
 /* Test of getting user name.
-   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+   Copyright (C) 2010-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,9 +39,17 @@
   buf = getlogin ();
   if (buf == NULL)
     {
+      if (errno == ENOENT)
+        {
+          /* This can happen on GNU/Linux.  */
+          fprintf (stderr, "Skipping test: no entry in utmp file.\n");
+          return 77;
+        }
+
       /* getlogin() fails when stdin is not connected to a tty.  */
       ASSERT (errno == ENOTTY
               || errno == EINVAL /* seen on Linux/SPARC */
+              || errno == ENXIO
              );
 #if !defined __hpux /* On HP-UX 11.11 it fails anyway.  */
       ASSERT (! isatty (0));





This bug report was last modified 6 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.