Comment 0 for bug 2000062

Revision history for this message
Po-Hsu Lin (cypressyew) wrote : ApparmorTestsuites.test_utils_testsuite from ubuntu_qrt_apparmor failed with ImportError

Issue found on B-ibm-gt-5.4, F-oem-5.14, F-aws-fips after the change in bug 1982439 has landed.

Sub-test in ApparmorTestsuites.test_utils_testsuite failed with:

 === test-pivot_root_parse.py ===
 Traceback (most recent call last):
   File "test-pivot_root_parse.py", line 12, in <module>
     import apparmor.aa as aa
 ImportError: No module named apparmor.aa
 Makefile:81: recipe for target 'check' failed
 make[1]: *** [check] Error 1
 make[1]: Leaving directory '/tmp/testlibyXL5ua/source/bionic/apparmor-2.12/utils/test'
 Makefile:95: recipe for target 'check' failed
 make: *** [check] Error 2

After some inspection it looks like this is because the script is trying to use python2. This can be verified with:
python2 -c "import apparmor.aa"
python3 -c "import apparmor.aa"

It's still yet to be clear why this is only happening with "python3 ./test-apparmor.py -v ApparmorTestsuites.test_utils_testsuite" but didn't happen before when we're running everything with "python3 ./test-apparmor.py -v"