Revert "testsuite: LVM: fix naming assumptions"
authorDavid Zeuthen <davidz@redhat.com>
Fri, 26 Aug 2011 17:09:41 +0000 (13:09 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Fri, 26 Aug 2011 17:09:41 +0000 (13:09 -0400)
This reverts commit cb9263122e90391bd9fe4a2d8859c596030ecdda.

tests/run

index 5902375..67787fe 100755 (executable)
--- a/tests/run
+++ b/tests/run
@@ -1226,20 +1226,16 @@ class LVM(UDisksTestCase):
             'org.freedesktop.UDisks', lvname), dbus.PROPERTIES_IFACE)
 
         # the LV is a real volume which should be shown, but not automounted
-        self.assert_(lv_props.Get(I_D, 'DeviceFile').startswith('/dev/dm-'))
+        self.assert_(lv_props.Get(I_D, 'DeviceFile').startswith('/dev/mapper/'))
         self.assertEqual(lv_props.Get(I_D, 'DevicePresentationHide'), False)
         self.assertEqual(lv_props.Get(I_D, 'DevicePresentationNopolicy'), True)
 
-        # ensure that we have a by-name and a by-UUID link
+        # ensure that we have a UUID
         found_uuid = False
-        found_name = False
         for i in lv_props.Get(I_D, 'DeviceFileById'):
             if 'uuid-LVM' in i:
                 found_uuid = True
-            if 'udtestlv1' in i:
-                found_name = True
         self.assert_(found_uuid, 'no by-uuid found in ' + str(i))
-        self.assert_(found_uuid, 'no by-name found in ' + str(i))
 
     def test_single_lv_raid(self):
         '''LVM: Single LV, RAID-1'''
@@ -1275,6 +1271,7 @@ class LVM(UDisksTestCase):
                 'org.freedesktop.UDisks', o), dbus.PROPERTIES_IFACE)
 
             if o == real_lv_obj:
+                self.assert_(props.Get(I_D, 'DeviceFile').startswith('/dev/mapper/'))
                 # never hide the real LV
                 self.assertEqual(props.Get(I_D, 'DevicePresentationHide'), False)
                 self.assertEqual(props.Get(I_D, 'IdUsage'), 'filesystem')
@@ -1330,7 +1327,7 @@ class LVM(UDisksTestCase):
                     dev_objpath)
             dev_p = dbus.Interface(dev_obj, dbus.PROPERTIES_IFACE)
 
-            self.assertEqual(dev_p.Get(I_D, 'DeviceFile'), os.path.realpath(devname))
+            self.assertEqual(dev_p.Get(I_D, 'DeviceFile'), devname)
             self.assertEqual(dev_p.Get(I_D, 'DeviceIsPartition'), False)
             self.assertEqual(dev_p.Get(I_D, 'PartitionScheme'), '')
             self.assertEqual(dev_p.Get(I_D, 'DeviceIsPartitionTable'), True)
@@ -1341,6 +1338,7 @@ class LVM(UDisksTestCase):
                     self.manager_iface.FindDeviceByDeviceFile(devname + 'p1'))
             p1_p = dbus.Interface(p1_obj, dbus.PROPERTIES_IFACE)
 
+            self.assertEqual(p1_p.Get(I_D, 'DeviceFile'), devname + 'p1')
             self.assertEqual(p1_p.Get(I_D, 'DeviceIsPartition'), True)
             self.assertEqual(p1_p.Get(I_D, 'DeviceIsPartitionTable'), False)
             self.assertEqual(p1_p.Get(I_D, 'DevicePresentationHide'), False)
@@ -1356,6 +1354,7 @@ class LVM(UDisksTestCase):
                     self.manager_iface.FindDeviceByDeviceFile(devname + 'p2'))
             p1_p = dbus.Interface(p1_obj, dbus.PROPERTIES_IFACE)
 
+            self.assertEqual(p1_p.Get(I_D, 'DeviceFile'), devname + 'p2')
             self.assertEqual(p1_p.Get(I_D, 'DeviceIsPartition'), True)
             self.assertEqual(p1_p.Get(I_D, 'DeviceIsPartitionTable'), False)
             self.assertEqual(p1_p.Get(I_D, 'DevicePresentationHide'), False)