From 86f6481e996bb65cd71f7a946aec4964c89599d5 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 13 Feb 2018 11:55:07 +1100 Subject: [PATCH] ctdb-tests: Avoid creating files in /tmp. Temporary test data should all go somewhere under TEST_VAR_DIR instead of in the global /tmp. The existing mktemp could be changed so the data goes into the test directory but mktemp is overkill in this case. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tests/eventscripts/stubs/ip | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ctdb/tests/eventscripts/stubs/ip b/ctdb/tests/eventscripts/stubs/ip index 2468e44ea64..af155beb188 100755 --- a/ctdb/tests/eventscripts/stubs/ip +++ b/ctdb/tests/eventscripts/stubs/ip @@ -485,7 +485,8 @@ ip_rule_del () touch "$_f" ( flock 0 - _tmp="$(mktemp)" + _tmp="${_f}.new" + : >"$_tmp" _found=false while read _p _t _s ; do if ! $_found && \