public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: David Disseldorp <ddiss@suse.de>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name
Date: Tue, 27 Jun 2017 12:33:04 +0800	[thread overview]
Message-ID: <20170627043304.GW23360@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20170626134017.2741-2-ddiss@suse.de>

On Mon, Jun 26, 2017 at 03:40:17PM +0200, David Disseldorp wrote:
> 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>

I posted a patch back in Jan. to cleanup tmp files and other leftover
files after test, I switched from mktemp to a normal "tmp=/tmp/$$._mkfs"
assignment so it could avoid this problem you want to fix too. But my
patch got no review.

I'm going to send new version of my patch and will fix _scratch_do_mkfs
too, I really appreciate if you could help review and provide
Reviewed-by tag.

Thanks,
Eryu

> ---
>  common/rc  | 2 +-
>  common/xfs | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index ff1b75c9..a38f4e03 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -595,7 +595,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 0f0825bc..59776a6f 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.12.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-06-27  4:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 13:40 [PATCH 1/2] README: remove incorrect check -udf usage David Disseldorp
2017-06-26 13:40 ` [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name David Disseldorp
2017-06-27  4:33   ` Eryu Guan [this message]
2017-06-27  9:55     ` David Disseldorp
2017-06-30  4:18       ` Eryu Guan

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=20170627043304.GW23360@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=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