reflink: add test support routines to a separate file