# HG changeset patch # User Bernhard Voelker # Date 1369176830 -7200 # Node ID 7266df63bb4dacff84762f4a9f2ec0bb03e453fc # Parent 020c917cba9df41e1b056d1a81e37b8525587049 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-05-22 Bernhard Voelker + + test-lchown, test-chown: also skip test if chown fails with EPERM + * tests/test-lchown.h (test_lchown): Add EPERM to the condition to + skip this test, to handle FAT file systems. + * tests/test-chown.h (test_chown): Likewise. + 2013-05-19 Paul Eggert regex: fix dfa race in multithreaded uses diff --git a/tests/test-chown.h b/tests/test-chown.h --- a/tests/test-chown.h +++ b/tests/test-chown.h @@ -57,9 +57,9 @@ 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 --- a/tests/test-lchown.h +++ b/tests/test-lchown.h @@ -65,9 +65,9 @@ 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)