From: Bruno Haible Date: Thu, 20 Dec 2018 02:11:34 +0000 (+0100) Subject: lchown tests: Be more permissive regarding errno values. X-Git-Tag: v1.0~5218 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f0c406c2cad3d701e8b331a6a82074bd01b3256a;p=gnulib.git lchown tests: Be more permissive regarding errno values. Reported by Ivan Zakharyaschev . * 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. --- diff --git a/ChangeLog b/ChangeLog index f55c615b0e..fd28f3b2c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-12-19 Bruno Haible + + lchown tests: Be more permissive regarding errno values. + Reported by Ivan Zakharyaschev . + * 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 duplocale: Avoid test failure on AIX 7. diff --git a/modules/fchownat-tests b/modules/fchownat-tests index 81adf7fe83..e5fb7833f4 100644 --- a/modules/fchownat-tests +++ b/modules/fchownat-tests @@ -7,6 +7,7 @@ tests/signature.h tests/macros.h Depends-on: +errno ignore-value intprops mgetgroups diff --git a/modules/lchown-tests b/modules/lchown-tests index c5bba89d50..42b946014c 100644 --- a/modules/lchown-tests +++ b/modules/lchown-tests @@ -6,6 +6,7 @@ tests/signature.h tests/macros.h Depends-on: +errno ignore-value intprops mgetgroups diff --git a/tests/test-lchown.h b/tests/test-lchown.h index bc10a50381..8bf79b1bf2 100644 --- a/tests/test-lchown.h +++ b/tests/test-lchown.h @@ -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);