Re: [PATCH] ext4/044: Add missing check for return value

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Sep 20, 2022 at 10:38:10AM +0200, Pavel Reichl wrote:
> When calling _within_tolerance either return value or text output
> should be checked. Otherwise the function is useless for a test.
> 
> Signed-off-by: Pavel Reichl <preichl@xxxxxxxxxx>
> ---

Make sense,

Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx>

>  tests/ext4/044     | 8 +++-----
>  tests/ext4/044.out | 4 +++-
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/ext4/044 b/tests/ext4/044
> index 158e2ac5..50de5a40 100755
> --- a/tests/ext4/044
> +++ b/tests/ext4/044
> @@ -18,8 +18,6 @@ _require_scratch
>  _require_test_program "t_get_file_time"
>  _require_metadata_journaling
>  
> -echo "Silence is golden"
> -
>  echo "Test timestamps with 256 inode size one device $SCRATCH_DEV" >$seqres.full
>  _scratch_mkfs -t ext3 -I 256 >> $seqres.full 2>&1
>  _scratch_mount
> @@ -49,9 +47,9 @@ nsec_mtime: $nsec_mtime, nsec_ctime: $nsec_ctime, cur_time[ns]: $nsec)"
>  fi
>  
>  # Check difference between file time and current time
> -_within_tolerance "sec_atime" $sec_atime $sec 1
> -_within_tolerance "sec_mtime" $sec_mtime $sec 1
> -_within_tolerance "sec_ctime" $sec_ctime $sec 1
> +_within_tolerance "sec_atime" $sec_atime $sec 1 -v
> +_within_tolerance "sec_mtime" $sec_mtime $sec 1 -v
> +_within_tolerance "sec_ctime" $sec_ctime $sec 1 -v
>  
>  _scratch_unmount >> $seqres.full 2>&1
>  
> diff --git a/tests/ext4/044.out b/tests/ext4/044.out
> index 12a61dc4..8a3a8072 100644
> --- a/tests/ext4/044.out
> +++ b/tests/ext4/044.out
> @@ -1,2 +1,4 @@
>  QA output created by 044
> -Silence is golden
> +sec_atime is in range
> +sec_mtime is in range
> +sec_ctime is in range
> -- 
> 2.37.3
> 




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux