diff --git a/tests/p_acl/0-install_acl.sh b/tests/p_acl/0-install_acl.sh new file mode 100755 index 0000000..91953a3 --- /dev/null +++ b/tests/p_acl/0-install_acl.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +t_Log "$0 - installing acl" +t_InstallPackage acl + diff --git a/tests/p_acl/acl_set_get_test.sh b/tests/p_acl/acl_set_get_test.sh new file mode 100755 index 0000000..b479c71 --- /dev/null +++ b/tests/p_acl/acl_set_get_test.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Author: Dan Trainor +# Athmane Madjoudj + +t_Log "Running $0 - Check that we can get and set acl" + +touch /tmp/acl_test_file + +setfacl -m user:nobody:r-- /tmp/acl_test_file +getfacl -a /tmp/acl_test_file |grep -q 'user:nobody:r--' + +t_CheckExitStatus $? + +/bin/rm -f /tmp/acl_test_file diff --git a/tests/p_attr/0-install-attr.sh b/tests/p_attr/0-install-attr.sh new file mode 100755 index 0000000..cba3032 --- /dev/null +++ b/tests/p_attr/0-install-attr.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# Author: Dan Trainor + +t_InstallPackage attr diff --git a/tests/p_attr/attr_check_installed.sh b/tests/p_attr/attr_check_installed.sh new file mode 100755 index 0000000..9c0e398 --- /dev/null +++ b/tests/p_attr/attr_check_installed.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# Author: Dan Trainor +# Athmane Madjoudj + +t_Log "Running $0 - Checking to see if setfattr, getfattr work" + + +dd if=/dev/zero of=/tmp/attrtest.img bs=1024000 count=100 &>/dev/null +t_CheckExitStatus $? + +echo -e 'y\n' | mkfs.ext3 /tmp/attrtest.img + +mkdir /mnt/attr_test +mount -t ext3 -o loop,user_xattr /tmp/attrtest.img /mnt/attr_test +touch /mnt/attr_test/testfile +setfattr -n user.test /mnt/attr_test/testfile +getfattr /mnt/attr_test/testfile | grep -o "user.test" + +t_CheckExitStatus $? + +umount /mnt/attr_test +rm -f /tmp/attrtest.img