posix_ipc in test_regression_testsuite from ubuntu_qrt_apparmor failed on K-5.19 arm64 (Unable to run test sub-executable)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QA Regression Testing |
Fix Released
|
Undecided
|
Unassigned | ||
ubuntu-kernel-tests |
Fix Released
|
Undecided
|
Unassigned | ||
apparmor (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Issue found on Kinetic 5.19 ARM64 systems,
The ApparmorTestsui
running posix_ipc
Fatal Error (posix_mq_rcv): Unable to run test sub-executable
It's a bit hard to find which one is failing, here is the test output of ApparmorTestsui
== BEGIN OF TEST OUPTUT ==
running aa_exec
running access
xfail: ACCESS file rx (r)
xfail: ACCESS file rwx (r)
xfail: ACCESS file r (wx)
xfail: ACCESS file rx (wx)
xfail: ACCESS file rwx (wx)
xfail: ACCESS dir rwx (r)
xfail: ACCESS dir r (wx)
xfail: ACCESS dir rx (wx)
xfail: ACCESS dir rwx (wx)
running at_secure
running introspect
running capabilities
(ptrace)
(reboot)
(chroot)
(mlockall)
(net_raw)
running changeprofile
running onexec
running changehat
running changehat_fork
running changehat_misc
*** A 'Killed' message from bash is expected for the following test
/tmp/testlibxbc
*** A 'Killed' message from bash is expected for the following test
/tmp/testlibxbc
running chdir
running clone
running coredump
*** A 'Segmentation Fault' message from bash is expected for the following test
/tmp/testlibxbc
*** A 'Segmentation Fault' message from bash is expected for the following test
/tmp/testlibxbc
*** A 'Segmentation Fault' message from bash is expected for the following test
/tmp/testlibxbc
*** A 'Segmentation Fault' message from bash is expected for the following test
/tmp/testlibxbc
*** A 'Segmentation Fault' message from bash is expected for the following test
/tmp/testlibxbc
XFAIL: Error: corefile present when not expected -- COREDUMP (ix confinement)
running deleted
running environ
running exec
running exec_qual
running fchdir
running fd_inheritance
running fork
running i18n
running link
running link_subset
running mkdir
running mmap
running mount
using mount rules ...
running mult_mount
running named_pipe
running namespaces
running net_raw
running open
running openat
running pipe
running pivot_root
kernel does not support pivot_root domain transitions - skipping tests ...
running posix_ipc
Fatal Error (posix_mq_rcv): Unable to run test sub-executable
running ptrace
using ptrace v6 tests ...
running pwrite
running query_label
running regex
running rename
running readdir
running rw
running socketpair
running swap
running sd_flags
running setattr
running symlink
running syscall
WARNING: syscall sysctl not supported by kernel headers, skipping tests ...
running sysv_ipc
Required feature 'ipc/sysv_mqueue' not available.. Skipping tests ...
running tcp
running unix_fd_server
running unix_socket_
xpass: AF_UNIX pathname socket (dgram); confined server w/ access (rw)
xpass: AF_UNIX pathname socket (dgram); confined client w/ access (rw)
running unix_socket_
running unix_socket_unnamed
xpass: AF_UNIX unnamed socket (dgram); confined server (peer label w/ implicit perms)
xpass: AF_UNIX unnamed socket (dgram); confined server (peer label w/ explicit perms)
xpass: AF_UNIX unnamed socket (dgram); confined server (peer label, peer addr)
xpass: AF_UNIX unnamed socket (dgram); confined server (type, peer label, peer addr)
xpass: AF_UNIX unnamed socket (dgram); confined server (type, addr, peer label)
xpass: AF_UNIX unnamed socket (dgram); confined server (type, addr, peer label, peer addr)
running unix_socket_
running unlink
running xattrs
Required feature 'file/xattr' not available.. Skipping tests ...
running xattrs_profile
running longpath
XFAIL: This version of AppArmor does not support changing buffer size.
running dbus_eavesdrop
dbus[367250]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/1005" is owned by uid 1005, not our uid 0
running dbus_message
dbus[367532]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/1005" is owned by uid 1005, not our uid 0
running dbus_service
dbus[368202]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/1005" is owned by uid 1005, not our uid 0
running dbus_unrequeste
dbus[368587]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/1005" is owned by uid 1005, not our uid 0
running aa_policy_cache
running exec_stack
running nnp
running stackonexec
running stackprofile
make: *** [Makefile:354: tests] Error 1
== END OF TEST OUPTUT ==
The make error in the end might be misleading, making people think "stackprofile" test is failing. But it's actually posix_ipc.sh is failing.
If you run the posix_ipc test manually in apparmor-
Fatal Error (posix_mq_rcv): Unable to run test sub-executable
Related branches
- Alex Murray: Approve
- Po-Hsu Lin: Pending requested
-
Diff: 15 lines (+2/-2)1 file modifiedscripts/test-apparmor.py (+2/-2)
- Po-Hsu Lin (community): Needs Resubmitting
- Alex Murray: Approve
-
Diff: 15 lines (+2/-2)1 file modifiedscripts/test-apparmor.py (+2/-2)
- Steve Beattie: Approve
-
Diff: 66 lines (+49/-0)2 files modifiedscripts/apparmor/patches/tests-fix-variable-type-for-getopt.patch (+44/-0)
scripts/test-apparmor.py (+5/-0)
Add "set -x" to posix_mq.sh script will give us some clue about this failure:
+ do_tests 'unconfined root' pass pass pass pass ("${all_ args[@] :5}") gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd pass -c /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd -k /queuename gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd pass -c /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd -k /queuename gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd pass -c /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd -k /queuename gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd pass -c /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd -k /queuename gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ rcv /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd pass -c /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd -k /queuename 383410- 8658-VS6Rmq/ output. posix_mq_ rcv
+ prefix='unconfined root'
+ expect_send=pass
+ expect_recv=pass
+ expect_open=pass
+ all_args=("$@")
+ rest_args=
+ do_test 'unconfined root' pass /tmp/testlibxbc
+ local 'desc=POSIX MQUEUE (unconfined root)'
+ shift
+ runchecktest 'POSIX MQUEUE (unconfined root)' pass /tmp/testlibxbc
+ '[' -z '' ']'
+ trap error_handler ERR
+ runtestfg 'POSIX MQUEUE (unconfined root)' pass /tmp/testlibxbc
+ _testdesc='POSIX MQUEUE (unconfined root)'
+ '[' p == x ']'
+ _pfmode=pass
+ _known=
+ shift 2
+ genrunscript /tmp/testlibxbc
+ local runfile
+ '[' false = true ']'
+ _pid=383471
+ wait 383471
+ /tmp/testlibxbc
+ test_rc=1
+ '[' 1 -gt 128 ']'
+ checktestfg
+ local ret expectedsig killedsig
++ cat /tmp/sdtest.
+ ret='Unrecognized option
Usage: /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ rcv [options]
Options are:
-n get notified if there'\''s an item in the queue
available options are: mq_notify, select, poll and epoll
-k message queue name (default is /testmq)
-c path of the client binary
-u run test as specified UID
-t timeout in seconds'
It's the posix_mq_rcv binary in command: gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ rcv /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd pass -c /tmp/testlibxbc gpuwp/source/ kinetic/ apparmor- 3.0.7/tests/ regression/ apparmor/ posix_mq_ snd -k /queuename
/tmp/testlibxbc
Complaining "Unrecognized option" here.
It's unclear why this issue is only affecting Kinetic arm64 for the moment.