[PATCH 6.1 148/798] selftests/bpf: Refactor out some functions in ns_current_pid_tgid test