[PATCH v6 3/5] tools: testing: separate out wait_for_pid() into helper header