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