test: check that all resources are cleaned up afterwards

This test currently fails because event channels are leaked.

Signed-off-by: David Scott <dave.scott@citrix.com>
Close event channels

Signed-off-by: David Scott <dave.scott@citrix.com>
test: check for duplicate attempts to map the same grant

Signed-off-by: David Scott <dave.scott@citrix.com>
test: check I can read; write as well as write; read

Signed-off-by: David Scott <dave.scott@citrix.com>
test: check write wraps around the ring properly

Note the subtlety surrounding 'read': it returns a reference to
the data in the ring and doesn't consume it until the next read.

Signed-off-by: David Scott <dave.scott@citrix.com>
test: create and use a 'with_connection' function

Signed-off-by: David Scott <dave.scott@citrix.com>
test: check read before write in both directions

Signed-off-by: David Scott <dave.scott@citrix.com>
Merge pull request #41 from djs55/more-tests

Test that resources are cleaned up