test/fuzz: remove shm file during cleanup.

In the event that our fuzz test passes, we should manually remove the
trace files from the /dev/shm directory. This will prevent us from
failing to allocate /dev/shm files when a machine consistently passes
the tests and doesn't reboot.

Change-Id: I2ccde6aba7d61fda3a28ed24e009c6f8f81c20b4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465996
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Seth Howell 2019-08-21 16:02:26 -07:00 committed by Jim Harris
parent e2ce08cf68
commit 3dad8b1568
2 changed files with 3 additions and 1 deletions

View File

@ -307,7 +307,8 @@ function cleanup_linux {
done
shopt -u extglob nullglob
files_to_clean+="$(ls -1 /dev/shm/* | grep -E '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevio|bdevperf)_trace|spdk_iscsi_conns' || true) "
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="$(readlink -e assert_not_empty $files_to_clean || true)"
if [[ -z "$files_to_clean" ]]; then
echo "Clean"

View File

@ -67,4 +67,5 @@ trap - SIGINT SIGTERM exit
killprocess $vhostpid
killprocess $fuzzpid
timing_exit fuzz_test