tree: 816b5ea293bcf72448df5834d9e287b733b7bff3 [path history] [tgz]
  1. composite-replacement/
  2. meta/
  3. target-1-replacement/
  4. target-2-replacement/
  5. BUILD.gn
  6. info.json
  7. README.md
  8. test.rs
src/devices/tests/v2/replace-driver/README.md

Replace Driver Test

This test checks that we can disable a driver and replace the driver by matching again with another driver. It uses the same drivers and topology described in the reload-driver test with the following changes:

  • target 1 is not colocated with its parent
  • target 1 replacement driver will create a child called ‘Z’ (instead of ‘I’)
  • target 2 replacement driver will create a child called ‘Y’ (instead of ‘K’)
  • The composite replacement will create a child called ‘J_replaced’ (instead of ‘J’)
  • The composite replacement will have E as the primary node (instead of ‘D’).

See //src/devices/tests/v2/reload-driver/README.md.

Target 1 replacement

This driver will be a fallback driver that should be selected immediately when rematching, after the main one has been disabled.

Target 2 replacement

This driver will be registered after the initial driver is disabled and its node goes to the available nodes. Once registered, it should get bound to the replacement.

Composite replacement

This driver is a composite driver and will ensure that fully replacing a composite driver with different primary nodes and node names works.