[apparmor] [PATCH 1/2] Disable revalidation/revocation tests

Steve Beattie steve at nxnw.org
Wed Jan 11 10:58:46 UTC 2012


On Wed, Jan 11, 2012 at 11:03:38AM +0100, John Johansen wrote:
> The behavior for revalidation/revocation of open files has changed
> with the current kernel code, resulting in these tests being reported
> as failing even though they are showing expected behavior.
> 
> Under the current kernel module this form of revalidation/revocation
> can not be tested reliably, so just changing the expected result is
> not enough, completely disable the tests for now.
> 
> Signed-off-by: John Johansen <john.johansen at canonical.com>

Acked-By: Steve Beattie <sbeattie at ubuntu.com>

> ---
>  tests/regression/apparmor/pwrite.sh |   76 ++++++++++++++++++----------------
>  tests/regression/apparmor/rw.sh     |   44 ++++++++++----------
>  2 files changed, 63 insertions(+), 57 deletions(-)
> 
> diff --git a/tests/regression/apparmor/pwrite.sh b/tests/regression/apparmor/pwrite.sh
> index e2dafcb..9746fd4 100755
> --- a/tests/regression/apparmor/pwrite.sh
> +++ b/tests/regression/apparmor/pwrite.sh
> @@ -37,41 +37,45 @@ checktestbg
>  
>  rm -f ${file}
>  
> -# FAIL TEST - PWRITE (pass 1)
> -
> -genprofile $file:$okperm
> -
> -runtestbg "PWRITE without w" fail $file
> -
> -sleep 2
> -
> -# FAIL TEST - PWRITE (pass 2)
> -
> -genprofile $file:$badwriteperm
> -
> -sleep 2
> -
> -kill -USR1 $_pid
> -
> -checktestbg
> -
> -rm -f ${file}
> +# Disabled revalidation/revocation test as this can not be reliably tested
> +# at this time 
> +## FAIL TEST - PWRITE (pass 1)
> +#
> +#genprofile $file:$okperm
> +#
> +#runtestbg "PWRITE without w" fail $file
> +#
> +#sleep 2
> +#
> +## FAIL TEST - PWRITE (pass 2)
> +#
> +#genprofile $file:$badwriteperm
> +#
> +#sleep 2
> +#
> +#kill -USR1 $_pid
> +#
> +#checktestbg
> +#
> +#rm -f ${file}
>  
> +# Disabled revalidation/revocation test as this can not be reliably tested
> +# at this time 
>  # FAIL TEST - PREAD (pass 1)
> -
> -genprofile $file:$okperm
> -
> -runtestbg "PREAD without r" fail $file
> -
> -sleep 2
> -
> -#FAIL TEST - PREAD (pass 2)
> -genprofile $file:$badreadperm
> -
> -sleep 2
> -
> -kill -USR1 $_pid
> -
> -checktestbg
> -
> -rm -f ${file}
> +#
> +#genprofile $file:$okperm
> +#
> +#runtestbg "PREAD without r" fail $file
> +#
> +#sleep 2
> +#
> +##FAIL TEST - PREAD (pass 2)
> +#genprofile $file:$badreadperm
> +#
> +#sleep 2
> +#
> +#kill -USR1 $_pid
> +#
> +#checktestbg
> +#
> +#rm -f ${file}
> diff --git a/tests/regression/apparmor/rw.sh b/tests/regression/apparmor/rw.sh
> index 388de8e..8e9c6bf 100755
> --- a/tests/regression/apparmor/rw.sh
> +++ b/tests/regression/apparmor/rw.sh
> @@ -43,24 +43,26 @@ checktestbg
>  
>  rm -f $file
>  
> -# FAILURE TEST (pt 1)
> -
> -genprofile $file:$okperm
> -
> -runtestbg "READ/WRITE fail" fail $file
> -
> -sleep 2
> -
> -# FAILURE TEST (pt 2)
> -
> -genprofile $file:$badperm
> -
> -# problem the shell and the test program are racing, after profile replacement
> -# if the shell runs immediately after profile replacement instead of the
> -# test program it will will.  We insert a small sleep to make this unlikely
> -
> -sleep 1
> -
> -kill -USR1 $_pid
> -
> -checktestbg
> +# Disabled revalidation/revocation test as this can not be reliably tested
> +# at this time 
> +## FAILURE TEST (pt 1)
> +#
> +#genprofile $file:$okperm
> +#
> +#runtestbg "READ/WRITE fail" fail $file
> +#
> +#sleep 2
> +#
> +## FAILURE TEST (pt 2)
> +#
> +#genprofile $file:$badperm
> +#
> +## problem the shell and the test program are racing, after profile replacement
> +## if the shell runs immediately after profile replacement instead of the
> +## test program it will will.  We insert a small sleep to make this unlikely
> +#
> +#sleep 1
> +#
> +#kill -USR1 $_pid
> +#
> +#checktestbg
> -- 
> 1.7.7.3
> 
> 
> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20120111/34788227/attachment.pgp>


More information about the AppArmor mailing list