diff mbox series

[testsuite] tests/Makefile: silence modprobe output

Message ID 20201104073140.819579-1-omosnace@redhat.com (mailing list archive)
State Accepted
Delegated to: Ondrej Mosnáček
Headers show
Series [testsuite] tests/Makefile: silence modprobe output | expand

Commit Message

Ondrej Mosnacek Nov. 4, 2020, 7:31 a.m. UTC
Avoid obtrusive error messages when the kernel doesn't support some of
the filesystems.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ondrej Mosnacek Nov. 9, 2020, 3:05 p.m. UTC | #1
On Wed, Nov 4, 2020 at 8:31 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> Avoid obtrusive error messages when the kernel doesn't support some of
> the filesystems.
>
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
> ---
>  tests/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index b441031..4c00b5f 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -19,7 +19,7 @@ MAX_KERNEL_POLICY := $(shell cat $(SELINUXFS)/policyvers)
>  POL_TYPE := $(shell ./pol_detect $(SELINUXFS))
>
>  # Filter out unavailable filesystems
> -FILESYSTEMS := $(foreach fs,$(FILESYSTEMS),$(shell modprobe $(fs) && echo $(fs)))
> +FILESYSTEMS := $(foreach fs,$(FILESYSTEMS),$(shell modprobe $(fs) &>/dev/null && echo $(fs)))
>
>  SUBDIRS:= domain_trans entrypoint execshare exectrace execute_no_trans \
>         fdreceive inherit link mkdir msg open ptrace readlink relabel rename \
> --
> 2.26.2

Applied"
https://github.com/SELinuxProject/selinux-testsuite/commit/bfa5a13114e4871b93cf87112b075f2d23698e6f

--
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.
diff mbox series

Patch

diff --git a/tests/Makefile b/tests/Makefile
index b441031..4c00b5f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -19,7 +19,7 @@  MAX_KERNEL_POLICY := $(shell cat $(SELINUXFS)/policyvers)
 POL_TYPE := $(shell ./pol_detect $(SELINUXFS))
 
 # Filter out unavailable filesystems
-FILESYSTEMS := $(foreach fs,$(FILESYSTEMS),$(shell modprobe $(fs) && echo $(fs)))
+FILESYSTEMS := $(foreach fs,$(FILESYSTEMS),$(shell modprobe $(fs) &>/dev/null && echo $(fs)))
 
 SUBDIRS:= domain_trans entrypoint execshare exectrace execute_no_trans \
 	fdreceive inherit link mkdir msg open ptrace readlink relabel rename \