bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14768: portage build of sys-apps/coreutils-8.20 fails tests


From: Paul Eggert
Subject: bug#14768: portage build of sys-apps/coreutils-8.20 fails tests
Date: Tue, 02 Jul 2013 10:40:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

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));






reply via email to

[Prev in Thread] Current Thread [Next in Thread]