bug-gnulib
[Top][All Lists]
Advanced

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

M4 1.4.9b testsuite failure on HP-UX


From: Bruno Haible
Subject: M4 1.4.9b testsuite failure on HP-UX
Date: Thu, 31 May 2007 02:55:51 +0200
User-agent: KMail/1.5.4

On HP-UX 11.23 / ia64:

test-lseek.c:76: assertion failed
./test-lseek.sh[14]: 3086 Abort(coredump)
FAIL: test-lseek.sh

The reason is in case 2: although you tell the shell to close stdin and stdout,
when the test-lseek.c runs, it has open file descriptors 0 and 1. (This can be
verified with fcntl(0,F_GETFL) and fcntl(1,F_GETFL).) This happens with both
"sh" and "bash".

The following fixes it. OK to commit?


*** tests/test-lseek.c  28 May 2007 12:43:30 -0000      1.2
--- tests/test-lseek.c  31 May 2007 00:54:03 -0000
***************
*** 72,77 ****
--- 72,81 ----
        break;
  
      case '2': /* closed */
+       /* Explicitly close file descriptors 0 and 1.  The <&- and >&- in the
+          invoking shell are not enough on HP-UX.  */
+       close (0);
+       close (1);
        errno = 0;
        ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
        ASSERT (errno == EBADF);





reply via email to

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