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



_______________________________________________
Bug-m4 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-m4

Reply via email to