Change in vdsm[master]: Remove duplicate permissions checks

nsoffer at redhat.com nsoffer at redhat.com
Tue Oct 13 18:18:20 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: Remove duplicate permissions checks
......................................................................

Remove duplicate permissions checks

The test is calling _check_content which call _check_permissions, so
there is no point in testing the permissions again.

Change-Id: I897da2d7cd64d67081cea3b89c408c2081a91c76
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M tests/mkimageTests.py
1 file changed, 4 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/47300/1

diff --git a/tests/mkimageTests.py b/tests/mkimageTests.py
index 0971ad6..892ad25 100644
--- a/tests/mkimageTests.py
+++ b/tests/mkimageTests.py
@@ -119,13 +119,13 @@
             filepath = os.path.join(self.workdir, filename)
             if checkPerms:
                 self._check_permissions(filepath,
-                                        ((stat.S_IRGRP, True),
-                                         (stat.S_IWGRP, False),
-                                         (stat.S_IXGRP, False)))
-                self._check_permissions(filepath,
                                         ((stat.S_IRUSR, True),
                                          (stat.S_IWUSR, True),
                                          (stat.S_IXUSR, False)))
+                self._check_permissions(filepath,
+                                        ((stat.S_IRGRP, True),
+                                         (stat.S_IWGRP, False),
+                                         (stat.S_IXGRP, False)))
                 self._check_permissions(filepath,
                                         ((stat.S_IROTH, False),
                                          (stat.S_IWOTH, False),
@@ -193,18 +193,6 @@
         try:
             self._check_content()
             self._check_label(iso_img, label)
-            self._check_permissions(iso_img,
-                                    ((stat.S_IRUSR, True),
-                                     (stat.S_IWUSR, True),
-                                     (stat.S_IXUSR, False)))
-            self._check_permissions(iso_img,
-                                    ((stat.S_IRGRP, True),
-                                     (stat.S_IWGRP, False),
-                                     (stat.S_IXGRP, False)))
-            self._check_permissions(iso_img,
-                                    ((stat.S_IROTH, False),
-                                     (stat.S_IWOTH, False),
-                                     (stat.S_IXOTH, False)))
         finally:
             m.umount(force=True, freeloop=True)
             # TODO: Use libudev to wait for specific event


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I897da2d7cd64d67081cea3b89c408c2081a91c76
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list