[PATCH v2 1/2] tests: move common definitions and functions into pidfd.h