Testing/CCWTestDevice

From QEMU
Revision as of 16:59, 15 September 2017 by Cohuck (talk | contribs) (Created page with "= CCW Test Device = We want to provide a device in QEMU that can be used to test various kind of channel programs for s390x machines. This device should be distinct from curr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CCW Test Device

We want to provide a device in QEMU that can be used to test various kind of channel programs for s390x machines. This device should be distinct from currently exiting emulated devices (like virtio-ccw or 3270). This can be used to test features mandated by the architecture that are not yet implemented for any device that QEMU supports, as well as for exercising seldom-used error paths.

General approach

Provide a device derived from TYPE_CCW_DEVICE that can be instantiated via the normal -device mechanism. It needs a control unit type especially reserved for testing. A ccw interpretation callback can be used to process different kinds of ccws.

From the guest side, this looks like a normal ccw device. Testing might be done via a custom Linux kernel driver, the kvm-test infrastructure or qtest.

Example

A device for testing data addressing has been posted at [1].

To Do

  • Reserve a control unit type for testing, or find out whether such a thing already exists.
  • Factor out the existing test, making it extensible.
  • Evaluate various options for the guest side.

Things to test

  • data handling (as in the example)
  • channel program chains (including things like TIC)
  • error handling (various unit checks etc.)
  • channel program fuzzing
  • suspending/resuming a channel program