changeset 40045:753e4de5f3eb

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.
author Bruno Haible <bruno@clisp.org>
date Thu, 20 Dec 2018 03:11:34 +0100
parents 74054cd6d907
children cc26384787bc
files ChangeLog modules/fchownat-tests modules/lchown-tests tests/test-lchown.h
diffstat 4 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Dec 18 09:59:41 2018 +0100
+++ b/ChangeLog	Thu Dec 20 03:11:34 2018 +0100
@@ -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.
--- a/modules/fchownat-tests	Tue Dec 18 09:59:41 2018 +0100
+++ b/modules/fchownat-tests	Thu Dec 20 03:11:34 2018 +0100
@@ -7,6 +7,7 @@
 tests/macros.h
 
 Depends-on:
+errno
 ignore-value
 intprops
 mgetgroups
--- a/modules/lchown-tests	Tue Dec 18 09:59:41 2018 +0100
+++ b/modules/lchown-tests	Thu Dec 20 03:11:34 2018 +0100
@@ -6,6 +6,7 @@
 tests/macros.h
 
 Depends-on:
+errno
 ignore-value
 intprops
 mgetgroups
--- a/tests/test-lchown.h	Tue Dec 18 09:59:41 2018 +0100
+++ b/tests/test-lchown.h	Thu Dec 20 03:11:34 2018 +0100
@@ -124,7 +124,7 @@
       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);