test_update.sh: Avoid using grep -q together with -o pipefail

Piping something into 'grep -q' when the shell option '-o pipefail' is
set is racy: 'grep -q' exits immediately after seeing the first
occurence of the pattern, so if the process at the front of the pipe
hasn't written all its data into the pipe buffer yet, it will still try
to write more after grep has already exited and die with a SIGPIPE.

The recommended solution seems to be using a <<<"herestring" instead.
(Also add the test's return code to the FAILED output in
run_test_scripts.sh to aid future test script debugging.)

BRANCH=None
BUG=chromium:1048048
TEST=make runtests

Change-Id: I2f2589f223d9179d694565f5733535d4270699ea
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2039946
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2 files changed