On 04/09/2023 03:05, Anand Jain wrote: > > > Thanks for the test cases. These test cases might need to be updated as > per the final changes in the kernel patches. > Hi Anand, thanks a lot for the review! Very useful to me. Now, what updates are missing? I've worked this fstests case after V3 was done and tested with that. Is there any missing piece you noticed? >> [...] >> +_require_scratch_dev_pool 2 >> +_scratch_dev_pool_get 2 > > We can use > > _scratch_dev_pool_get 1 > _spare_dev_get > > So scratch devices are set to SCRATCH_DEV and SPARE_DEV. > > [...] > we can use something like: > > test_dir="${TEST_DIR}/${seq}" > scratch_mnt_copy=$test_dir/mnt_copy > >> + >> +DEV1=$(echo $SCRATCH_DEV_POOL | $AWK_PROG '{ print $1 }') >> +DEV2=$(echo $SCRATCH_DEV_POOL | $AWK_PROG '{ print $2 }') > Great hints, I'll change and send V2 - thanks! > > A general rule of thumb is to have one test case per file. > Well, I agree but what I'm doing in fact is testing single-dev feature in this test case, so it's self-contained and single-scoped, only single-dev stuff! I personally wouldn't see advantages having 3 tests doing almost the same thing, but if that's a requirement, I can change. > [...] >> +$MKFS_BTRFS_PROG -O single-dev $DEV1 >>$seqres.full 2>&1 > > _scratch_mkfs "-b 300m -O single-dev" > > The '-b 300m' option prevents the below 'dd' operation from taking > too long to complete on larger devices. > >> +dd if=$DEV1 of=$DEV2 bs=64M conv=fsync >> $seqres.full 2>&1 >> + > > dd if=$SCRATCH_DEV of=SPARE_DEV bs=300m count=1 conv=fsync >> > $seqres.full 2>&1 > [...] > >> +mount_btrfs $DEV1 $SCRATCH_MNT/$DIR_a >> +mount_btrfs $DEV2 $SCRATCH_MNT/$DIR_b > > > _scratch_mount > _mount $SPARE_DEV $scratch_mnt_copy > > _spare_dev_put > _scratch_dev_pool_put > > > status=0 > exit > That is very useful, will change for sure! Thanks again.