scripts/setup: Try to cleanup any lingering spdk_pci_lock files

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I853e278756e53e40d7faf5eb8392057653ca649f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9065
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2021-08-04 10:21:09 +02:00 committed by Jim Harris
parent 8bb27faff6
commit 637d9e6069

View File

@ -360,14 +360,16 @@ function cleanup_linux() {
dirs_to_clean+="$(readlink -e assert_not_empty $XDG_RUNTIME_DIR/dpdk/spdk{,_pid}+([0-9]) || true) "
fi
files_to_clean=""
files_to_clean="" file_locks=()
for dir in $dirs_to_clean; do
files_to_clean+="$(echo $dir/*) "
done
file_locks+=(/var/tmp/spdk_pci_lock*)
shopt -u extglob nullglob
files_to_clean+="$(ls -1 /dev/shm/* \
| grep -E '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevio|bdevperf|vhost_fuzz|nvme_fuzz)_trace|spdk_iscsi_conns' || true) "
files_to_clean+=" ${file_locks[*]}"
files_to_clean="$(readlink -e assert_not_empty $files_to_clean || true)"
if [[ -z "$files_to_clean" ]]; then
echo "Clean"