예제 #1
0
 def test_mkFloppyFs(self, label):
     """
     Tests mkimage.mkFloppyFs creating an image and checking its content.
     Requires root permissions for writing into the floppy image.
     """
     floppy = mkimage.mkFloppyFs("vmId_floppy", self.files, label)
     self.assertTrue(os.path.exists(floppy))
     m = storage.mount.Mount(floppy, self.workdir)
     m.mount(mntOpts='loop')
     try:
         self._check_content(checkPerms=False)
         self._check_label(floppy, label)
     finally:
         m.umount(force=True, freeloop=True)
예제 #2
0
 def test_mkFloppyFs(self, label):
     """
     Tests mkimage.mkFloppyFs creating an image and checking its content.
     Requires root permissions for writing into the floppy image.
     """
     floppy = mkimage.mkFloppyFs("vmId_floppy", self.files, label)
     self.assertTrue(os.path.exists(floppy))
     m = mount.Mount(floppy, self.workdir)
     m.mount(mntOpts='loop')
     try:
         self._check_content(checkPerms=False)
         self._check_label(floppy, label)
     finally:
         m.umount()
예제 #3
0
 def test_mkFloppyFs(self, label):
     """
     Tests mkimage.mkFloppyFs creating an image and checking its content.
     Requires root permissions for writing into the floppy image.
     """
     floppy = mkimage.mkFloppyFs("vmId_floppy", self.files, label)
     self.assertTrue(os.path.exists(floppy))
     m = mount.Mount(floppy, self.workdir)
     m.mount(mntOpts='loop')
     try:
         self._check_content(checkPerms=False)
         self._check_label(floppy, label)
     finally:
         m.umount(force=True, freeloop=True)
         # TODO: Use libudev to wait for specific event
         with stopwatch("Wait for udev events"):
             udevadm.settle(5)
예제 #4
0
 def test_mkFloppyFs(self, label):
     """
     Tests mkimage.mkFloppyFs creating an image and checking its content.
     Requires root permissions for writing into the floppy image.
     """
     floppy = mkimage.mkFloppyFs("vmId_floppy", self.files, label)
     self.assertTrue(os.path.exists(floppy))
     m = mount.Mount(floppy, self.workdir)
     m.mount(mntOpts="loop")
     try:
         self._check_content(checkPerms=False)
         self._check_label(floppy, label)
     finally:
         m.umount(force=True, freeloop=True)
         # TODO: Use libudev to wait for specific event
         with stopwatch("Wait for udev events"):
             udevadm.settle(5)
예제 #5
0
 def mkFloppyFs(self, vmId, files, volId):
     return mkimage.mkFloppyFs(vmId, files, volId)