scripts/setup: Ignore potential readlink failure upon cleanup

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I21ba900f333f0dc3710fcf93fb7fa011301a51bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15152
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
This commit is contained in:
Michal Berger 2022-10-27 00:04:22 +02:00 committed by Tomasz Zawadzki
parent d88f8ed409
commit cb8174dc4a

View File

@ -430,7 +430,9 @@ function cleanup_linux() {
return 0
fi
opened_files+=($(readlink -f /proc/+([0-9])/fd/+([0-9])))
# This may fail in case path that readlink attempts to resolve suddenly
# disappears (as it may happen with terminating processes).
opened_files+=($(readlink -f /proc/+([0-9])/fd/+([0-9]))) || true
if ((${#opened_files[@]} == 0)); then
echo "Can't get list of opened files!"