@@ -42,7 +42,8 @@ create_seed()
create_sprout()
{
- _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT
+ _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT >> \
+ $seqres.full
_scratch_unmount
run_check _mount $dev_sprout $SCRATCH_MNT
echo -- sprout --
@@ -45,7 +45,8 @@ create_seed()
create_sprout_seed()
{
run_check _mount $dev_seed $SCRATCH_MNT
- _run_btrfs_util_prog device add -f $dev_sprout_seed $SCRATCH_MNT
+ _run_btrfs_util_prog device add -f $dev_sprout_seed $SCRATCH_MNT >>\
+ $seqres.full
_scratch_unmount
$BTRFS_TUNE_PROG -S 1 $dev_sprout_seed
}
@@ -53,7 +54,8 @@ create_sprout_seed()
create_next_sprout()
{
run_check _mount $dev_sprout_seed $SCRATCH_MNT
- _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT
+ _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT >>\
+ $seqres.full
_scratch_unmount
run_check _mount $dev_sprout $SCRATCH_MNT
echo -- sprout --
@@ -58,7 +58,8 @@ create_seed()
add_sprout()
{
- _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT
+ _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT >>\
+ $seqres.full
_run_btrfs_util_prog filesystem show -m $SCRATCH_MNT
_mount -o remount,rw $dev_sprout $SCRATCH_MNT
$XFS_IO_PROG -f -c "pwrite -S 0xcd 0 4M" $SCRATCH_MNT/foobar2 >\
@@ -48,7 +48,8 @@ create_seed()
add_sprout()
{
- _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT
+ _run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT >>\
+ $seqres.full
run_check mount -o rw,remount $dev_seed $SCRATCH_MNT
_run_btrfs_util_prog filesystem show -m $SCRATCH_MNT
}
@@ -49,7 +49,7 @@ _scratch_mount
# device.
_format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) > /dev/null
scratch_dev2="$(echo "${SCRATCH_DEV_POOL}" | awk '{ print $2 }')"
-$BTRFS_UTIL_PROG device add -f "$scratch_dev2" "$SCRATCH_MNT"
+$BTRFS_UTIL_PROG device add -f "$scratch_dev2" "$SCRATCH_MNT" >> $seqres.full
swapon "$SCRATCH_MNT/swap" 2>&1 | _filter_scratch
swapoff "$SCRATCH_MNT/swap" > /dev/null 2>&1
@@ -30,7 +30,7 @@ echo "Remove device"
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
_format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) > /dev/null
-$BTRFS_UTIL_PROG device add -f "$scratch_dev2" "$SCRATCH_MNT"
+$BTRFS_UTIL_PROG device add -f "$scratch_dev2" "$SCRATCH_MNT" >> $seqres.full
swapon "$SCRATCH_MNT/swap" 2>&1 | _filter_scratch
# We know the swap file is on device 1 because we added device 2 after it was
# already created.
@@ -55,9 +55,9 @@ _scratch_mount
# Add and remove device in a loop, each iteration will increase devid by 2.
# So by 64 iterations, we will definitely hit that 122 limit.
for (( i = 0; i < 64; i++ )); do
- $BTRFS_UTIL_PROG device add -f $device_2 $SCRATCH_MNT
+ $BTRFS_UTIL_PROG device add -f $device_2 $SCRATCH_MNT >> $seqres.full
$BTRFS_UTIL_PROG device del $device_1 $SCRATCH_MNT
- $BTRFS_UTIL_PROG device add -f $device_1 $SCRATCH_MNT
+ $BTRFS_UTIL_PROG device add -f $device_1 $SCRATCH_MNT >> $seqres.full
$BTRFS_UTIL_PROG device del $device_2 $SCRATCH_MNT
done | grep -v 'Resetting device zone'
_scratch_dev_pool_put
@@ -55,7 +55,8 @@ workout()
# don't test with the first device as auto fs check (_check_scratch_fs)
# picks the first device
device_1=$(echo $SCRATCH_DEV_POOL | awk '{print $2}')
- $BTRFS_UTIL_PROG device add -f "$device_1" "$TEST_DIR/$seq.mnt"
+ $BTRFS_UTIL_PROG device add -f "$device_1" "$TEST_DIR/$seq.mnt" >> \
+ $seqres.full
device_2=$(echo $SCRATCH_DEV_POOL | awk '{print $1}')
_mount -o degraded $device_2 $SCRATCH_MNT
@@ -28,7 +28,7 @@ _mkfs_dev $seed
$BTRFS_TUNE_PROG -S 1 $seed
_mount $seed $SCRATCH_MNT >> $seqres.full 2>&1
cat /proc/self/mounts | grep $seed >> $seqres.full
-$BTRFS_UTIL_PROG device add -f $sprout $SCRATCH_MNT
+$BTRFS_UTIL_PROG device add -f $sprout $SCRATCH_MNT >> $seqres.full
cat /proc/self/mounts | grep $sprout >> $seqres.full
# check if the show_devname() returns the sprout device instead of seed device.
@@ -41,7 +41,7 @@ $BTRFS_TUNE_PROG -S 1 $dev_seed
# Mount the seed device and add the rw device
_mount -o ro $dev_seed $SCRATCH_MNT
-_run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT
+_run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT >> $seqres.full
$BTRFS_UTIL_PROG device stats $SCRATCH_MNT | _filter_scratch_pool
_scratch_unmount
@@ -48,7 +48,7 @@ $BTRFS_TUNE_PROG -S 1 $seed
# Mount the seed device and add the rw device
_mount -o ro $seed $SCRATCH_MNT
-$BTRFS_UTIL_PROG device add -f $sprout $SCRATCH_MNT
+$BTRFS_UTIL_PROG device add -f $sprout $SCRATCH_MNT >> $seqres.full
_scratch_unmount
# Now remount
@@ -38,7 +38,7 @@ $BTRFS_TUNE_PROG -S 1 $seed
_mount $seed $SCRATCH_MNT 2>&1 | _filter_ro_mount | _filter_scratch
md5sum $SCRATCH_MNT/foo | _filter_scratch
-$BTRFS_UTIL_PROG device add -f $sprout $SCRATCH_MNT
+$BTRFS_UTIL_PROG device add -f $sprout $SCRATCH_MNT >> $seqres.full
_scratch_unmount
# Now remount writeable sprout device, create some data and run fstrim
I updated btrfs-progs on all my test runners and started failing tests because I was getting the TRIM messages in the golden output. There were fixes that went in recently to properly detect TRIM support which resulted in extra messages being printed. Fix this by redirecting stdout to $seqres.full for all 'btrfs device add' calls. If anything fails we'll still pollute the output, but normal status messages will get properly eaten. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- tests/btrfs/161 | 3 ++- tests/btrfs/162 | 6 ++++-- tests/btrfs/163 | 3 ++- tests/btrfs/164 | 3 ++- tests/btrfs/175 | 2 +- tests/btrfs/176 | 2 +- tests/btrfs/194 | 4 ++-- tests/btrfs/197 | 3 ++- tests/btrfs/216 | 2 +- tests/btrfs/218 | 2 +- tests/btrfs/225 | 2 +- tests/btrfs/238 | 2 +- 12 files changed, 20 insertions(+), 14 deletions(-)