This issue still exists. Since this test is called "test_entries_since_login", I think it might have something to do with login.
I have done some experiments and noticed that this issue only happens when running tests remotely over ssh. And the test will pass after you login to an interactive shell. Here is the result on 3 freshly deployed Oracle VM.DenseIO2.8 instance with environment configured by our infrastructure tool: A: 1. Run test remotely: FAILED 2. SSH to the instance, run the test manually: PASSED 3. Log out, run test remotely: PASSED B: 1. Run test remotely: FAILED 2. Run test remotely: FAILED 3. SSH to the instance, do nothing and log out 4. Run test remotely: PASSED C: 1. SSH to the instance, run test manually: PASSED To simplify the test process, I have created a script and made some tweak to qa-regression-testing, please run the following code snippet on your machine: cat > run-test.sh << EOF #!/bin/bash yes "" | DEBIAN_FRONTEND=noninteractive apt install --yes --force-yes apparmor apparmor-profiles apparmor-utils apport attr devscripts execstack exim4 gawk git libapparmor-dev libcap2-bin libcap-dev libdbus-1-dev libgtk2.0-dev libpam-apparmor python3 python3-all-dev quilt sudo gcc-multilib python3-libapparmor ruby netcat-openbsd pyflakes3 python3-pexpect python3-notify2 python3-psutil liburing-dev git clone --depth=1 https://git.launchpad.net/~cypressyew/qa-regression-testing -b phlin/test_utils_testsuite_hack cd qa-regression-testing/scripts python3 ./test-apparmor.py -v ApparmorTestsuites.test_utils_testsuite EOF And rsync it to the remote instance, you can run it remotely with ssh or login to run test manually: rsync -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet" -arv /home/oracle/run-test.sh ubuntu@$IP: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet ubuntu@$IP "sudo /home/ubuntu/run-test.sh" This is how I reproduce the issue. -- You received this bug notification because you are a member of Canonical Platform QA Team, which is subscribed to ubuntu-kernel-tests. https://bugs.launchpad.net/bugs/1939022 Title: test_entries_since_login(_verbose) in test-aa-notify.py of test_utils_testsuite(3) from ubuntu_qrt_apparmor failed with AppArmor denials string unmatch Status in ubuntu-kernel-tests: New Bug description: [stderr] === test-aa-notify.py === [stderr] .FF.. [stderr] ====================================================================== [stderr] FAIL: test_entries_since_login (__main__.AANotifyTest) [stderr] Test showing log entries since last login [stderr] ---------------------------------------------------------------------- [stderr] Traceback (most recent call last): [stderr] File "/tmp/testlib0xopmq_p/source/impish/apparmor-3.0.0/utils/test/test-aa-notify.py", line 204, in test_entries_since_login [stderr] self.assertIn(expected_output_has, output, result + output) [stderr] AssertionError: 'AppArmor denials: 10 (since' not found in 'AppArmor denials: 20 (since Fri Jul 2 17:22:04 2021)\n' : Got output "AppArmor denials: 20 (since Fri Jul 2 17:22:04 2021) [stderr] ", expected "AppArmor denials: 10 (since" [stderr] AppArmor denials: 20 (since Fri Jul 2 17:22:04 2021) [stderr] [stderr] [stderr] ====================================================================== [stderr] FAIL: test_entries_since_login_verbose (__main__.AANotifyTest) [stderr] Test showing log entries since last login in verbose mode [stderr] ---------------------------------------------------------------------- [stderr] Traceback (most recent call last): [stderr] File "/tmp/testlib0xopmq_p/source/impish/apparmor-3.0.0/utils/test/test-aa-notify.py", line 280, in test_entries_since_login_verbose [stderr] self.assertIn(expected_output_has, output, result + output) [stderr] AssertionError: 'Profile: libreoffice-soffice\nOperation: exec\nName: /bin/uname\nDenied: x\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_inherit\nName: /dev/null\nDenied: w\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /bin/uname\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /lib/x86_64-linux-gnu/ld-2.27.so\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /etc/ld.so.cache\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /lib/x86_64-linux-gnu/libc-2.27.so\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /lib/x86_64-linux-gnu/libc-2.27.so\nD enied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /usr/lib/locale/locale-archive\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice\nOperation: exec\nName: /usr/bin/file\nDenied: x\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/usr/bin/file\nOperation: file_mmap\nName: /usr/bin/file\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nAppArmor denials: 10 (since' not found in 'Using log file /tmp/test-aa-notify-i_k4xcrz\nShowing entries since ubuntu logged in\n\nProfile: libreoffice-soffice\nOperation: exec\nName: /bin/uname\nDenied: x\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_inherit\nName: /dev/null\nDenied: w\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /bin/uname\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\ n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /lib/x86_64-linux-gnu/ld-2.27.so\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /etc/ld.so.cache\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /lib/x86_64-linux-gnu/libc-2.27.so\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /lib/x86_64-linux-gnu/libc-2.27.so\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /usr/lib/locale/locale-archive\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice\nOperation: exec\nName: /usr/bin/file\nDenied: x\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/usr/bin/file\nOperation: file_mmap\nName: /usr/bin/file\nDen ied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice\nOperation: exec\nName: /bin/uname\nDenied: x\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_inherit\nName: /dev/null\nDenied: w\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /bin/uname\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /lib/x86_64-linux-gnu/ld-2.27.so\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /etc/ld.so.cache\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /lib/x86_64-linux-gnu/libc-2.27.so\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: file_mmap\nName: /lib/x86_64-li nux-gnu/libc-2.27.so\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/bin/uname\nOperation: open\nName: /usr/lib/locale/locale-archive\nDenied: r\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice\nOperation: exec\nName: /usr/bin/file\nDenied: x\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nProfile: libreoffice-soffice//null-/usr/bin/file\nOperation: file_mmap\nName: /usr/bin/file\nDenied: rm\nLogfile: /tmp/test-aa-notify-i_k4xcrz\n\nAppArmor denials: 20 (since Fri Jul 2 17:22:04 2021)\nFor more information, please see: https://wiki.ubuntu.com/DebuggingApparmor\n' : Got output "Using log file /tmp/test-aa-notify-i_k4xcrz [stderr] Showing entries since ubuntu logged in [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /bin/uname [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_inherit [stderr] Name: /dev/null [stderr] Denied: w [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /bin/uname [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/ld-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /etc/ld.so.cache [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /usr/lib/locale/locale-archive [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /usr/bin/file [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/usr/bin/file [stderr] Operation: file_mmap [stderr] Name: /usr/bin/file [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /bin/uname [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_inherit [stderr] Name: /dev/null [stderr] Denied: w [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /bin/uname [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/ld-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /etc/ld.so.cache [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /usr/lib/locale/locale-archive [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /usr/bin/file [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/usr/bin/file [stderr] Operation: file_mmap [stderr] Name: /usr/bin/file [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] AppArmor denials: 20 (since Fri Jul 2 17:22:04 2021) [stderr] For more information, please see: https://wiki.ubuntu.com/DebuggingApparmor [stderr] ", expected "Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /bin/uname [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_inherit [stderr] Name: /dev/null [stderr] Denied: w [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /bin/uname [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/ld-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /etc/ld.so.cache [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /usr/lib/locale/locale-archive [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /usr/bin/file [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/usr/bin/file [stderr] Operation: file_mmap [stderr] Name: /usr/bin/file [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] AppArmor denials: 10 (since" [stderr] Using log file /tmp/test-aa-notify-i_k4xcrz [stderr] Showing entries since ubuntu logged in [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /bin/uname [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_inherit [stderr] Name: /dev/null [stderr] Denied: w [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /bin/uname [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/ld-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /etc/ld.so.cache [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /usr/lib/locale/locale-archive [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /usr/bin/file [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/usr/bin/file [stderr] Operation: file_mmap [stderr] Name: /usr/bin/file [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /bin/uname [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_inherit [stderr] Name: /dev/null [stderr] Denied: w [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /bin/uname [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/ld-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /etc/ld.so.cache [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: file_mmap [stderr] Name: /lib/x86_64-linux-gnu/libc-2.27.so [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/bin/uname [stderr] Operation: open [stderr] Name: /usr/lib/locale/locale-archive [stderr] Denied: r [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice [stderr] Operation: exec [stderr] Name: /usr/bin/file [stderr] Denied: x [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] Profile: libreoffice-soffice//null-/usr/bin/file [stderr] Operation: file_mmap [stderr] Name: /usr/bin/file [stderr] Denied: rm [stderr] Logfile: /tmp/test-aa-notify-i_k4xcrz [stderr] [stderr] AppArmor denials: 20 (since Fri Jul 2 17:22:04 2021) [stderr] For more information, please see: https://wiki.ubuntu.com/DebuggingApparmor [stderr] [stderr] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1939022/+subscriptions -- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : canonical-ubuntu-qa@lists.launchpad.net Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp