[PATCH v2 4/8] selftests: Add header documentation and helpers