]> Savannah Git Hosting - gnulib.git/commitdiff
lchown tests: Be more permissive regarding errno values.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Dec 2018 02:11:34 +0000 (03:11 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 20 Dec 2018 02:11:34 +0000 (03:11 +0100)
Reported by Ivan Zakharyaschev <imz@altlinux.org>.

* tests/test-lchown.h (test_lchown): Recognize EOPNOTSUPP as an
alternative to ENOSYS.
* modules/lchown-tests (Depends-on): Add 'errno'.
* modules/fchownat-tests (Depends-on): Likewise.

ChangeLog
modules/fchownat-tests
modules/lchown-tests
tests/test-lchown.h

index f55c615b0e3293f1378c5e46fe8283dc0db3e60b..fd28f3b2c56268f4208456ff7ecb53c96605e37b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-12-19  Bruno Haible  <bruno@clisp.org>
+
+       lchown tests: Be more permissive regarding errno values.
+       Reported by Ivan Zakharyaschev <imz@altlinux.org>.
+       * tests/test-lchown.h (test_lchown): Recognize EOPNOTSUPP as an
+       alternative to ENOSYS.
+       * modules/lchown-tests (Depends-on): Add 'errno'.
+       * modules/fchownat-tests (Depends-on): Likewise.
+
 2018-12-18  Bruno Haible  <bruno@clisp.org>
 
        duplocale: Avoid test failure on AIX 7.
index 81adf7fe83fe60c2e207a4c8c2cbd3e0b1f306e4..e5fb7833f408a785a4be167a17703d207a3ac330 100644 (file)
@@ -7,6 +7,7 @@ tests/signature.h
 tests/macros.h
 
 Depends-on:
+errno
 ignore-value
 intprops
 mgetgroups
index c5bba89d50681a71cc55f445385c4c35ef762b4d..42b946014c12603317a3adb91f81d985f412b825 100644 (file)
@@ -6,6 +6,7 @@ tests/signature.h
 tests/macros.h
 
 Depends-on:
+errno
 ignore-value
 intprops
 mgetgroups
index bc10a50381f16b62d091cd8959bdd0d3cded881e..8bf79b1bf246db39933852c6cec64e89da028e78 100644 (file)
@@ -124,7 +124,7 @@ test_lchown (int (*func) (char const *, uid_t, gid_t), bool print)
       return 77;
     }
   result = func (BASE "dir/link2", -1, -1);
-  if (result == -1 && errno == ENOSYS)
+  if (result == -1 && (errno == ENOSYS || errno == EOPNOTSUPP))
     {
       ASSERT (unlink (BASE "dir/file") == 0);
       ASSERT (unlink (BASE "dir/link2") == 0);