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)
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()
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)
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)
def mkFloppyFs(self, vmId, files, volId): return mkimage.mkFloppyFs(vmId, files, volId)