Commit cb8174dc authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

scripts/setup: Ignore potential readlink failure upon cleanup



Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Change-Id: I21ba900f333f0dc3710fcf93fb7fa011301a51bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15152


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
parent d88f8ed4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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!"