I see now: tar should have extracted the f into another directory: 
095/gnu/dir/sub/extract, which is empty…

        +tar: unable to record current working directory: Permission denied

Which tar invocation was that? The second one, where the result is saved?

        +cmp: extract/f: No such file or directory

Correct complaint above.

The chmod used is

        root 708 /\ sudo -u macports env PATH=../src:${PATH} which chmod
        /opt/local/libexec/gnubin/chmod

and it certainly fails because "sub" and "dir" are still readable for all:

        root 711 /\ cd testsuite.dir/095/gnu/dir/sub
        root 712 /\ ls -ld . ..
        drwxr-xr-x 3 macports wheel 170 19. Feb 14:16 .
        drwxr-xr-x 3 macports wheel 102 19. Feb 14:16 ..

        ./extrac09.at:37: exit code was 2, expected 0

For me and macports too chmod works:

        root 711 /\ cd testsuite.dir/095/gnu/dir/sub
        root 712 /\ ls -ld . ..
        drwxr-xr-x 3 macports wheel 170 19. Feb 14:16 .
        drwxr-xr-x 3 macports wheel 102 19. Feb 14:16 ..
        root 713 /\ sudo -u macports env PATH=../src:${PATH} mkdir -p 
Test-Elter/Test-Kind
        root 714 /\ cd Test-Elter/Test-Kind
        root 715 /\ l -d .. .
        drwxr-xr-x 2 macports wheel  68 19. Feb 14:37 .
        drwxr-xr-x 3 macports wheel 102 19. Feb 14:37 ..
        root 716 /\ sudo -u macports env PATH=../src:${PATH} chmod a-r . ..
        root 717 /\ l -d .. .
        d-wx--x--x 2 macports wheel  68 19. Feb 14:37 .
        d-wx--x--x 3 macports wheel 102 19. Feb 14:37 ..
        root 718 /\ sudo -u macports env PATH=../src:${PATH} chmod a+r . ..
        root 719 /\ l -d .. .
        drwxr-xr-x 2 macports wheel  68 19. Feb 14:37 .
        drwxr-xr-x 3 macports wheel 102 19. Feb 14:37 ..
        root 720 /\ sudo -u macports env PATH=../src:${PATH} 
/opt/local/libexec/gnubin/chmod a-r . ..
        root 721 /\ l -d .. .
        d-wx--x--x 2 macports wheel  68 19. Feb 14:37 .
        d-wx--x--x 3 macports wheel 102 19. Feb 14:37 ..
        root 722 /\ sudo -u macports env PATH=../src:${PATH} 
/opt/local/libexec/gnubin/chmod a+r . ..
        root 723 /\ l -d .. .
        drwxr-xr-x 2 macports wheel  68 19. Feb 14:37 .
        drwxr-xr-x 3 macports wheel 102 19. Feb 14:37 ..
        root 724 /\ sudo -u macports env PATH=../src:${PATH} /bin/chmod a-r . ..
        root 725 /\ l -d .. .
        d-wx--x--x 2 macports wheel  68 19. Feb 14:37 .
        d-wx--x--x 3 macports wheel 102 19. Feb 14:37 ..
        root 726 /\ sudo -u macports env PATH=../src:${PATH} /bin/chmod a+r . ..
        root 727 /\ l -d .. .
        drwxr-xr-x 2 macports wheel  68 19. Feb 14:37 .
        drwxr-xr-x 3 macports wheel 102 19. Feb 14:37 ..
        root 728 /\ 

And finally I can manually reproduce it:

        root 755 /\ l -d . ..
        drwxr-xr-x 3 macports wheel 102 19. Feb 14:37 .
        drwxr-xr-x 4 macports wheel 204 19. Feb 14:37 ..
        root 756 /\ sudo -u macports env PATH=../src:${PATH} chmod a-r . ..
        root 757 /\ l -d . ..
        d-wx--x--x 3 macports wheel 102 19. Feb 14:37 .
        d-wx--x--x 4 macports wheel 204 19. Feb 14:37 ..
        root 758 /\ sudo -u macports env PATH=../../../../../../../src:${PATH} 
LANG=C tar -xvf ../archive.tar -C Test-Kind f
        f
        tar: unable to record current working directory: Permission denied

which is OK in my understanding. Tar cannot read ., and so it cannot read 
../archive.tar and neither (./)archive.tar or the target (./)extract, tar even 
has no idea where "archive.tar" or "extract" could be in the file system – 
without knowing its working directory when only relative paths are given. IMO 
the test succeeds, the test's failure actually is a success report.

--
Greetings

  Pete                                           0
                                           %-/\_//
                                            (*)(*)




Reply via email to