All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guaneryu@gmail.com>
To: schumaker.anna@gmail.com
Cc: fstests@vger.kernel.org, linux-nfs@vger.kernel.org,
	Anna.Schumaker@netapp.com
Subject: Re: [PATCH 2/2] generic: 448 shouldn't delete $BASE_TEST_FILE if it isn't set yet
Date: Sun, 20 Oct 2019 21:50:28 +0800	[thread overview]
Message-ID: <20191020135028.GA2543@desktop> (raw)
In-Reply-To: <20191018173343.303032-2-Anna.Schumaker@Netapp.com>

On Fri, Oct 18, 2019 at 01:33:43PM -0400, schumaker.anna@gmail.com wrote:
> From: Anna Schumaker <Anna.Schumaker@Netapp.com>
> 
> NFS v4.2 supports SEEK_DATA and SEEK_HOLE, but earlier versions do not.
> As a result, the test exits and runs the cleanup function without the
> $BASE_TEST_FILE variable set and the shell expands it to "rm -f .*",
> deleting all hidden files in the current directory.
> 
> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
> ---
>  tests/generic/448 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/generic/448 b/tests/generic/448
> index dada499b..d6cdebbf 100755
> --- a/tests/generic/448
> +++ b/tests/generic/448
> @@ -17,7 +17,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>  
>  _cleanup()
>  {
> -	rm -f $tmp.* $BASE_TEST_FILE.*
> +	rm -f $tmp.*
> +	[ ! -z $BASE_TEST_FILE ] && rm -f $BASE_TEST_FILE.*
>  }

I'd just define BASE_TEST_FILE before _cleanup (and did it on commit).
Thanks for the fix!

Eryu
>  
>  # get standard environment, filters and checks
> -- 
> 2.23.0
> 

      reply	other threads:[~2019-10-20 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 17:33 [PATCH 1/2] generic: Create new outfile for 035 over NFS schumaker.anna
2019-10-18 17:33 ` [PATCH 2/2] generic: 448 shouldn't delete $BASE_TEST_FILE if it isn't set yet schumaker.anna
2019-10-20 13:50   ` Eryu Guan [this message]

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=20191020135028.GA2543@desktop \
    --to=guaneryu@gmail.com \
    --cc=Anna.Schumaker@netapp.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=schumaker.anna@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.