diff options
Diffstat (limited to 'tests/06_dir_diff.sh')
-rwxr-xr-x | tests/06_dir_diff.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/06_dir_diff.sh b/tests/06_dir_diff.sh index 3d8fd13..99ec034 100755 --- a/tests/06_dir_diff.sh +++ b/tests/06_dir_diff.sh @@ -12,20 +12,24 @@ TEST_TOOLS=$3 ############# Test specific code ############ setup () { - mkdir $ORIGIN/a && \ - mkdir $TARGET/a && \ - echo "1" > $TARGET/a/1 && \ - chown -h :cdrom $TARGET/a && \ + mkdir $ORIGIN/a $ORIGIN/sticky $ORIGIN/setgid && + mkdir $TARGET/a $TARGET/sticky $TARGET/setgid && + echo "1" > $TARGET/a/1 && + chown -h :cdrom $TARGET/a && + chmod +t $TARGET/sticky && + chmod g+s $TARGET/setgid && chmod 707 $TARGET/a } check_results () { - test -d $ORIGIN/a && \ - test -f $ORIGIN/a/1 && \ - check_same_mode $ORIGIN/a $TARGET/a #&& \ - check_same_uidgid $ORIGIN/a $TARGET/a #&& \ - check_same_mode $ORIGIN/a/1 $TARGET/a/1 && \ - check_same_uidgid $ORIGIN/a/1 $TARGET/a/1 && \ + test -d $ORIGIN/a && + test -f $ORIGIN/a/1 && + test -k $ORIGIN/sticky && + test -g $ORIGIN/setgid && + check_same_mode $ORIGIN/a $TARGET/a && \ + check_same_uidgid $ORIGIN/a $TARGET/a && \ + check_same_mode $ORIGIN/a/1 $TARGET/a/1 && + check_same_uidgid $ORIGIN/a/1 $TARGET/a/1 && check_content $ORIGIN/a/1 "1" } |