Skip to contentSkip to conversation

xfstests: fix to make tests/btrfs/013 really work

PATCH Superseded ZhangZhen 2 participants 3 messages Feb 24, 2014 – Feb 25, 2014 1 message not in the archive Btrfs file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

ZhangZhen

author
#1 lore raw

PATCH 1/1 xfstests: fix to make tests/btrfs/013 really work

In reply to a message not in the archive

The test 013 couldn't work because here lacked "start". This patch fix it.

---
 tests/btrfs/013 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/btrfs/013 +1 -1
index 7620fcc..fb81663 100644
@@ -72,7 +72,7 @@ _check_csum_error()
 }
 $XFS_IO_PROG -f -c "falloc 0 1M" -c "pwrite 16k 8k" -c "fsync" \
 	$SCRATCH_MNT/foo > $seqres.full 2>&1
-$BTRFS_UTIL_PROG filesystem balance $SCRATCH_MNT >> $seqres.full 2>&1 || \
+$BTRFS_UTIL_PROG filesystem balance start $SCRATCH_MNT >> $seqres.full 2>&1 || \
 	_fail "balance failed"
 _scratch_unmount
 _scratch_mount
Signature · 12 lines
1.8.1.4


.




_______________________________________________
kernel.openeuler mailing list
[email protected]
http://rnd-openeuler.huawei.com/mailman/listinfo/kernel.openeuler
#2 lore raw

Hi Zhang,

Quoted 13 lines · ZhangZhen

The test 013 couldn't work because here lacked "start". This patch fix it.

---
  tests/btrfs/013 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/btrfs/013 +0 -0
index 7620fcc..fb81663 100644

tests/btrfs/013 _check_csum_error() · line 76

Quoted 6 lines
tests/btrfs/013 +1 -1
@@ -72,7 +72,7 @@ _check_csum_error()
  }
  $XFS_IO_PROG -f -c "falloc 0 1M" -c "pwrite 16k 8k" -c "fsync" \
  	$SCRATCH_MNT/foo > $seqres.full 2>&1
-$BTRFS_UTIL_PROG filesystem balance $SCRATCH_MNT >> $seqres.full 2>&1 || \
+$BTRFS_UTIL_PROG filesystem balance start $SCRATCH_MNT >> $seqres.full 2>&1 || \
  	_fail "balance failed"

Due to historical reasons, we have 'btrfs file balance <>'.. Until now, it is also ok to run 'btrfs file balance <mnt>', and it has equal effect as 'btrfs filesystem balance start'.

Anyway, using latest 'btrfs file balance start <mnt>' is better than previous codes..but patch's title is not right any more...

BTW,Dave Chinner previously pointed out that we need a cleanup, url can be seen:

http://oss.sgi.com/archives/xfs/2014-02/msg00482.html

Thanks,
Wang

Quoted 2 lines
tests/btrfs/013 +0 -0
  _scratch_unmount
  _scratch_mount
author
#3 lore raw

Hi Wang,
Thank you for reviewing my patch.

I ran the test using btrfs progs v0.19(OpenSuse 12.3) previously and got a fail situation. I verified v3.12 this morning and it work well as you mentioned.

Althouth the new version doesn't have this problem, I think it would be better to fix this. I'll fix the titile and resend it.

Quoted 39 lines · Wang Shilong

Hi Zhang,

Quoted 13 lines · ZhangZhen

The test 013 couldn't work because here lacked "start". This patch fix it.

---
  tests/btrfs/013 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/btrfs/013 +0 -0
index 7620fcc..fb81663 100644

tests/btrfs/013 _check_csum_error() · line 76

Quoted 6 lines
tests/btrfs/013 +1 -1
@@ -72,7 +72,7 @@ _check_csum_error()
  }
  $XFS_IO_PROG -f -c "falloc 0 1M" -c "pwrite 16k 8k" -c "fsync" \
      $SCRATCH_MNT/foo > $seqres.full 2>&1
-$BTRFS_UTIL_PROG filesystem balance $SCRATCH_MNT >> $seqres.full 2>&1 || \
+$BTRFS_UTIL_PROG filesystem balance start $SCRATCH_MNT >> $seqres.full 2>&1 || \
      _fail "balance failed"

Due to historical reasons, we have 'btrfs file balance <>'.. Until now, it is also ok to run 'btrfs file balance <mnt>', and it has equal effect as 'btrfs filesystem balance start'.

Anyway, using latest 'btrfs file balance start <mnt>' is better than previous codes..but patch's title is not right any more...

BTW,Dave Chinner previously pointed out that we need a cleanup, url can be seen:

http://oss.sgi.com/archives/xfs/2014-02/msg00482.html

Thanks,
Wang

Quoted 2 lines
tests/btrfs/013 +0 -0
  _scratch_unmount
  _scratch_mount