[apparmor] aa_change_hat() token needs to be unsigned long in test suite

Seth Arnold seth.arnold at canonical.com
Tue Mar 4 04:15:12 UTC 2014


Hello,

While testing the latest iteration of Ubuntu 2.8.95 preliminary packages,
I found that the magic token used in the test suite is incorrectly stored
as an int rather than unsigned long in at least two cases.

The test case currently fails with:

running changehat_misc
/tmp/testlibCTcwOe/source/trusty/apparmor-2.8.95~2411/tests/regression/apparmor/prologue.inc: line 176: 20184 Killed                  $testexec "$@" > $outfile 2>&1
Error: changehat_twice failed. Test 'CHANGEHAT (subprofile->subprofile)' was expected to 'pass'. Reason for failure 'killed by signal 9'

*** A 'Killed' message from bash is expected for the following test
/tmp/testlibCTcwOe/source/trusty/apparmor-2.8.95~2411/tests/regression/apparmor/prologue.inc: line 176: 20190 Killed                  $testexec "$@" > $outfile 2>&1

*** A 'Killed' message from bash is expected for the following test
/tmp/testlibCTcwOe/source/trusty/apparmor-2.8.95~2411/tests/regression/apparmor/prologue.inc: line 176: 20222 Killed                  $testexec "$@" > $outfile 2>&1



With this patch the output is:
running changehat_misc

*** A 'Killed' message from bash is expected for the following test
/tmp/testlibCTcwOe/source/trusty/apparmor-2.8.95~2411/tests/regression/apparmor/prologue.inc: line 176: 26647 Killed                  $testexec "$@" > $outfile 2>&1

*** A 'Killed' message from bash is expected for the following test
/tmp/testlibCTcwOe/source/trusty/apparmor-2.8.95~2411/tests/regression/apparmor/prologue.inc: line 176: 26679 Killed                  $testexec "$@" > $outfile 2>&1



This patch looks necessary in both trunk and 2.8 branches, though I have
not tested how 2.8 actually handles now.

Signed-off-by: Seth Arnold <seth.arnold at canonical.com>

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unsigned-long-magic-token.patch
Type: text/x-diff
Size: 854 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140303/563b40bf/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140303/563b40bf/attachment.pgp>


More information about the AppArmor mailing list