Avoid potential deadlocks when expected output changes

Update for the recent change which now prints some information
about logging and avoid deadlocks possible when the output changes.
Instead of .read()ing, we now just use the info so far for most of
the assertion messages other than the .poll() check, where we know
that the None response means the process has died anyway, so we can
safely read to the end without waiting forever.