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

Bug #1939022 reported by Stefan Bader
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned

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\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: 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\nDenied: 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-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\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]

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

This seems to be failing only when running the generic kernel on oracle instances. Not spotted on azure/aws/gcp instances.

tags: added: sru-20210816
Revision history for this message
Stefan Bader (smb) wrote :

This would be a full log.

Revision history for this message
Stefan Bader (smb) wrote :

Hopefully the correct content this time...

Revision history for this message
Georgia Garcia (georgiag) wrote :

Unfortunately I wasn't able to reproduce the test failure.

I ran the tests on an oracle instance, using generic kernel version 5.11.0-35-generic on hirsute series. AppArmor is on version 3.0.0-0ubuntu7.1

The complete test log is attached, but in summary, all tests passed:

Ran 58 tests in 1129.560s
OK

Po-Hsu Lin (cypressyew)
summary: - ubuntu_qrt_apparmor:test-apparmor.py:test-aa-notify.py:
- test_entries_since_login(_verbose)
+ test-aa-notify.py in test_utils_testsuite(3) from ubuntu_qrt_apparmor
+ failed with AppArmor denials string unmatch
tags: added: 6.5 mantic oracle sru-20240108
Po-Hsu Lin (cypressyew)
summary: - test-aa-notify.py in test_utils_testsuite(3) from ubuntu_qrt_apparmor
- failed with AppArmor denials string unmatch
+ 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
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

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.

Revision history for this message
Georgia Garcia (georgiag) wrote :

I have a suggestion for a fix upstream in MR:
https://gitlab.com/apparmor/apparmor/-/merge_requests/1152

I'll add it to QRT after a review/approval

Revision history for this message
Georgia Garcia (georgiag) wrote :
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Patch landed, test restarted and passed.

Hints removed.
I will close this bug, thanks for fixing this @Garcia!

Changed in ubuntu-kernel-tests:
status: New → 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.