Commit 103cbc77 authored by Max Reitz's avatar Max Reitz Committed by Kevin Wolf
Browse files

iotests: Restrict file Python tests to file



Most of our Python unittest-style tests only support the file protocol.
You can run them with any other protocol, but the test will simply
ignore your choice and use file anyway.

We should let them signal that they require the file protocol so they
are skipped when you want to test some other protocol.

Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 88d2aa53
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -957,4 +957,5 @@ class TestSetSpeed(iotests.QMPTestCase):
        self.cancel_and_wait(resume=True)

if __name__ == '__main__':
    iotests.main(supported_fmts=['qcow2', 'qed'])
    iotests.main(supported_fmts=['qcow2', 'qed'],
                 supported_protocols=['file'])
+2 −1
Original line number Diff line number Diff line
@@ -429,4 +429,5 @@ class TestReopenOverlay(ImageCommitTestCase):
        self.run_commit_test(self.img1, self.img0)

if __name__ == '__main__':
    iotests.main(supported_fmts=['qcow2', 'qed'])
    iotests.main(supported_fmts=['qcow2', 'qed'],
                 supported_protocols=['file'])
+2 −1
Original line number Diff line number Diff line
@@ -1122,4 +1122,5 @@ class TestOrphanedSource(iotests.QMPTestCase):
        self.assert_qmp(result, 'error/class', 'GenericError')

if __name__ == '__main__':
    iotests.main(supported_fmts=['qcow2', 'qed'])
    iotests.main(supported_fmts=['qcow2', 'qed'],
                 supported_protocols=['file'])
+2 −1
Original line number Diff line number Diff line
@@ -118,4 +118,5 @@ class TestRefcountTableGrowth(iotests.QMPTestCase):
        pass

if __name__ == '__main__':
    iotests.main(supported_fmts=['qcow2'])
    iotests.main(supported_fmts=['qcow2'],
                 supported_protocols=['file'])
+2 −1
Original line number Diff line number Diff line
@@ -175,4 +175,5 @@ class TestSCMFd(iotests.QMPTestCase):
            "File descriptor named '%s' not found" % fdname)

if __name__ == '__main__':
    iotests.main(supported_fmts=['raw'])
    iotests.main(supported_fmts=['raw'],
                 supported_protocols=['file'])
Loading