* [dpdk-dev] [PATCH] devtools: use a common prefix for temporary files
@ 2018-09-19 17:16 Thomas Monjalon
2018-09-20 11:22 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2018-09-19 17:16 UTC (permalink / raw)
To: Adrien Mazarguil, Neil Horman; +Cc: dev
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 <thomas@monjalon.net>
---
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 () { # <patch> <commit> <title>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: use a common prefix for temporary files
2018-09-19 17:16 [dpdk-dev] [PATCH] devtools: use a common prefix for temporary files Thomas Monjalon
@ 2018-09-20 11:22 ` Bruce Richardson
2018-10-01 21:51 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2018-09-20 11:22 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Adrien Mazarguil, Neil Horman, dev
On Wed, Sep 19, 2018 at 07:16:29PM +0200, Thomas Monjalon wrote:
> 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 <thomas@monjalon.net>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: use a common prefix for temporary files
2018-09-20 11:22 ` Bruce Richardson
@ 2018-10-01 21:51 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-10-01 21:51 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Adrien Mazarguil, Neil Horman
20/09/2018 13:22, Bruce Richardson:
> On Wed, Sep 19, 2018 at 07:16:29PM +0200, Thomas Monjalon wrote:
> > 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 <thomas@monjalon.net>
> > ---
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-01 21:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19 17:16 [dpdk-dev] [PATCH] devtools: use a common prefix for temporary files Thomas Monjalon
2018-09-20 11:22 ` Bruce Richardson
2018-10-01 21:51 ` Thomas Monjalon
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).