Environment variable in test-apparmor.py was not properly restored after the test

Bug #2000233 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QA Regression Testing
Fix Released
Undecided
Po-Hsu Lin

Bug Description

With the capability of running tests one by one in test-apparmor.py, I found the test_utils_testsuite in ApparmorTestsuites will fail with "ImportError: No module named apparmor.aa" if you try to run it with:
sudo ./test-apparmor.py -v ApparmorTestsuites.test_utils_testsuite

This is because the test is trying to use python2, please refer to bug 2000062 for more information.

However this did not happen when we're running the whole test altogether, e.g.:
sudo ./test-apparmor.py -v

It's caused by the environment variable override in test_libapparmor_testsuite3() before the test_utils_testsuite, the PYTHON related variable will be set to python3 and thus making it pass.

We should remove these environment variable after test if they were not in place at the very beginning.

Po-Hsu Lin (cypressyew)
Changed in qa-regression-testing:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Po-Hsu Lin (cypressyew)
Changed in qa-regression-testing:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.