[Boxbackup-dev] File/dir permissions in test suite

Chris Wilson chris at qwirx.com
Sun Apr 24 14:49:45 BST 2011


Hi James,

On Sun, 24 Apr 2011, James O'Gorman wrote:

> No write permission on the x1 directory means that non-root users can't
> remove files inside it.
>
> $ ls -l build/build_Trunk_1677/debug/test/bbackupd/testfiles/restore-test/Test1/x1/
> total 4
> drw-rw-rw- 2 bitten bitten 4096 Apr 24 00:11 cxfxcv
>
> No execute permission on this dir means that 'rm -r' canot chdir() into
> it.
>
> I guess this is intentional as part of the restore test to verify
> permissions, but we might need a way to reset permissions once the test
> has finished. I've noticed this issue on Linux and OS X, but not
> FreeBSD. (Not sure about Solaris as the build never gets that far!)

Yes it is intentional. It gets cleaned up by the test if the test passes, 
but if the test fails then it may abort without cleaning up. I'm not sure 
what to do about this as I don't know how it fails and ends up in this 
state.

I'd rather not interfere too much in the normal test scripts, as it could 
be useful if the test fails to analyse the situation as it was left. If it 
possible for bitten to simply run:

chmod -R a+rwx testfiles

after the test finishes, and before cleaning up?

Cheers, Chris.



More information about the Boxbackup-dev mailing list