mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
regression tests: check for setfattr binary used by xattrs_profile
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
parent
f7b5d0e783
commit
b39a535cb9
1 changed files with 17 additions and 3 deletions
|
@ -151,8 +151,7 @@ SRC=access.c \
|
|||
unlink.c \
|
||||
userns.c \
|
||||
userns_setns.c \
|
||||
xattrs.c \
|
||||
xattrs_profile.c
|
||||
xattrs.c
|
||||
|
||||
#only do the ioperm/iopl tests for x86 derived architectures
|
||||
ifneq (,$(findstring $(shell uname -i),i386 i486 i586 i686 x86 x86_64))
|
||||
|
@ -165,6 +164,17 @@ ifeq ($(USE_SYSCTL),true)
|
|||
SRC+=syscall_sysctl.c
|
||||
endif
|
||||
|
||||
# Only do xattrs_profile test if we have the required setfattr binary
|
||||
ifneq (,$(shell which -s setfattr && echo TRUE))
|
||||
SRC+=xattrs_profile.c
|
||||
else
|
||||
$(warning ${nl}\
|
||||
************************************************************************${nl}\
|
||||
No setfattr skipping xattrs_profile tests ...${nl}\
|
||||
Install attr or equivalent package to build and run this test${nl}\
|
||||
************************************************************************${nl})
|
||||
endif
|
||||
|
||||
#only do dbus if proper libs are installl
|
||||
ifneq (,$(shell pkg-config --exists dbus-1 && echo TRUE))
|
||||
SRC+=dbus_eavesdrop.c dbus_message.c dbus_service.c dbus_unrequested_reply.c
|
||||
|
@ -279,10 +289,14 @@ TESTS=aa_exec \
|
|||
unlink\
|
||||
userns\
|
||||
xattrs\
|
||||
xattrs_profile\
|
||||
longpath \
|
||||
nfs
|
||||
|
||||
# Only do xattrs_profile test if we have the required setfattr binary
|
||||
ifneq (,$(shell which -s setfattr && echo TRUE))
|
||||
TESTS+=xattrs_profile
|
||||
endif
|
||||
|
||||
#only do dbus if proper libs are installl
|
||||
ifneq (,$(shell pkg-config --exists dbus-1 && echo TRUE))
|
||||
TESTS+=dbus_eavesdrop dbus_message dbus_service dbus_unrequested_reply
|
||||
|
|
Loading…
Add table
Reference in a new issue