UT: Fix valgrind failure in SPDK UT on arm64 system

When ran SPDK UT on arm64 system, observerd the valgrind fault:

ARM64 front end: branch_etc
disInstr(arm64): unhandled instruction 0xD5380000
disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0000
==959274== valgrind: Unrecognised instruction at address 0x4014c90.

It is because that arm64 is not supported completly in the latest
valgrind release v3.13.0.

With the patch, SPDK UT can run successfully on arm64 system.

Change-Id: I5b77692f6b148b171fb07dcc1516d194d7ab58b9
Signed-off-by: tone.zhang <tone.zhang@arm.com>
Reviewed-on: https://review.gerrithub.io/c/444984
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
tone.zhang 2019-02-16 23:51:45 +08:00 committed by Ben Walker
parent 7739a1f338
commit fda97cff8a

View File

@ -46,6 +46,12 @@ if [ "$cov_avail" = "yes" ]; then
# zero out coverage data
$LCOV -q -c -i -d . -t "Baseline" -o $UT_COVERAGE/ut_cov_base.info
fi
# workaround for valgrind v3.13 on arm64
if [ $(uname -m) = "aarch64" ]; then
export LD_HWCAP_MASK=1
fi
$valgrind $testdir/include/spdk/histogram_data.h/histogram_ut
$valgrind $testdir/lib/bdev/bdev.c/bdev_ut