test/asan: supress memory leaks in external libiscsi

There are some leaks in libiscsi that is external to SPDK.
With this patch, any leaks in libiscsi will be suppressed.

Please see examples of the leaks right now when running
bdevperf in initiator.sh test:

Direct leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x7fd64dddfe50 in calloc (/lib64/libasan.so.5+0xeee50)
    #1 0x7fd64c60edb4 in scsi_cdb_inquiry (/usr/lib64/iscsi/libiscsi.so.8+0x13db4)

Indirect leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x7fd64dddfe50 in calloc (/lib64/libasan.so.5+0xeee50)
    #1 0x7fd64c603a84  (/usr/lib64/iscsi/libiscsi.so.8+0x8a84)

Indirect leak of 52 byte(s) in 1 object(s) allocated from:
    #0 0x7fd64dddfe50 in calloc (/lib64/libasan.so.5+0xeee50)
    #1 0x7fd64c60d755 in scsi_malloc (/usr/lib64/iscsi/libiscsi.so.8+0x12755)
    #2 0x7fd64c6097f8  (/usr/lib64/iscsi/libiscsi.so.8+0xe7f8)

Change-Id: I80ef23b1464841f683344c7aab99f1658a46cd36
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456766
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Tomasz Zawadzki 2019-06-04 03:29:59 -04:00 committed by Darek Stojaczyk
parent 1bed9c1f1a
commit 1891f2e5c5

View File

@ -86,6 +86,9 @@ echo "leak:/usr/src/fio/parse.c" >> "$asan_suppression_file"
echo "leak:/usr/src/fio/iolog.c" >> "$asan_suppression_file"
echo "leak:/usr/src/fio/init.c" >> "$asan_suppression_file"
# Suppress leaks in libiscsi
echo "leak:libiscsi.so" >> "$asan_suppression_file"
export LSAN_OPTIONS=suppressions="$asan_suppression_file"
export DEFAULT_RPC_ADDR="/var/tmp/spdk.sock"