]> git.ipfire.org Git - thirdparty/elfutils.git/commit
tests: Don't fail run-debuginfod-fd-prefetch-caches.sh if grep -c fails
authorMark Wielaard <mark@klomp.org>
Thu, 9 Sep 2021 19:51:51 +0000 (21:51 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 9 Sep 2021 20:53:05 +0000 (22:53 +0200)
commitbbf0dc0162e82770f296b2ecda77a2b5bd6f7405
treea906b556d2b96df60b448c129521f1a240116a68
parentb561b51a472779a083f4b109b9821bc7963a6ff4
tests: Don't fail run-debuginfod-fd-prefetch-caches.sh if grep -c fails

The set -o errtrace made run-debuginfod-fd-prefetch-caches.sh
fail. On some systems. Add set -o functrace to make it fail consistently.

The failure is because the grep -c for in the log file fails (it
returns zero). Fix this by using || true. But this is only a
workaround. It makes the test pass, but only because all values are
always zero. The test doesn't currently test anything.

Also make sure that err and cleanup are only executed once.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tests/ChangeLog
tests/debuginfod-subr.sh
tests/run-debuginfod-fd-prefetch-caches.sh