Hi, David Sterba Thanks for review.
> -----Original Message----- > From: David Sterba [mailto:dste...@suse.cz] > Sent: Monday, August 31, 2015 10:48 PM > To: Zhao Lei <zhao...@cn.fujitsu.com> > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH v2 2/4] btrfs-progs: tests: Fix mount fail of > 013-extent-tree-rebuild > > On Mon, Aug 31, 2015 at 01:04:37PM +0800, Zhao Lei wrote: > > +mount_test_dev() > > +{ > > + local loop_opt > > + if [[ -b "$TEST_DEV" ]]; then > > + loop_opt=() > > + elif [[ -f "$TEST_DEV" ]]; then > > + loop_opt=(-o loop) > > + else > > + _fail "Invalid \$TEST_DEV: $TEST_DEV" > > + fi > > + > > + [[ -d "$TEST_MNT" ]] || { > > + _fail "Invalid \$TEST_MNT: $TEST_MNT" > > + } > > + > > + mount "${loop_opt[@]}" "$TEST_DEV" "$TEST_MNT" || _fail "mount > $TEST_DEV to $TEST_MNT failed" > > This needs the root helper, > > besides I don't see a reason why to use the array to > pass the loop options. > Only personal habit, will not use it in v2. > On newer systems the option 'loop' is not necessary and mount works with that > Glad to hear it. > but I don't mind adding support for systems where this does not work. However, > this should not break current behaviour. > > One thing that I find important is that the full commands are logged via the > run_check helpers. So I suggest to add run_check_mount_test_dev helper that > would wrapp all the commands. The combination of shell functions does not > work in all cases. > Ok. Thanks Zhaolei -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html