Skip to contentSkip to conversation

selftests: pidfd: declare pidfd_poll_test TAP plan

PATCH New Ezra George 1 participant 1 message Nov 23

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: pidfd: declare pidfd_poll_test TAP plan

pidfd_poll_test.c uses the low-level kselftest.h helpers, but does not call ksft_print_header() or ksft_set_plan(1) before reporting its result.

This produces incomplete TAP output and a plan mismatch:

# Planned tests != run tests (0 != 1)

Add the TAP header and declare the single expected result.

Tested: tools/testing/selftests/pidfd/pidfd_poll_test 1

---
 tools/testing/selftests/pidfd/pidfd_poll_test.c | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/selftests/pidfd/pidfd_poll_test.c +3 -0
index 232304f818c7..416a136bb6eb 100644
@@ -31,6 +31,9 @@ int main(int argc, char **argv)
 
 	fds.events = POLLIN;
 
+	ksft_print_header();
+	ksft_set_plan(1);
+
 	if (argc > 2)
 		ksft_exit_fail_msg("Unexpected command line argument\n");
 
Signature · 1 line
2.43.0