selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Ondrej Mosnacek <omosnace@redhat.com>,
	selinux@vger.kernel.org,
	Richard Haines <richard_c_haines@btinternet.com>
Subject: Re: [PATCH testsuite] tests/Makefile: check if BPF library is installed
Date: Fri, 20 Sep 2019 09:02:25 -0400	[thread overview]
Message-ID: <b8968a99-e780-d530-9e90-9650a7da70fc@tycho.nsa.gov> (raw)
In-Reply-To: <20190920115019.23144-1-omosnace@redhat.com>

On 9/20/19 7:50 AM, Ondrej Mosnacek wrote:
> Check for the existence of the <bpf/bpf.h> header before enabling BPF
> testing. Otherwise building the tests fails in an environment where
> the kernel and policy support BPF, but the library is not installed.
> 
> Fixes: 8f0f980a4ad5 ("selinux-testsuite: Add BPF tests")
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
> ---
>   tests/Makefile | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index e5bdfff..e8cf008 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -43,10 +43,12 @@ endif
>   
>   ifeq ($(shell grep -q bpf $(POLDEV)/include/support/all_perms.spt && echo true),true)
>   ifneq ($(shell ./kvercmp $$(uname -r) 4.15),-1)
> +ifneq (,$(wildcard $(INCLUDEDIR)/bpf/bpf.h))
>   SUBDIRS += bpf
>   export CFLAGS += -DHAVE_BPF
>   endif
>   endif
> +endif

I think Richard had something like this originally and I told him to 
take it out.  The rationale was that he added libbpf-devel as a required 
dependency to the README and we don't want to silently skip tests 
because someone forgot to install some package; I'd rather it fail at 
build time.

>   
>   ifeq ($(shell grep "^SELINUX_INFINIBAND_ENDPORT_TEST=" infiniband_endport/ibendport_test.conf | cut -d'=' -f 2),1)
>   SUBDIRS += infiniband_endport
> 


  reply	other threads:[~2019-09-20 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 11:50 [PATCH testsuite] tests/Makefile: check if BPF library is installed Ondrej Mosnacek
2019-09-20 13:02 ` Stephen Smalley [this message]
2019-09-20 19:29   ` Ondrej Mosnacek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8968a99-e780-d530-9e90-9650a7da70fc@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=omosnace@redhat.com \
    --cc=richard_c_haines@btinternet.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).