From: Jiri J. <jja...@re...> - 2014-08-05 10:14:14
|
On 07/24/2014 08:02 AM, AKASHI Takahiro wrote: > This patch allows the test suite to be run on aarch64 (or arm64 in kernel > jargon) with 64-bit and 32-bit userspace. > I successfully built and ran it on > - ARMv8 fast model > - x86_64 Fedora 20 > but only against audit-test/syscalls and filter, and so fixes here might be > incomplete in the other categories (and on other architectures). > See audit-test/Makefile, which is a bit messy in general. > > v4: > * fix usages of LSM_SELINUX macro > > v3: > * correct makefiles/bash scripts around usages of LSM_SELINUX macro > * untabify the leading tabs > * protect utils/network-server with LSM_SELINUX > > v2: > * clean up the usages of macros, MACHINE, LSM_SELINUX and UTILS > * cosmetic changes (indentation, splitting lines) for readability > > AKASHI Takahiro (5): > audit-test: use LSM_SELINUX instead of SUSE to work-around SE-Linux > audit-test: handle __NR3264_xxx syscall definitions > audit-test/syscalls: add aarch64 support > audit-test/filter: add aarch64 support > audit-test/syscalls: add arm support > > audit-test/filter/run.conf | 2 ++ > audit-test/filter/tests/test_auid.bash | 9 +++++-- > audit-test/filter/tests/test_class_attr.bash | 28 +++++++++++++++----- > audit-test/filter/tests/test_dev_inode.bash | 11 +++++--- > audit-test/filter/tests/test_success.bash | 8 ++++-- > audit-test/filter/tests/test_syscall.bash | 8 ++++-- > audit-test/filter/tests/test_type.bash | 9 +++++-- > audit-test/filter/tests/test_watch_dir_remove.bash | 20 ++++++++------ > audit-test/filter/tests/test_watch_open.bash | 10 +++++-- > audit-test/filter/tests/test_watch_remove.bash | 4 +++ > audit-test/rules.mk | 11 +++++--- > audit-test/syscalls/cap-run.conf | 15 +++++++---- > audit-test/syscalls/dac-run.conf | 24 +++++++++++------ > audit-test/syscalls/mac-run.conf | 24 +++++++++++------ > audit-test/utils/Makefile | 7 ++++- > audit-test/utils/augrok | 17 ++++++++++-- > audit-test/utils/bin/Makefile | 14 +++++++--- > audit-test/utils/bin/do_creat.c | 4 +-- > audit-test/utils/bin/do_mkdir.c | 4 +-- > audit-test/utils/bin/do_mkdirat.c | 4 +-- > audit-test/utils/bin/do_mknod.c | 4 +-- > audit-test/utils/bin/do_mknodat.c | 4 +-- > audit-test/utils/bin/do_mq_open.c | 4 +-- > audit-test/utils/bin/do_open.c | 4 +-- > audit-test/utils/bin/do_openat.c | 4 +-- > audit-test/utils/bin/do_symlink.c | 4 +-- > audit-test/utils/bin/do_symlinkat.c | 4 +-- > audit-test/utils/run.bash | 8 ++++-- > 28 files changed, 188 insertions(+), 81 deletions(-) > This series causes some regressions when running tests via ./run.bash instead of 'make run', specifically in all bash tests/scripts that used to check for non-existence of DISTRO=SUSE or used to presume that selinux is always available. Ie. the secontext tests from filter/ can't be run using just ./run.bash. This is due to the dependency on variables exported by the make system, specifically LSM_SELINUX and MACHINE (which is why ./run.bash won't work on aarch64 in a lot of places). Since this is more of a long-standing issue (exporing ie. ARCH and MODE manually instead of using MACHINE and autodetected native MODE), I would like to finally resolve it (and replace ARCH with MACHINE afterwards). I've considered several ways how to do this, from using variables in tester's shell (sourcing some file which would set them), to storing these variables in a file generated by the make system, to parsing the Makefiles, to letting make parse the Makefiles. Please see the attached patch - it's just an untested snippet, the final version would have comments / explanation of the issue. Please note that ie. manual specification of MODE still works, since the make system takes this into consideration. This patch essentially makes run.bash use variables "preprocessed" by the make system. We could make the export target depend on things like check_set_PPROFILE and get free/autodetected PPROFILE with ./run.bash as well. Any comments? Thanks, Jiri |