Change in vdsm[master]: storage: fix spec normalization when mounting

nsoffer at redhat.com nsoffer at redhat.com
Thu Apr 21 13:07:54 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: storage: fix spec normalization when mounting
......................................................................


Patch Set 9:

(3 comments)

Please fix getStorageDomainsList - missing spec normalization before transforming path.

https://gerrit.ovirt.org/#/c/55182/9/tests/mountTests.py
File tests/mountTests.py:

Line 161:                 # TODO: Use libudev to wait for specific event
Line 162:                 with stopwatch("Wait for udev events"):
Line 163:                     udevadm.settle(5)
Line 164: 
Line 165:     def test_is_mounted(self):
Lets check all 4 combinations (both spec and file match, only one match, none match).

And the case where the spec is a symbolic link (mounting local path).
Line 166:         """
Line 167:         This test verifies the correctness of a flow where we create a Mount
Line 168:         object and then check if it's mounted by running Mount.isMounted on it.
Line 169:         Specifficaly, if we normalized fs_spec the wrong way in


Line 169:         Specifficaly, if we normalized fs_spec the wrong way in
Line 170:         mount._parseFstabLine, this test would have failed since the read
Line 171:         fs_spec (after normalizing) would have been "server:" instead of
Line 172:         "server:/".
Line 173:         """
Lets don't mention the implementation details in the tests.
Line 174:         with fake_mounts([b"server:/ "
Line 175:                           b"/rhev/data-center/mnt/server:_ "
Line 176:                           b"nfs4 defaults 0 0"]):
Line 177:             self.assertTrue(mount.Mount("server:/",


Line 175:                           b"/rhev/data-center/mnt/server:_ "
Line 176:                           b"nfs4 defaults 0 0"]):
Line 177:             self.assertTrue(mount.Mount("server:/",
Line 178:                                         "/rhev/data-center/mnt/server:_")
Line 179:                             .isMounted())
Please avoid long lines.

    m = mount.Mount(...)
    self.assertTrue(m.isMounted)
Line 180: 
Line 181: 
Line 182: class IterMountsPerfTests(TestCaseBase):
Line 183:     line_fmt = ('%(fs_spec)s\t%(fs_file)s\t%(fs_vfstype)s'


-- 
To view, visit https://gerrit.ovirt.org/55182
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f244eb903fc049c726efba69f37b3b5fb01b561
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list