Failed to build test_old_trusty_regression_testsuite on Trusty ARM64

Bug #1699987 reported by Po-Hsu Lin on 2017-06-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QA Regression Testing
Undecided
Unassigned
ubuntu-kernel-tests
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/

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
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

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
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
Po-Hsu Lin (cypressyew) wrote :
Changed in qa-regression-testing:
status: Incomplete → New
Changed in ubuntu-kernel-tests:
status: Incomplete → Confirmed
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
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
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
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!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers