Skip to contentSkip to conversation

btrfs: drop no-op count=$(( count-- ))

PATCH In review David Disseldorp 2 participants 2 messages Mar 30, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: drop no-op count=$(( count-- ))

This line doesn't result in a changed count value. The tests don't appear to rely on a decremented value, so remove the line.

---
 tests/btrfs/124 | 1 -
 tests/btrfs/125 | 1 -
 2 files changed, 2 deletions(-)
tests/btrfs/124 +0 -1
index e8d77aaa..3d8141a1 100755
@@ -74,7 +74,6 @@ _scratch_mount >> $seqres.full 2>&1
 _run_btrfs_util_prog filesystem show
 dd if=/dev/zero of="$SCRATCH_MNT"/tf1 bs=$bs count=1 \
 					>>$seqres.full 2>&1
-count=$(( count-- ))
 echo "unmount" >> $seqres.full
 echo "clean btrfs ko" >> $seqres.full
 _scratch_unmount
tests/btrfs/125 +0 -1
index 44ba49ec..b58f2aa2 100755
@@ -80,7 +80,6 @@ dd if=/dev/zero of="$SCRATCH_MNT"/tf1 bs=$bs count=1 \
 					>>$seqres.full 2>&1
 _run_btrfs_util_prog filesystem show
 _run_btrfs_util_prog filesystem df $SCRATCH_MNT
-count=$(( count-- ))
 
 #-------------degraded-init-------------------
 echo >> $seqres.full
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Thanks for the fix.

Quoted 33 lines · David Disseldorp

This line doesn't result in a changed count value. The tests don't appear to rely on a decremented value, so remove the line.

---
  tests/btrfs/124 | 1 -
  tests/btrfs/125 | 1 -
  2 files changed, 2 deletions(-)
tests/btrfs/124 +0 -1
index e8d77aaa..3d8141a1 100755
@@ -74,7 +74,6 @@ _scratch_mount >> $seqres.full 2>&1
  _run_btrfs_util_prog filesystem show
  dd if=/dev/zero of="$SCRATCH_MNT"/tf1 bs=$bs count=1 \
  					>>$seqres.full 2>&1
-count=$(( count-- ))
  echo "unmount" >> $seqres.full
  echo "clean btrfs ko" >> $seqres.full
  _scratch_unmount
tests/btrfs/125 +0 -1
index 44ba49ec..b58f2aa2 100755
@@ -80,7 +80,6 @@ dd if=/dev/zero of="$SCRATCH_MNT"/tf1 bs=$bs count=1 \
  					>>$seqres.full 2>&1
  _run_btrfs_util_prog filesystem show
  _run_btrfs_util_prog filesystem df $SCRATCH_MNT
-count=$(( count-- ))
 
  #-------------degraded-init-------------------
  echo >> $seqres.full