Thanks Wanlong Gao, we set the SELinux mode to permissive and the test passes. 
the error is caused by the SELinux, finally we modify the patch.


> The failed infornamtion is as follow:
> useradd: cannot set SELinux context for
> home directory /tmp/tacl/mount-ext3/acltest1
>
> this is caused by SELinux, the SELinux mode is enforcing
> set the mode to permissive before adding user acl_test1
> then set it to the default mode enforcing.
>
> Signed-off-by: Wentao Ma <mawen...@inspur.com>
> ---
>   testcases/kernel/fs/acls/acl_test01 | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/testcases/kernel/fs/acls/acl_test01 
> b/testcases/kernel/fs/acls/acl_test01
> index 328ff74..e38e39b 100755
> --- a/testcases/kernel/fs/acls/acl_test01
> +++ b/testcases/kernel/fs/acls/acl_test01
> @@ -87,7 +87,9 @@ do_setup(){
>   rm -rf $TEST_USER1_HOMEDIR
>   userdel $TEST_USER1 > /dev/null 2>&1
>   sleep 1
> + setenforce 0
>   useradd -d $TEST_USER1_HOMEDIR -m -g $TEST_USER1_GROUP $TEST_USER1 -s 
> /bin/sh
> + setenforce 1
>  
>   if [ $? -ne 0 ]; then
>   tst_brkm TBROK "Could not add test user $TEST_USER1."



mawen...@inspur.com
 
From: Wanlong Gao
Date: 2015-07-13 14:56
To: Wentao Ma; ltp-list@lists.sourceforge.net
CC: wu...@inspur.com
Subject: Re: [LTP] [PATCH] acls: Solve a problem from acl_test01
On 07/09/2015 03:27 PM, Wentao Ma wrote:
> The failed infornamtion is as follow:
> useradd: cannot set SELinux context for
> home directory /tmp/tacl/mount-ext3/acltest1
 
It seems that the error is caused by SELinux, please disable
your SELinux or set it to permissive and test again.
 
Thanks,
Wanlong Gao
 
> 
> this is caused by comand "rm -rf $TEST_USER1_HOMEDIR".
> But this directory is needed by next step.
> So create this driectory again.
> 
> Signed-off-by: Wentao Ma <mawen...@inspur.com>
> ---
>  testcases/kernel/fs/acls/acl_test01 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/testcases/kernel/fs/acls/acl_test01 
> b/testcases/kernel/fs/acls/acl_test01
> index 328ff74..d079abd 100755
> --- a/testcases/kernel/fs/acls/acl_test01
> +++ b/testcases/kernel/fs/acls/acl_test01
> @@ -87,6 +87,7 @@ do_setup(){
>  rm -rf $TEST_USER1_HOMEDIR
>  userdel $TEST_USER1 > /dev/null 2>&1
>  sleep 1
> +        mkdir -p $TEST_USER1_HOMEDIR
>  useradd -d $TEST_USER1_HOMEDIR -m -g $TEST_USER1_GROUP $TEST_USER1 -s /bin/sh
>  
>  if [ $? -ne 0 ]; then
> 
 
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to