Message ID | 1506495852-7295-3-git-send-email-amir73il@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Sep 27, 2017 at 10:04 AM, Amir Goldstein <amir73il@gmail.com> wrote: > Tests that use _overlay_mount_dirs() should also use the > default overlay mount options. Vivek, Eryu, I should make a disclaimer here: I did not test with SELINUX_MOUNT_OPTIONS because I have no SELinux in my test setup. Specifically, I am concerned that tests that compose "special" overlay mounts, like tmpfs mounts and stacked overlay mounts (overlay/029) may not play well with SELINUX_MOUNT_OPTIONS applied to the special mounts. I am less concerned about the tests that were converted to use _overlay_scratch_mount_dirs() helper. Can either of you run a -g overlay/quick test with this series and valid SELINUX_MOUNT_OPTIONS? Thanks, Amir. -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Sep 27, 2017 at 10:50:46AM +0300, Amir Goldstein wrote: > On Wed, Sep 27, 2017 at 10:04 AM, Amir Goldstein <amir73il@gmail.com> wrote: > > Tests that use _overlay_mount_dirs() should also use the > > default overlay mount options. > > Vivek, Eryu, > > I should make a disclaimer here: I did not test with SELINUX_MOUNT_OPTIONS > because I have no SELinux in my test setup. > > Specifically, I am concerned that tests that compose "special" overlay mounts, > like tmpfs mounts and stacked overlay mounts (overlay/029) may not play well > with SELINUX_MOUNT_OPTIONS applied to the special mounts. > I am less concerned about the tests that were converted to use > _overlay_scratch_mount_dirs() helper. > > Can either of you run a -g overlay/quick test with this series and valid > SELINUX_MOUNT_OPTIONS? Sure, I'll do the testings anyway, and I have selinux enabled on my test vms. I noticed the overlay mount option mess too when I was reviewing MOUNT_OPTIONS fixes for btrfs from Gu Jinxiang last week. I was hoping to refactor the whole mount option handling through fstests. Perhaps this patchset is good start toward that direction. I'll test and review them. Thanks! Eryu -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Sep 27, 2017 at 10:04:10AM +0300, Amir Goldstein wrote: > Tests that use _overlay_mount_dirs() should also use the > default overlay mount options. > Move mount options from overlay_mount() into _overlay_mount_dirs() > and use helper common_dev_mount_opts() to get options. > > OVERLAY_MOUNT_OPTIONS is assigned to MOUNT_OPTIONS, so > there is no need to use OVERLAY_MOUNT_OPTIONS directly. Agreed, all the fs-specific mount options should be assigned to MOUNT_OPTIONS in common/config at test init time, if MOUNT_OPTIONS is not specified. We should always use MOUNT_OPTIONS or TEST_FS_MOUNT_OPTS in other places. Thanks, Eryu > > Signed-off-by: Amir Goldstein <amir73il@gmail.com> > > Use common_dev_mount_opts in _overlay_mount_dirs() > --- > common/rc | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/common/rc b/common/rc > index 1a61549..b30c4b9 100644 > --- a/common/rc > +++ b/common/rc > @@ -342,7 +342,7 @@ _overlay_mount_dirs() > shift 3 > > $MOUNT_PROG -t overlay -o lowerdir=$lowerdir -o upperdir=$upperdir \ > - -o workdir=$workdir $* > + -o workdir=$workdir `_common_dev_mount_options $*` > } > > _overlay_mkdirs() > @@ -367,9 +367,8 @@ _overlay_mount() > > _overlay_mkdirs $dir > > - _overlay_mount_dirs $dir/$OVL_LOWER $dir/$OVL_UPPER \ > - $dir/$OVL_WORK $OVERLAY_MOUNT_OPTIONS \ > - $SELINUX_MOUNT_OPTIONS $* $dir $mnt > + _overlay_mount_dirs $dir/$OVL_LOWER $dir/$OVL_UPPER $dir/$OVL_WORK \ > + $* $dir $mnt > } > > _overlay_base_test_mount() > -- > 2.7.4 > -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Sep 27, 2017 at 04:05:49PM +0800, Eryu Guan wrote: > On Wed, Sep 27, 2017 at 10:50:46AM +0300, Amir Goldstein wrote: > > On Wed, Sep 27, 2017 at 10:04 AM, Amir Goldstein <amir73il@gmail.com> wrote: > > > Tests that use _overlay_mount_dirs() should also use the > > > default overlay mount options. > > > > Vivek, Eryu, > > > > I should make a disclaimer here: I did not test with SELINUX_MOUNT_OPTIONS > > because I have no SELinux in my test setup. > > > > Specifically, I am concerned that tests that compose "special" overlay mounts, > > like tmpfs mounts and stacked overlay mounts (overlay/029) may not play well > > with SELINUX_MOUNT_OPTIONS applied to the special mounts. > > I am less concerned about the tests that were converted to use > > _overlay_scratch_mount_dirs() helper. > > > > Can either of you run a -g overlay/quick test with this series and valid > > SELINUX_MOUNT_OPTIONS? > > Sure, I'll do the testings anyway, and I have selinux enabled on my test > vms. I just finished a '-g auto' run with OVERLAY_MOUNT_OPTIONS="-o index=on" and selinux enabled, and the results look fine, all failures are known issues. Thanks for the work! Eryu -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/common/rc b/common/rc index 1a61549..b30c4b9 100644 --- a/common/rc +++ b/common/rc @@ -342,7 +342,7 @@ _overlay_mount_dirs() shift 3 $MOUNT_PROG -t overlay -o lowerdir=$lowerdir -o upperdir=$upperdir \ - -o workdir=$workdir $* + -o workdir=$workdir `_common_dev_mount_options $*` } _overlay_mkdirs() @@ -367,9 +367,8 @@ _overlay_mount() _overlay_mkdirs $dir - _overlay_mount_dirs $dir/$OVL_LOWER $dir/$OVL_UPPER \ - $dir/$OVL_WORK $OVERLAY_MOUNT_OPTIONS \ - $SELINUX_MOUNT_OPTIONS $* $dir $mnt + _overlay_mount_dirs $dir/$OVL_LOWER $dir/$OVL_UPPER $dir/$OVL_WORK \ + $* $dir $mnt } _overlay_base_test_mount()
Tests that use _overlay_mount_dirs() should also use the default overlay mount options. Move mount options from overlay_mount() into _overlay_mount_dirs() and use helper common_dev_mount_opts() to get options. OVERLAY_MOUNT_OPTIONS is assigned to MOUNT_OPTIONS, so there is no need to use OVERLAY_MOUNT_OPTIONS directly. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Use common_dev_mount_opts in _overlay_mount_dirs() --- common/rc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)