From: Martin Schwenke Date: Tue, 13 Feb 2018 00:55:07 +0000 (+1100) Subject: ctdb-tests: Avoid creating files in /tmp. X-Git-Tag: talloc-2.1.12~321 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86f6481e996bb65cd71f7a946aec4964c89599d5;p=thirdparty%2Fsamba.git 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 --- 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 && \