extract_child_pid is specific to bubblewrap and wouldn't be useful to
share with the canonical copy of libtest-core in libostree.
Signed-off-by: Simon McVittie <smcv@collabora.com>
`grep` supports checking multiple fixed strings separated by newlines,
but it's mostly just easier to pass them as separate arguments, so let's
support that. This is now at parity with the similar
`assert_file_has_content`.
Originally several libostree commits by Philip Withnall, Jan Tojnar,
Alex Kiernan and Dan Nicholson:
* e48a1bcf "tests: Fix LC_ALL for systems which use .utf8 suffixes"
* f200efdb "tests: Fix locale detection"
* 4d17cd91 "tests/core: Fallback to en_US.UTF-8 locale"
* 3d48021f "tests/core: Assume C.UTF-8 if locale isn't found"
* 5135a1e5 "tests/core: Really pick C.UTF-8 locale"
If we fail as a result of `set -x`, It's often not completely obvious
which command failed or how. Use a trap on ERR to show the command that
failed, and its exit status.
Signed-off-by: Simon McVittie <smcv@collabora.com>