Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Philippe Mathieu-Daudé
>> > Is there a specific reason why adding SD Card support to libqos is not >> > possible in C? >> >> Short (joking) answer: Would you write tests/qemu-iotests/041 in C? ;) > > 041 is not a device-level test. It doesn't poke device registers, it's > a functional test. In my email I said I support

Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Stefan Hajnoczi
On Thu, Dec 14, 2017 at 11:33:03AM -0300, Philippe Mathieu-Daudé wrote: > Hi Stefan, > > On 12/14/2017 06:39 AM, Stefan Hajnoczi wrote: > [...] > > Device qtests are better done in C than Python. Python is not good at > > binary I/O and porting this to Python 3 will be extra work later (Python >

Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Philippe Mathieu-Daudé
Hi Stefan, On 12/14/2017 06:39 AM, Stefan Hajnoczi wrote: [...] > Device qtests are better done in C than Python. Python is not good at > binary I/O and porting this to Python 3 will be extra work later (Python > 2 is set for End-of-Life in 2020, see https://pythonclock.org/). > > More important

Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 10:39, Stefan Hajnoczi wrote: >> # verify Card ID >> data = self.bus.do_cmd(ALL_SEND_CID) >> oid, pnm, psn = struct.unpack(">x2s5sxLxxx", data) >> self.assertEqual(oid, "XY") # QEMU default >> self.assertEqual(pnm, "QEMU!") #

Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 06:35:51PM -0300, Philippe Mathieu-Daudé wrote: > Hi, > > With this series we can now write tests using Python rather than C. > For complex tests this can reduce the test development time, we can focus on > the test purposes instead of his implementation details. > > - 1,2

[Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-13 Thread Philippe Mathieu-Daudé
Hi, With this series we can now write tests using Python rather than C. For complex tests this can reduce the test development time, we can focus on the test purposes instead of his implementation details. - 1,2: we already have Python classes to run Block tests, move all the non Block-related