diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-05-22 00:53:50 +0200 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-05-22 10:01:52 +0100 |
commit | eaa61c1d42dc605654a0e3073ac693a50bf1d2b8 (patch) | |
tree | 1b6c6470f7b9764f5812f4b2f764a5e0208cd106 /tests | |
parent | 9ceceed274f83094127f9ff0bf061293c9fe1e7f (diff) | |
download | gnulib-eaa61c1d42dc605654a0e3073ac693a50bf1d2b8.tar.gz |
test-lchown, test-chown: also skip test if lchown/chown fails with EPERM
These tests abort on FAT file systems right after the test for
filtering out situation without ownership support; errno is EPERM
in such a case.
* tests/test-lchown.h (test_lchown): Add EPERM to the condition to
skip this test.
* tests/test-chown.h (test_chown): Likewise.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-chown.h | 4 | ||||
-rw-r--r-- | tests/test-lchown.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-chown.h b/tests/test-chown.h index 1f66d4cf33..1e56b756ff 100644 --- a/tests/test-chown.h +++ b/tests/test-chown.h @@ -57,9 +57,9 @@ test_chown (int (*func) (char const *, uid_t, gid_t), bool print) ASSERT (mkdir (BASE "dir", 0700) == 0); ASSERT (stat (BASE "dir", &st1) == 0); - /* Filter out mingw, which has no concept of groups. */ + /* Filter out mingw and file systems which have no concept of groups. */ result = func (BASE "dir", st1.st_uid, getegid ()); - if (result == -1 && errno == ENOSYS) + if (result == -1 && (errno == ENOSYS || errno == EPERM)) { ASSERT (rmdir (BASE "dir") == 0); if (print) diff --git a/tests/test-lchown.h b/tests/test-lchown.h index d4e66e7aac..7a66c1026e 100644 --- a/tests/test-lchown.h +++ b/tests/test-lchown.h @@ -65,9 +65,9 @@ test_lchown (int (*func) (char const *, uid_t, gid_t), bool print) ASSERT (mkdir (BASE "dir", 0700) == 0); ASSERT (stat (BASE "dir", &st1) == 0); - /* Filter out mingw, which has no concept of groups. */ + /* Filter out mingw and file systems which have no concept of groups. */ result = func (BASE "dir", st1.st_uid, getegid ()); - if (result == -1 && errno == ENOSYS) + if (result == -1 && (errno == ENOSYS || errno == EPERM)) { ASSERT (rmdir (BASE "dir") == 0); if (print) |