From: David Disseldorp <ddiss@suse.de>
To: fstests@vger.kernel.org
Cc: David Disseldorp <ddiss@suse.de>
Subject: [PATCH 3/3] common: remove tmp.mkfs[err/std] files by name
Date: Thu, 12 Jan 2017 18:18:49 +0100 [thread overview]
Message-ID: <20170112171849.10784-3-ddiss@suse.de> (raw)
In-Reply-To: <20170112171849.10784-1-ddiss@suse.de>
Without any $tmp suffix, users silly enough to run xfstests without
mktemp present will unintentionally "rm -f *".
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
common/rc | 2 +-
common/xfs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/rc b/common/rc
index 37d0fc8..4cbe00f 100644
--- a/common/rc
+++ b/common/rc
@@ -464,7 +464,7 @@ _scratch_do_mkfs()
cat $tmp.mkfsstd
eval "cat $tmp.mkfserr | $mkfs_filter" >&2
- rm -f $tmp*
+ rm -f $tmp.mkfsstd $tmp.mkfserr
return $mkfs_status
}
diff --git a/common/xfs b/common/xfs
index 767a481..582fcbe 100644
--- a/common/xfs
+++ b/common/xfs
@@ -104,7 +104,7 @@ _scratch_mkfs_xfs()
# output mkfs stdout and stderr
cat $tmp.mkfsstd
cat $tmp.mkfserr >&2
- rm -f $tmp*
+ rm -f $tmp.mkfsstd $tmp.mkfserr
return $mkfs_status
}
--
2.10.2
next prev parent reply other threads:[~2017-01-12 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 10:48 [PATCH] common: use xfs_io to obtain the xfsprogs version David Disseldorp
2017-01-11 13:25 ` Eric Sandeen
2017-01-12 3:51 ` Eryu Guan
2017-01-12 12:26 ` David Disseldorp
2017-01-12 17:18 ` [PATCH 1/3] xfs/188: add and use _require_xfs_mkfs_ciname David Disseldorp
2017-01-12 17:18 ` [PATCH 2/3] common: remove unused XFSPROGS_VERSION check David Disseldorp
2017-01-12 17:18 ` David Disseldorp [this message]
2017-01-13 4:24 ` [PATCH 3/3] common: remove tmp.mkfs[err/std] files by name Eryu Guan
2017-01-13 10:11 ` David Disseldorp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170112171849.10784-3-ddiss@suse.de \
--to=ddiss@suse.de \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox