Jim Meyering wrote:
> >> You can probably find out by rerunning that test with e.g.,
> >>
> >>   SHELL=bash make check -C tests TESTS=cp/fail-perm VERBOSE=yes
> > ...
> > This is on an NFS volume.
> >
> If you rerun the test with the following patch to init.sh,
> maybe it'll show us something interesting.
> diff --git a/tests/init.sh b/tests/init.sh
> index 12b3ca3..3bf5286 100644
> --- a/tests/init.sh
> +++ b/tests/init.sh
> @@ -240,7 +240,7 @@ remove_tmp_ ()
>    cleanup_
>    # cd out of the directory we're about to remove
>    cd "$initial_cwd_" || cd / || cd /tmp
> -  chmod -R u+rwx "$test_dir_"
> +  chmod --verbose -R u+rwx "$test_dir_"
>    # If removal fails and exit status was to be 0, then change it to 1.
>    rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
>    exit $__st

It still fails and shows:

+ cd /home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests
+ chmod --verbose -R u+rwx 
/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm'
 retained as 0700 (rwx------)
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/out'
 changed from 0664 (rw-rw-r--) to 0764 (rwxrw-r--)
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/D'
 retained as 0700 (rwx------)
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/D/a'
 changed from 0000 (---------) to 0700 (rwx------)
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/D/D'
 retained as 0775 (rwxrwxr-x)
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/F'
 changed from 0664 (rw-rw-r--) to 0764 (rwxrw-r--)
neither symbolic link 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/symlink'
 nor referent has been changed
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/exp'
 changed from 0664 (rw-rw-r--) to 0764 (rwxrw-r--)
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/DD'
 retained as 0700 (rwx------)
mode of 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/DD/D'
 retained as 0775 (rwxrwxr-x)
+ rm -rf 
/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm
rm: cannot remove 
`/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.O6Dm/DD/D':
 Permission denied
+ test 0 = 0
+ __st=1
+ exit 1

> If it doesn't, would you please add a "truss -o /tmp/chmod-log" prefix
> on that same chown command?  Somehow, it appears not to be doing its job.

Find /tmp/chmod-log attached.

Bruno
-- 
In memoriam Robert Mensah <http://en.wikipedia.org/wiki/Robert_Mensah>
execve("/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/src/chmod",
 0xFFBFF41C, 0xFFBFF434)  argc = 5
resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
resolvepath("/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/src/chmod",
 
"/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/src/chmod", 
1023) = 76
stat64("/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/src/chmod",
 0xFFBFF0D8) = 0
open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
stat64("/lib/libc.so.1", 0xFFBFE868)            = 0
resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
open("/lib/libc.so.1", O_RDONLY)                = 3
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 
0xFF3A0000
mmap(0x00010000, 1294336, PROT_NONE, 
MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF200000
mmap(0xFF200000, 1241517, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 
3, 0) = 0xFF200000
mmap(0xFF330000, 35901, PROT_READ|PROT_WRITE|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1245184) = 0xFF330000
mmap(0xFF33A000, 1552, PROT_READ|PROT_WRITE|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF33A000
memcntl(0xFF200000, 145604, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, 
MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF390000
munmap(0xFF3A0000, 32768)                       = 0
getcontext(0xFFBFEF48)
getrlimit(RLIMIT_STACK, 0xFFBFEF28)             = 0
getpid()                                        = 19870 [19869]
setustack(0xFF392A88)
brk(0x0003A398)                                 = 0
brk(0x0003C398)                                 = 0
umask(0)                                        = 02
stat64("/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1", 0xFFBFE720) = 0
resolvepath("/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1", 
"/platform/sun4u-us3/lib/libc_psr.so.1", 1023) = 37
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 
-1, 0) = 0xFF3F0000
open("/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1", O_RDONLY) = 3
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 
0xFF3A0000
munmap(0xFF3A2000, 24576)                       = 0
close(3)                                        = 0
stat64("/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.HenV",
 0x0003B448) = 0
chmod("/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.HenV",
 0700) = 0
ioctl(1, TCGETA, 0xFFBFE1D4)                    Err#25 ENOTTY
fstat64(1, 0xFFBFE248)                          = 0
brk(0x0003C398)                                 = 0
brk(0x0003E398)                                 = 0
fstat64(1, 0xFFBFE0F0)                          = 0
openat64(-3041965, 
"/home/haible/multibuild-1210/solaris10-cc/coreutils-8.12.178-df9cd/tests/gt-fail-perm.HenV",
 O_RDONLY|O_NONBLOCK|O_NOCTTY) = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fstat64(3, 0xFFBFF160)                          = 0
fcntl(3, F_DUPFD, 0x00000003)                   = 4
fcntl(4, F_GETFD, 0x00000000)                   = 0
fcntl(4, F_SETFD, 0x00000001)                   = 0
getdents64(3, 0xFF394000, 8192)                 = 200
getdents64(3, 0xFF394000, 8192)                 = 0
close(3)                                        = 0
fstatat64(4, "D", 0x0003D5A8, 0x00001000)       = 0
open64("/proc/self/fd", O_RDONLY|O_NONBLOCK|O_NOCTTY) = 3
access("/proc/self/fd/3/../fd", F_OK)           Err#2 ENOENT
close(3)                                        = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(4)                                       = 0
chmod("D", 0700)                                = 0
fchdir(3)                                       = 0
close(3)                                        = 0
openat64(4, "D", O_RDONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fstat64(3, 0xFFBFF160)                          = 0
fcntl(3, F_DUPFD, 0x00000003)                   = 5
fcntl(5, F_GETFD, 0x00000000)                   = 0
fcntl(5, F_SETFD, 0x00000001)                   = 0
getdents64(3, 0xFF394000, 8192)                 = 96
getdents64(3, 0xFF394000, 8192)                 = 0
close(3)                                        = 0
fstatat64(5, "D", 0x0003DB78, 0x00001000)       = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(5)                                       = 0
chmod("D", 0775)                                = 0
fchdir(3)                                       = 0
close(3)                                        = 0
openat64(5, "D", O_RDONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fstat64(3, 0xFFBFF160)                          = 0
fcntl(3, F_DUPFD, 0x00000003)                   = 6
fcntl(6, F_GETFD, 0x00000000)                   = 0
fcntl(6, F_SETFD, 0x00000001)                   = 0
getdents64(3, 0xFF394000, 8192)                 = 48
getdents64(3, 0xFF394000, 8192)                 = 0
close(3)                                        = 0
close(6)                                        = 0
fstatat64(5, "a", 0x0003DC70, 0x00001000)       = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(5)                                       = 0
chmod("a", 0700)                                = 0
fchdir(3)                                       = 0
close(3)                                        = 0
close(5)                                        = 0
fstatat64(4, "out", 0x0003D6A0, 0x00001000)     = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(4)                                       = 0
chmod("out", 0764)                              = 0
fchdir(3)                                       = 0
close(3)                                        = 0
fstatat64(4, "symlink", 0x0003D798, 0x00001000) = 0
fstatat64(4, "DD", 0x0003D890, 0x00001000)      = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(4)                                       = 0
chmod("DD", 0700)                               = 0
fchdir(3)                                       = 0
close(3)                                        = 0
openat64(4, "DD", O_RDONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fstat64(3, 0xFFBFF160)                          = 0
fcntl(3, F_DUPFD, 0x00000003)                   = 5
fcntl(5, F_GETFD, 0x00000000)                   = 0
fcntl(5, F_SETFD, 0x00000001)                   = 0
getdents64(3, 0xFF394000, 8192)                 = 72
getdents64(3, 0xFF394000, 8192)                 = 0
close(3)                                        = 0
fstatat64(5, "D", 0x0003D798, 0x00001000)       = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(5)                                       = 0
chmod("D", 0775)                                = 0
fchdir(3)                                       = 0
close(3)                                        = 0
openat64(5, "D", O_RDONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fstat64(3, 0xFFBFF160)                          = 0
fcntl(3, F_DUPFD, 0x00000003)                   = 6
fcntl(6, F_GETFD, 0x00000000)                   = 0
fcntl(6, F_SETFD, 0x00000001)                   = 0
getdents64(3, 0xFF394000, 8192)                 = 48
getdents64(3, 0xFF394000, 8192)                 = 0
close(3)                                        = 0
close(6)                                        = 0
close(5)                                        = 0
fstatat64(4, "exp", 0x0003D988, 0x00001000)     = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(4)                                       = 0
chmod("exp", 0764)                              = 0
fchdir(3)                                       = 0
close(3)                                        = 0
fstatat64(4, "F", 0x0003DA80, 0x00001000)       = 0
open64(".", O_RDONLY)                           = 3
fcntl(3, F_GETFD, 0x00000000)                   = 0
fcntl(3, F_SETFD, 0x00000001)                   = 0
fchdir(4)                                       = 0
chmod("F", 0764)                                = 0
fchdir(3)                                       = 0
close(3)                                        = 0
close(4)                                        = 0
write(1, " m o d e   o f   ` / h o".., 1435)    = 1435
close(1)                                        = 0
close(2)                                        = 0
_exit(0)

Reply via email to