From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 6DA9B5F62 for ; Wed, 19 Sep 2018 19:16:40 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 016DE21B13; Wed, 19 Sep 2018 13:16:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 19 Sep 2018 13:16:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=V/V jMapUrdo+OONdvdPGdxHM9S6BwJvY7rFkpLgfL7A=; b=bTNZbL8kUwbWgHpKw60 0Dt5jEAitOBqEkH457FB5mzF3jlp0dk6YKAwkx2zMe5clRX9aSMHhgFOiF9M5qax qiRPZqMc1fZIURvktCotWNkE+xlDESp1YnumIFOYV8rmhiwe9C75/js5u8tCtit5 wepYFKXeJtkcfYYih3CetZLM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=V/VjMapUrdo+OONdvdPGdxHM9S6BwJvY7rFkpLgfL 7A=; b=f7iDyZ1VJYipEfULKAB039tYwJxJDiizG8vasYWdbF+OyM5qvOI8EcD69 r12Toas7U2HfOUVqCZKt5NIsZU5TpjVnwB/VurqrLvVclIlUy1ziAGYDpFke2ydi Z8PLaYxJd+R6an8VuFH0lRYHrpjmK9tLvxF0GNEBEIdhlOa3YBwsA2NATiMw9XDO fl2V/gBmQrCpAR22XJ/McSyhsDJ7sm6H4kfnNoQIEGXkYGYLWRWWD0C6+r0TPRjQ DCUg4YOHMEhmk/j31KWzjFEoNzW9m9NAIjVFh3uR4teeWM8BRCiZ6IMJB3Mas5qN StRfnlGHuClstW2QupTJPUhs20Otg== X-ME-Proxy: X-ME-Sender: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BA3BD102E4; Wed, 19 Sep 2018 13:16:38 -0400 (EDT) From: Thomas Monjalon To: Adrien Mazarguil , Neil Horman Cc: dev@dpdk.org Date: Wed, 19 Sep 2018 19:16:29 +0200 Message-Id: <20180919171629.19760-1-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] devtools: use a common prefix for temporary files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 17:16:40 -0000 Some temporary files were generated in /tmp, others in the current directory, and none was "dpdk prefixed". All these files have a common path prefix now: $TMPDIR/dpdk. TMPDIR is /tmp by default. Note: the previous use of mktemp, with a template but without -t, was generating a file in the current directory. Signed-off-by: Thomas Monjalon --- buildtools/auto-config-h.sh | 2 +- devtools/check-includes.sh | 4 ++-- devtools/check-symbol-change.sh | 2 +- devtools/checkpatches.sh | 4 ++-- devtools/cocci.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/buildtools/auto-config-h.sh b/buildtools/auto-config-h.sh index d28a5c3ad..6130429eb 100755 --- a/buildtools/auto-config-h.sh +++ b/buildtools/auto-config-h.sh @@ -23,7 +23,7 @@ name=${5:?define/type/function name required} : ${CC:=cc} -temp=/tmp/${0##*/}.$$.c +temp=$(mktemp -t dpdk.${0##*/}.XXX.c) case $type in define) diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh index 9057633e7..ba9d00ba3 100755 --- a/devtools/check-includes.sh +++ b/devtools/check-includes.sh @@ -90,11 +90,11 @@ include_dir=${1:-build/include} 'rte_eth_vhost.h' \ } -temp_cc=/tmp/${0##*/}.$$.c +temp_cc=$(mktemp -t dpdk.${0##*/}.XXX.c) pass_cc= failures_cc=0 -temp_cxx=/tmp/${0##*/}.$$.cc +temp_cxx=$(mktemp -t dpdk.${0##*/}.XXX.cc) pass_cxx= failures_cxx=0 diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh index cf9cfc745..c0d2a6da1 100755 --- a/devtools/check-symbol-change.sh +++ b/devtools/check-symbol-change.sh @@ -140,7 +140,7 @@ check_for_rule_violations() trap clean_and_exit_on_sig EXIT -mapfile=`mktemp mapdb.XXXXXX` +mapfile=`mktemp -t dpdk.mapdb.XXXXXX` patch=$1 exit_code=1 diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index ba795ad1d..61837209f 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -157,11 +157,11 @@ check () { # if [ -n "$1" ] ; then tmpinput=$1 elif [ -n "$2" ] ; then - tmpinput=$(mktemp checkpatches.XXXXXX) + tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX) git format-patch --find-renames \ --no-stat --stdout -1 $commit > "$tmpinput" else - tmpinput=$(mktemp checkpatches.XXXXXX) + tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX) cat > "$tmpinput" fi diff --git a/devtools/cocci.sh b/devtools/cocci.sh index 4ca5025f7..8b17a8ceb 100755 --- a/devtools/cocci.sh +++ b/devtools/cocci.sh @@ -44,7 +44,7 @@ PATCH_LIST="$@" exit 1 ) -tmp=$(mktemp) +tmp=$(mktemp -t dpdk.cocci.XXX) for c in $PATCH_LIST; do while true; do -- 2.19.0