comparison tests/test-chown.h @ 17420:7266df63bb4d

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.
author Bernhard Voelker <mail@bernhard-voelker.de>
date Wed, 22 May 2013 00:53:50 +0200
parents e542fd46ad6f
children
comparison
equal deleted inserted replaced
17419:020c917cba9d 17420:7266df63bb4d
55 questions on whether inheritance or current id triumphs, since 55 questions on whether inheritance or current id triumphs, since
56 the two methods resolve to the same gid). */ 56 the two methods resolve to the same gid). */
57 ASSERT (mkdir (BASE "dir", 0700) == 0); 57 ASSERT (mkdir (BASE "dir", 0700) == 0);
58 ASSERT (stat (BASE "dir", &st1) == 0); 58 ASSERT (stat (BASE "dir", &st1) == 0);
59 59
60 /* Filter out mingw, which has no concept of groups. */ 60 /* Filter out mingw and file systems which have no concept of groups. */
61 result = func (BASE "dir", st1.st_uid, getegid ()); 61 result = func (BASE "dir", st1.st_uid, getegid ());
62 if (result == -1 && errno == ENOSYS) 62 if (result == -1 && (errno == ENOSYS || errno == EPERM))
63 { 63 {
64 ASSERT (rmdir (BASE "dir") == 0); 64 ASSERT (rmdir (BASE "dir") == 0);
65 if (print) 65 if (print)
66 fputs ("skipping test: no support for ownership\n", stderr); 66 fputs ("skipping test: no support for ownership\n", stderr);
67 return 77; 67 return 77;