comparison tests/test-lchown.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
63 questions on whether inheritance or current id triumphs, since 63 questions on whether inheritance or current id triumphs, since
64 the two methods resolve to the same gid). */ 64 the two methods resolve to the same gid). */
65 ASSERT (mkdir (BASE "dir", 0700) == 0); 65 ASSERT (mkdir (BASE "dir", 0700) == 0);
66 ASSERT (stat (BASE "dir", &st1) == 0); 66 ASSERT (stat (BASE "dir", &st1) == 0);
67 67
68 /* Filter out mingw, which has no concept of groups. */ 68 /* Filter out mingw and file systems which have no concept of groups. */
69 result = func (BASE "dir", st1.st_uid, getegid ()); 69 result = func (BASE "dir", st1.st_uid, getegid ());
70 if (result == -1 && errno == ENOSYS) 70 if (result == -1 && (errno == ENOSYS || errno == EPERM))
71 { 71 {
72 ASSERT (rmdir (BASE "dir") == 0); 72 ASSERT (rmdir (BASE "dir") == 0);
73 if (print) 73 if (print)
74 fputs ("skipping test: no support for ownership\n", stderr); 74 fputs ("skipping test: no support for ownership\n", stderr);
75 return 77; 75 return 77;