diff mbox series

[2/4] g/299: speed up the test

Message ID 20220922134822.1020119-2-preichl@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/4] common: Fix file leak in _get_max_file_size | expand

Commit Message

Pavel Reichl Sept. 22, 2022, 1:48 p.m. UTC
Move the _require_xfs_io_command "falloc" above the
potencially 'expensive' function _get_max_file_size

Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
 tests/generic/299 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zorro Lang Sept. 22, 2022, 3:16 p.m. UTC | #1
On Thu, Sep 22, 2022 at 03:48:20PM +0200, Pavel Reichl wrote:
> Move the _require_xfs_io_command "falloc" above the
> potencially 'expensive' function _get_max_file_size
> 
> Signed-off-by: Pavel Reichl <preichl@redhat.com>
> ---

It's not for speeding up this test, I think you're trying to notrun this case
on a fs which doesn't support fallocate and sparse file but support truncate
syscall. Anyway I don't have objection on this patch.

>  tests/generic/299 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/299 b/tests/generic/299
> index 8e1a112c..1bb371a3 100755
> --- a/tests/generic/299
> +++ b/tests/generic/299
> @@ -24,6 +24,7 @@ _require_scratch
>  _require_odirect
>  _require_aio
>  _require_block_device $SCRATCH_DEV
> +_require_xfs_io_command "falloc"
>  
>  NUM_JOBS=$((4*LOAD_FACTOR))
>  BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
> @@ -96,7 +97,6 @@ filename=buffered-aio-verifier
>  EOF
>  
>  _require_fio $fio_config
> -_require_xfs_io_command "falloc"
>  
>  _scratch_mkfs >> $seqres.full 2>&1
>  _scratch_mount
> -- 
> 2.37.3
>
diff mbox series

Patch

diff --git a/tests/generic/299 b/tests/generic/299
index 8e1a112c..1bb371a3 100755
--- a/tests/generic/299
+++ b/tests/generic/299
@@ -24,6 +24,7 @@  _require_scratch
 _require_odirect
 _require_aio
 _require_block_device $SCRATCH_DEV
+_require_xfs_io_command "falloc"
 
 NUM_JOBS=$((4*LOAD_FACTOR))
 BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
@@ -96,7 +97,6 @@  filename=buffered-aio-verifier
 EOF
 
 _require_fio $fio_config
-_require_xfs_io_command "falloc"
 
 _scratch_mkfs >> $seqres.full 2>&1
 _scratch_mount