The mkdir and mkdirat tests fail on HP-UX 11.11:

  test-mkdir.h:36: assertion failed
  FAIL: test-mkdir

  test-mkdir.h:36: assertion failed
  FAIL: test-mkdirat

The reason is that mkdir returns EOPNOTSUPP instead of the expected
error codes ENOTDIR or ENOENT. This patch fixes it. OK ot commit?


2010-12-31  Bruno Haible  <[email protected]>

        mkdir, mkdirat tests: Avoid failure on HP-UX 11.11.
        * tests/test-mkdir.h (test_mkdir): Allow EOPNOTSUPP as alternative
        error code.

--- tests/test-mkdir.h.orig     Fri Dec 31 19:49:33 2010
+++ tests/test-mkdir.h  Fri Dec 31 19:47:59 2010
@@ -33,7 +33,7 @@
   ASSERT (errno == ENOTDIR || errno == EEXIST);
   errno = 0;
   ASSERT (func (BASE "file/dir", 0700) == -1);
-  ASSERT (errno == ENOTDIR || errno == ENOENT);
+  ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EOPNOTSUPP);
   ASSERT (unlink (BASE "file") == 0);
   errno = 0;
   ASSERT (func ("", 0700) == -1);

Reply via email to