netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] testsuite: don't clobber /tmp
@ 2019-06-11 18:03 Matteo Croce
  2019-06-12 15:53 ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Matteo Croce @ 2019-06-11 18:03 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, David Ahern

Even if not running the testsuite, every build will leave
a stale tc_testkenv.* file in the system temp directory.
Conditionally create the temp file only if we're running the testsuite.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
---
 testsuite/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/testsuite/Makefile b/testsuite/Makefile
index 7f247bbc..5353244b 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -14,7 +14,9 @@ TESTS_DIR := $(dir $(TESTS))
 
 IPVERS := $(filter-out iproute2/Makefile,$(wildcard iproute2/*))
 
-KENVFN := $(shell mktemp /tmp/tc_testkenv.XXXXXX)
+ifeq ($(MAKECMDGOALS),alltests)
+	KENVFN := $(shell mktemp /tmp/tc_testkenv.XXXXXX)
+endif
 ifneq (,$(wildcard /proc/config.gz))
 	KCPATH := /proc/config.gz
 else
@@ -94,3 +96,4 @@ endif
 		rm "$$TMP_ERR" "$$TMP_OUT"; \
 		sudo dmesg > $(RESULTS_DIR)/$@.$$o.dmesg; \
 	done
+	@$(RM) $(KENVFN)
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-12 13:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-11 18:03 [PATCH iproute2] testsuite: don't clobber /tmp Matteo Croce
2019-06-12 15:53 ` Stephen Hemminger
2019-06-12 16:04   ` Matteo Croce
2019-06-12 17:32     ` Matteo Croce
2019-06-12 18:19       ` Stephen Hemminger
2019-06-13 17:15         ` Matteo Croce
2019-06-25 14:39           ` Matteo Croce
2019-10-12 13:32             ` Matteo Croce

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).