xfs
[Top] [All Lists]

Re: xfstests: change directory to / before _cleanup_testdir in test 135

To: Boris Ranto <branto@xxxxxxxxxx>
Subject: Re: xfstests: change directory to / before _cleanup_testdir in test 135
From: Alex Elder <aelder@xxxxxxx>
Date: Mon, 07 Mar 2011 14:12:29 -0600
Cc: xfs <xfs@xxxxxxxxxxx>
In-reply-to: <1299511558.3183.115.camel@xxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1299511558.3183.115.camel@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Mon, 2011-03-07 at 16:25 +0100, Boris Ranto wrote:
> Nfs tries to umount $testdir in _cleanup_testdir function. The test 135 calls 
> the function from directory $SCRATCH_MNT that is equal to $testdir (at least 
> for nfs). The umount will therefore fail causing the test to fail due to the 
> output mismatch.
> 
> This simple patch fixes the issue for me.
> 
> Signed-off-by: Boris Ranto <branto@xxxxxxxxxx>

This looks OK to me.  Most other tests do this chdir
in their cleanup function.

I did a quick scan and found that test 126 may suffer the
same problem.  Can you check this?  We could include the
fix for both tests in the same commit.


It also looks to me like tests 069, 089 might have a
similar issue if they get interrupted.

                                        -Alex

> diff -urpN a/xfstests/135 b/xfstests/135
> --- a/xfstests/135    2011-03-07 14:54:15.855172101 +0100
> +++ b/xfstests/135    2011-03-07 14:54:29.895048375 +0100
> @@ -34,6 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
>  
>  _cleanup()
>  {
> +    cd /
>      _cleanup_testdir
>  }
> 
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs



<Prev in Thread] Current Thread [Next in Thread>