Blame tests/p_attr/attr_check_installed.sh
|
Athmane Madjoudj |
41dd6f |
#!/bin/sh
|
|
Athmane Madjoudj |
41dd6f |
# Author: Dan Trainor <dan.trainor@gmail.com>
|
|
Athmane Madjoudj |
41dd6f |
# Athmane Madjoudj <athmanem@gmail.com>
|
|
Athmane Madjoudj |
41dd6f |
|
|
Athmane Madjoudj |
41dd6f |
t_Log "Running $0 - Checking to see if setfattr, getfattr work"
|
|
Athmane Madjoudj |
41dd6f |
|
|
Athmane Madjoudj |
41dd6f |
|
|
Athmane Madjoudj |
41dd6f |
dd if=/dev/zero of=/tmp/attrtest.img bs=1024000 count=100 &>/dev/null
|
|
Athmane Madjoudj |
41dd6f |
t_CheckExitStatus $?
|
|
Athmane Madjoudj |
41dd6f |
|
|
Athmane Madjoudj |
41dd6f |
echo -e 'y\n' | mkfs.ext3 /tmp/attrtest.img
|
|
Athmane Madjoudj |
41dd6f |
|
|
Athmane Madjoudj |
41dd6f |
mkdir /mnt/attr_test
|
|
Athmane Madjoudj |
41dd6f |
mount -t ext3 -o loop,user_xattr /tmp/attrtest.img /mnt/attr_test
|
|
Athmane Madjoudj |
41dd6f |
touch /mnt/attr_test/testfile
|
|
Athmane Madjoudj |
41dd6f |
setfattr -n user.test /mnt/attr_test/testfile
|
|
Athmane Madjoudj |
41dd6f |
getfattr /mnt/attr_test/testfile | grep -o "user.test"
|
|
Athmane Madjoudj |
41dd6f |
|
|
Athmane Madjoudj |
41dd6f |
t_CheckExitStatus $?
|
|
Athmane Madjoudj |
41dd6f |
|
|
Athmane Madjoudj |
41dd6f |
umount /mnt/attr_test
|
|
Athmane Madjoudj |
41dd6f |
rm -f /tmp/attrtest.img
|