From: Bruno Haible Date: Wed, 20 Jan 2021 06:40:56 +0000 (+0100) Subject: sethostname tests: Avoid test failure on Cygwin. X-Git-Tag: v1.0~3137 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3ac4735d72dca2c3d95faaebe328cef4c1d60e0f;p=gnulib.git sethostname tests: Avoid test failure on Cygwin. * tests/test-sethostname2.c (main): Treat errno EACCESS like EPERM. --- diff --git a/ChangeLog b/ChangeLog index 290fa1b4cb..3b53236bd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-01-20 Bruno Haible + + sethostname tests: Avoid test failure on Cygwin. + * tests/test-sethostname2.c (main): Treat errno EACCESS like EPERM. + 2021-01-19 Paul Eggert fnmatch, regex, fts: FALLTHROUGH consistency diff --git a/tests/test-sethostname2.c b/tests/test-sethostname2.c index 8e5c12d52c..2af95f6202 100644 --- a/tests/test-sethostname2.c +++ b/tests/test-sethostname2.c @@ -76,7 +76,9 @@ main (int argc, char *argv[] _GL_UNUSED) "Skipping test: sethostname is not really implemented.\n"); return 77; } - else if (rcs == -1 && errno == EPERM) + else if (rcs == -1 + && (errno == EPERM + || errno == EACCES)) /* Cygwin */ { fprintf (stderr, "Skipping test: insufficient permissions.\n"); return 77;