setup.sh: Fix cleanup in matching files
The original mechanism to identify files to cleanup relied on glob matching from the output of 'echo' piped to a grep. This yields a case where some objects can appear and picked up as matching because other items on the same line matched the grep string. Changing this to use 'ls -1' which will restrict the grep string matching to individual lines thereby only picking up the entities the script intended to do. Change-Id: I020c80236fa68bcabeca0299fe7a27f3320de97b Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com> Reviewed-on: https://review.gerrithub.io/437380 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
94cd652b18
commit
fe34909871
@ -259,7 +259,7 @@ function cleanup_linux {
|
||||
done
|
||||
shopt -u extglob nullglob
|
||||
|
||||
files_to_clean+="$(echo /dev/shm/* | egrep '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevtest|bdevperf)_trace|spdk_iscsi_conns' || true) "
|
||||
files_to_clean+="$(ls -1 /dev/shm/* | egrep '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevtest|bdevperf)_trace|spdk_iscsi_conns' || true) "
|
||||
files_to_clean="$(readlink -e assert_not_empty $files_to_clean || true)"
|
||||
if [[ -z "$files_to_clean" ]]; then
|
||||
echo "Clean"
|
||||
|
Loading…
Reference in New Issue
Block a user