[Ocfs2-test-devel] [PATCH 33/59] xattr-multiple-run: fix Operation not permitted error

Junxiao Bi junxiao.bi at oracle.com
Tue Sep 22 22:46:00 PDT 2015


On 09/23/2015 10:50 AM, Eric Ren wrote:
> Hi Junxiao & all,
> 
> Yes, trusted extended attributes are visible and accessible
> only to processes that have the CAP_SYS_ADMIN capability.
> 
> Reviewed-by: Eric Ren <zren at suse.com>
> 
> BTW, it's also depending on the way we run test suits.
> 1. run as root. It make things much easy, but not safe.
>    Also depends on openmpi version - 1.8 add an option
>    "--allow-run-as-root" over 1.7. So, it's not a good way.
> 
> 2. chmod 777 /dev/sdax by root
> 
> In both way, we didn't encournter this problem. I'm wondering how you
> run testing. Little worry about if testing will stop to await
> typing sudo password in your way. Are we free over this?
Please check the README there. We don't use root to run the test. Also
have some setting about sudo which don't need input password.

Thanks,
Junxiao.

> 
> Thanks,
> Eric Ren
> 
> On Mon, Sep 14, 2015 at 10:44:19AM +0800, Junxiao Bi wrote: 
>> For setting trusted xattr, root permission is needed.
>>
>> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
>> ---
>>  programs/xattr_tests/xattr-multi-run.sh |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/programs/xattr_tests/xattr-multi-run.sh b/programs/xattr_tests/xattr-multi-run.sh
>> index 8a113f5..d97b993 100755
>> --- a/programs/xattr_tests/xattr-multi-run.sh
>> +++ b/programs/xattr_tests/xattr-multi-run.sh
>> @@ -294,10 +294,10 @@ f_runtest()
>>  	do
>>  		for filetype in normal directory symlink
>>  		do
>> -			echo -e "Testing Binary:\t\t${MPIRUN} ${MPI_PLS_AGENT_ARG} ${MPI_MCA_BTL} ${MPI_MCA_BTL_IF} -np ${MPI_RANKS} --host ${MPI_HOSTS} ${XATTR_TEST_BIN} -i 1 -x 20 -n ${namespace} -t ${filetype} -l 50 -s 200 ${WORKPLACE}">>${LOG_FILE}
>> +			echo -e "Testing Binary:\t\t${SUDO} ${MPIRUN} --allow-run-as-root ${MPI_PLS_AGENT_ARG} ${MPI_MCA_BTL} ${MPI_MCA_BTL_IF} -np ${MPI_RANKS} --host ${MPI_HOSTS} ${XATTR_TEST_BIN} -i 1 -x 20 -n ${namespace} -t ${filetype} -l 50 -s 200 ${WORKPLACE}">>${LOG_FILE}
>>  			echo "********${namespace} mode on ${filetype}********">>${LOG_FILE}
>>  
>> -			${MPIRUN} ${MPI_PLS_AGENT_ARG} ${MPI_MCA_BTL} ${MPI_MCA_BTL_IF} -np ${MPI_RANKS} --host ${MPI_HOSTS} ${XATTR_TEST_BIN} -i 1 -x 20 -n ${namespace} -t ${filetype} -l 50 -s 200 ${WORKPLACE}>>${LOG_FILE} 2>&1
>> +			${SUDO} ${MPIRUN} --allow-run-as-root ${MPI_PLS_AGENT_ARG} ${MPI_MCA_BTL} ${MPI_MCA_BTL_IF} -np ${MPI_RANKS} --host ${MPI_HOSTS} ${XATTR_TEST_BIN} -i 1 -x 20 -n ${namespace} -t ${filetype} -l 50 -s 200 ${WORKPLACE}>>${LOG_FILE} 2>&1
>>  			rc=$?
>>  			if [ "$rc" != "0" ];then
>>  				if [ "$namespace" == "user" -a "$filetype" == "symlink" ]; then
>> -- 
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> Ocfs2-test-devel mailing list
>> Ocfs2-test-devel at oss.oracle.com
>> https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
>>




More information about the Ocfs2-test-devel mailing list