Implement and enhance unit test cases for dma-buf

Registered by Sumit Semwal

This should track the changes done in dma buf unit tests as the design evolves.

Blueprint information

Status:
Not started
Approver:
Jesse Barker
Priority:
High
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
Accepted for trunk
Implementation:
Unknown
Milestone target:
milestone icon backlog

Related branches

Sprints

Whiteboard

[jesse-barker 2012-06-20] This should be a straightforward effort on a given platform, but making it cross-platform could be a challenge. It might be easiest initially to write a simple test per-platform and then decide later whether and how to consolidate those into one test framework with lots of configurable options. The issue is that importer/exporter support is quite device specific, so the test would need to know which device to treat as exporter and which device to treat as importer and that will vary a little from platform to platform. Android is a little simpler as ION should always be the exporter, but even so, importer support will still vary. The tests should look something like:

 - open exporter device (e.g. DRM display driver)
 - mmap buffer
 - write known values (data patterns should be as non-naturally occurring as possible).
 - unmap buffer
 - export dma-buf file descriptor
 - open importer device
 - import file descriptor
 - mmap buffer
 - read data and confirm expected values
 - unmap buffer
 - close importer device
 - close exporter device

Additional variations could include the exporter/importer access being split across processes (which would require some additional logic for passing the file descriptor), but that would definitely be post-version-1.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.