xfs
[Top] [All Lists]

Re: [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-

To: Tom Marek <tmarek@xxxxxxxxxx>
Subject: Re: [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 19 Apr 2012 09:51:35 +1000
Cc: xfs@xxxxxxxxxxx, lczerner@xxxxxxxxxx, dchinner@xxxxxxxxxx
In-reply-to: <1334654687-25450-2-git-send-email-tmarek@xxxxxxxxxx>
References: <y> <1334654687-25450-1-git-send-email-tmarek@xxxxxxxxxx> <1334654687-25450-2-git-send-email-tmarek@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Apr 17, 2012 at 11:24:46AM +0200, Tom Marek wrote:
> Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
> _require_aiodio helper was added to common.rc file to fix this.
> 
> Cc: david@xxxxxxxxxxxxx
> Signed-off-by: Tom Marek <tmarek@xxxxxxxxxx>
> Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx>
.....
> @@ -770,6 +770,14 @@ _require_scratch()
>      fi
>  }
>  
> +# this test needs aio-dio-regress to be built
> +#
> +_require_aiodio()
> +{
> +    [ -x $here/src/aio-dio-regress/aiodio_sparse2 ] || \
> +        _notrun "This tests requires src/aio-dio-regress/ to be built"
> +}

This function already exists in common.rc, which is why I pointed it
out for use.

# this test requires that a (specified) aio-dio executable exists
# $1 - command (optional)
#
_require_aiodio()
{
    if [ -z "$1" ]
    then
        AIO_TEST=src/aio-dio-regress/aiodio_sparse2
        [ -x $AIO_TEST ] || _notrun "aio-dio utilities required"
    else
        AIO_TEST=src/aio-dio-regress/$1
        [ -x $AIO_TEST ] || _notrun "$AIO_TEST not built"
    fi
}

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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