diff mbox series

[1/2] xfs/016: fix test fail when head equal to near_end_min

Message ID 20240712064716.3385793-1-leo.lilong@huawei.com (mailing list archive)
State New
Headers show
Series [1/2] xfs/016: fix test fail when head equal to near_end_min | expand

Commit Message

Long Li July 12, 2024, 6:47 a.m. UTC
xfs/016 checks for corruption in the log when it wraps. It looks for a log
head that is at or above the minimum log size. If the final position of
the log head equals near_end_min, the test will fail. Under these
conditions, we should let the test continue.

Signed-off-by: Long Li <leo.lilong@huawei.com>
---
 tests/xfs/016 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong July 12, 2024, 3:38 p.m. UTC | #1
On Fri, Jul 12, 2024 at 02:47:15PM +0800, Long Li wrote:
> xfs/016 checks for corruption in the log when it wraps. It looks for a log
> head that is at or above the minimum log size. If the final position of
> the log head equals near_end_min, the test will fail. Under these
> conditions, we should let the test continue.
> 
> Signed-off-by: Long Li <leo.lilong@huawei.com>
> ---
>  tests/xfs/016 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/016 b/tests/xfs/016
> index 6337bb1f..335a2d61 100755
> --- a/tests/xfs/016
> +++ b/tests/xfs/016
> @@ -239,7 +239,7 @@ while [ $head -lt $near_end_min ]; do
>  	head=$(_log_head)
>  done
>  
> -[ $head -gt $near_end_min -a $head -lt $log_size_bb ] || \
> +[ $head -ge $near_end_min -a $head -lt $log_size_bb ] || \

Heh, that's quite the coincidence!

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

>      _fail "!!! unexpected near end log position $head"
>  
>  # Step 4: Try to wrap the log, checking for corruption with each advance.
> -- 
> 2.39.2
> 
>
diff mbox series

Patch

diff --git a/tests/xfs/016 b/tests/xfs/016
index 6337bb1f..335a2d61 100755
--- a/tests/xfs/016
+++ b/tests/xfs/016
@@ -239,7 +239,7 @@  while [ $head -lt $near_end_min ]; do
 	head=$(_log_head)
 done
 
-[ $head -gt $near_end_min -a $head -lt $log_size_bb ] || \
+[ $head -ge $near_end_min -a $head -lt $log_size_bb ] || \
     _fail "!!! unexpected near end log position $head"
 
 # Step 4: Try to wrap the log, checking for corruption with each advance.