On Tue, Jul 1, 2014 at 10:10 AM, Kevin Wolf <kw...@redhat.com> wrote: > Am 30.06.2014 um 16:09 hat Stefan Hajnoczi geschrieben: >> On Fri, Jun 27, 2014 at 10:17:16PM +0200, Benoît Canet wrote: >> I think this patch can be boiled down to 2 lines: >> >> if __name__ == '__main__': >> + if 'quorum' not in iotests.qemu_img('--help'): >> + iotests.notrun('not built with quorum support') >> iotests.main(supported_fmts=['qcow2', 'qed']) >> >> What do you think? > > That would disable the whole test case 041, whereas Benoît's patch > only disables the quorum-related part. (The test case is really about > migration, not only quorum.)
Good point. I thought about skipping TestRepairQuorum to avoid all those if statements (which are also easy to forget when adding a new test case) but it would be more hassle than just having the if statements. I now think the original approach was right, just simplify has_quorum() using qemu_img_pipe() instead of using subprocess. Stefan