Failed to build test_old_trusty_regression_testsuite on Trusty ARM64

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

Bug Description

The test_old_trusty_regression_testsuite from the ubuntu_qrt_apparmor will fail.

Error message:
cc -Wall -Wstrict-prototypes openat.c -lapparmor -o openat
cc -Wall -Wstrict-prototypes pipe.c -lapparmor -o pipe
cc -Wall -Wstrict-prototypes ptrace.c -lapparmor -o ptrace
ptrace.c: In function ‘do_parent’:
ptrace.c:40:14: error: storage size of ‘regs’ isn’t known
struct user regs;
^
ptrace.c:92:14: error: ‘PTRACE_GETREGS’ undeclared (first use in this function)
if (ptrace(PTRACE_GETREGS, pid, NULL, ®s) == -1) {
^
ptrace.c:92:14: note: each undeclared identifier is reported only once for each function it appears in
ptrace.c:40:14: warning: unused variable ‘regs’ [-Wunused-variable]
struct user regs;
^
make: *** [ptrace] Error 1

complete output: http://pastebin.ubuntu.com/24931001/

Revision history for this message
Tyler Hicks (tyhicks) wrote :

The ptrace.c file contains both of these includes:

#include <sys/ptrace.h>
...
#include <sys/user.h>

Those header files should provide the definitions that are missing in your build failure. Can you ensure that you have linux-libc-dev and libc6-dev installed?

Changed in qa-regression-testing:
status: New → Incomplete
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hello,

yes these two packages are installed on the system

$ dpkg -l | grep -e libc6-dev -e linux-libc-dev
ii libc6-dev:arm64 2.19-0ubuntu6.13 arm64 Embedded GNU C Library: Development Libraries and Header Files
ii linux-libc-dev:arm64 3.13.0-121.170 arm64 Linux Kernel Headers for development

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks - It must be something specific to the arm64 environment that's a little off in regards to the header files that need to be included.

Changed in qa-regression-testing:
status: Incomplete → New
Revision history for this message
Sean Feole (sfeole) wrote :

Sam, Tyler, is this still something that needs to be chased down?

 very old bug, with no action on it, marking bug as incomplete and will close in 5 days if no update.

Changed in qa-regression-testing:
status: New → Incomplete
Changed in ubuntu-kernel-tests:
status: New → Incomplete
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Changed in qa-regression-testing:
status: Incomplete → New
Changed in ubuntu-kernel-tests:
status: Incomplete → Confirmed
Revision history for this message
Steve Beattie (sbeattie) wrote :

Hi Po-Hsu, I spent some time looking into this, and it looks like when the old apparmor tests got split out for trusty, one of the patches that needed to be applied to the regression test suite got dropped ('tests-convert_ptrace_getregset.patch'). I have committed a fix to qrt to re-apply this patch for the old apparmor source on trusty (it is already in the updated apparmor trusty source) in https://git.launchpad.net/qa-regression-testing/commit/?id=792e09115c319cf04839f0c4b2b7d43d018b5bcf .

There is another possible fix that may need to be applied, so please re-open if you end up running this test on arm64 again and it fails. Thanks.

Changed in qa-regression-testing:
status: New → Fix Released
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi Steve,

the error message chagned from:
    ptrace.c:92:14: error: ‘PTRACE_GETREGS’ undeclared (first use in this function)

To:
    readdir.c:45:14: error: ‘SYS_getdents’ undeclared (first use in this function)

Looks like we need more patches for that.
Thanks.

Changed in qa-regression-testing:
status: Fix Released → Confirmed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

https://pastebin.ubuntu.com/p/Q64rNYbBGX/ Full result for the ARM64 test in this cycle.

tags: added: 3.13 arm64 trusty ubuntu-qrt-apparmor
tags: added: sru-20190701
Revision history for this message
Steve Beattie (sbeattie) wrote :

Ah, the old apparmor version tests were also missing the test fix for the getdents syscall not being supported on arm64, only getdents64. This has been fixed in https://git.launchpad.net/qa-regression-testing/commit/?id=8203725a3933bb3fa9f957a309b287d070bfbe9e .

Po-Hsu, I think that's all the fixups that are specific to arm64. If you could re-run the kernel tests for arm64/trusty, that would be great to confirm.

Thanks!

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

Thanks for the fix Steve,
the ubuntu-qrt-apparmor is now marked as passed for Trusty ARM64.

I will close this bug.

Changed in qa-regression-testing:
status: Confirmed → Fix Released
Changed in ubuntu-kernel-tests:
status: Confirmed → 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.