Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> writes: > Add a few tests to capture source object relationship with dynptr and > their slices and ensure invalidation of everything works correctly. > > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> > --- It would be great to have a bit more test cases here, following your nice diagram from patch #1: +-- orig dptr (ref=1) --> slice 1 (ref=1) source (ref=1) --|-- clone dptr (ref=1) --> slice 2 (ref=1) +-- clone dptr (ref=1) --> slice 3 (ref=1) In one test (probably extending the one in this patch): - check that both orig and clone slices can be read at some point - destroy orig or clone and check that one of the slices can be read, while another can't. In another test: - destroy source and check that both orig and clone slices are no longer accessible. Also, is it possible to conjure a test case with two hierarchies? E.g. source1(ref=1) and source2(ref=2)? [...]