diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2011-10-10 11:25:59 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2011-10-10 11:25:59 +0100 |
commit | 665beee6012505d0a3e54cc06f73ef21884e889d (patch) | |
tree | 9f4241828300f8350b831d1eab9078bae0fe936b /tests/07_dir_add_remove.sh | |
parent | 47d8f833362ccd260d21a7ce4a611899d9c79eaa (diff) | |
download | tbdiff-665beee6012505d0a3e54cc06f73ef21884e889d.tar.gz |
Altered tests to check for sticky and setgid bits on directories
Diffstat (limited to 'tests/07_dir_add_remove.sh')
-rwxr-xr-x | tests/07_dir_add_remove.sh | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/07_dir_add_remove.sh b/tests/07_dir_add_remove.sh index eed19d2..a213de1 100755 --- a/tests/07_dir_add_remove.sh +++ b/tests/07_dir_add_remove.sh @@ -12,19 +12,25 @@ TEST_TOOLS=$3 ############# Test specific code ############ setup () { - mkdir -p $ORIGIN/remove/1/2/3/4 && \ - mkdir -p $TARGET/add/4/3/2/1 && \ - chown -h :cdrom $TARGET/add - chown -h :cdrom $TARGET/add/4/3/2/1 + mkdir -p $ORIGIN/remove/1/2/3/4 && + mkdir -p $TARGET/add/4/3/2/1 && + mkdir -p $TARGET/addsticky && + mkdir -p $TARGET/addsetgid && + chown -h :cdrom $TARGET/add && + chown -h :cdrom $TARGET/add/4/3/2/1 && + chmod +t $TARGET/addsticky && + chmod g+s $TARGET/addsetgid } check_results () { - test -d $ORIGIN/add/4/3/2/1 && \ - test ! -d $ORIGIN/remove && \ - check_same_mtime $ORIGIN/add $TARGET/add && \ - check_same_mode $ORIGIN/add $TARGET/add && \ - check_same_uidgid $ORIGIN/add $TARGET/add && \ - check_same_mode $ORIGIN/add $TARGET/add && \ + test -d $ORIGIN/add/4/3/2/1 && + test ! -d $ORIGIN/remove && + test -k $ORIGIN/addsticky && + test -g $ORIGIN/addsetgid && + check_same_mtime $ORIGIN/add $TARGET/add && + check_same_mode $ORIGIN/add $TARGET/add && + check_same_uidgid $ORIGIN/add $TARGET/add && + check_same_mode $ORIGIN/add $TARGET/add && check_same_uidgid $ORIGIN/add/4/3/2/1 $TARGET/add/4/3/2/1 } |