btrfs/081: wait for reader process to exit before cycle mounting

We send a kill signal to the reader process, check the md5sum of the
files and then cycle mount the scratch device. Most of the time the
reader process has already terminated before we attempt the cycle mount,
but sometimes it may still be alive in which case the cat command
executed by the reader process may fail because the scratch fs was
unmounted and the target file doesn't exist. This makes the cat command
print an error message and the test fail like this:

     Verifying file digests after cloning
     14968c092c68e32fa35e776392d14523  SCRATCH_MNT/foo
     14968c092c68e32fa35e776392d14523  SCRATCH_MNT/bar
    +cat: /opt/scratch/bar: No such file or directory
    +cat: /opt/scratch/bar: No such file or directory
    +cat: /opt/scratch/bar: No such file or directory
    +cat: /opt/scratch/bar: No such file or directory
    ...
    (Run diff -u /opt/xfstests/tests/btrfs/081.out

Fix this by making the test wait for the reader to terminate after
sending it the kill signal.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
1 file changed