Skip to contentSkip to conversation

selinux-testsuite: don't override PATH variable when running tests

PATCH In review Paul Moore 2 participants 3 messages Apr 10, 2025 – Apr 14, 2025 SELinux security module

lore
Share & tools
lore

Paul Moore

author maintainer
#0 lore raw

PATCH 1/1 selinux-testsuite: don't override PATH variable when running tests

I have a test system that requires a PATH different than what is embedded into the test suite's Makefile. While there is perhaps some risk in using the caller's PATH in the test suite, given that this is a test suite I expect that the caller would be aware of such risks.

---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -1
index 35bb35871b48..7a6aace180db 100644
@@ -184,7 +184,7 @@ all:
 
 test: all
 	chcon -R -t test_file_t .
-	@SUBDIRS="$(SUBDIRS)" PATH=/usr/bin:/bin:/usr/sbin:/sbin ./runtests.pl
+	@SUBDIRS="$(SUBDIRS)" ./runtests.pl
 
 clean:
 	@for subdir in $(SUBDIRS); do \
Signature · 1 line
2.49.0
#1 lore raw
Quoted 25 lines · Paul Moore

I have a test system that requires a PATH different than what is embedded into the test suite's Makefile. While there is perhaps some risk in using the caller's PATH in the test suite, given that this is a test suite I expect that the caller would be aware of such risks.

---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -2
index 35bb35871b48..7a6aace180db 100644
@@ -184,7 +184,7 @@ all:
 
 test: all
        chcon -R -t test_file_t .
-       @SUBDIRS="$(SUBDIRS)" PATH=/usr/bin:/bin:/usr/sbin:/sbin ./runtests.pl
+       @SUBDIRS="$(SUBDIRS)" ./runtests.pl
 
 clean:
        @for subdir in $(SUBDIRS); do \
--
Quoted 1 line

2.49.0

Seems reasonable - applied:
https://github.com/SELinuxProject/selinux-testsuite/commit/122484a43291edebc5a7c552f455ff35d0e01d95

Signature · 3 lines
Ondrej Mosnacek
Senior Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.
author maintainer
#2 lore raw
Quoted 23 lines · Ondrej Mosnacek
Quoted 22 lines · Paul Moore

I have a test system that requires a PATH different than what is embedded into the test suite's Makefile. While there is perhaps some risk in using the caller's PATH in the test suite, given that this is a test suite I expect that the caller would be aware of such risks.

---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -1
index 35bb35871b48..7a6aace180db 100644
@@ -184,7 +184,7 @@ all:
 
 test: all
        chcon -R -t test_file_t .
-       @SUBDIRS="$(SUBDIRS)" PATH=/usr/bin:/bin:/usr/sbin:/sbin ./runtests.pl
+       @SUBDIRS="$(SUBDIRS)" ./runtests.pl
 
Quoted 7 lines
Quoted 4 lines
tests/Makefile +0 -1
 clean:
        @for subdir in $(SUBDIRS); do \
--

2.49.0

Seems reasonable - applied:
https://github.com/SELinuxProject/selinux-testsuite/commit/122484a43291edebc5a7c552f455ff35d0e01d95

Thanks Ondrej.

Signature · 1 line
paul-moore.com