From e4f8ec053c3b9cb12bb3982fce86fc379e3edd82 Mon Sep 17 00:00:00 2001 From: wanghailiangx Date: Wed, 9 Dec 2020 13:10:29 -0500 Subject: [PATCH] test/blobstore: clean aio.bdev and json if there is an unexpected exit in running If there is an unexpected exit in running blob_io_wait.sh, error log will show as below: bdev.c:5502:bdev_open: *ERROR*: Could not open aio0 - lvol module already claimed it vbdev_lvol.c: 265:vbdev_lvs_create: *ERROR*: Cannot create blobstore device Fixes #1718. Change-Id: I28e2664689e41d088a00ea6a0631a2537323054f Signed-off-by: wanghailiangx Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5503 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Reviewed-by: Tomasz Zawadzki Reviewed-by: Changpeng Liu --- test/blobstore/blob_io_wait/blob_io_wait.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/blobstore/blob_io_wait/blob_io_wait.sh b/test/blobstore/blob_io_wait/blob_io_wait.sh index 2e94f6392..899f79879 100755 --- a/test/blobstore/blob_io_wait/blob_io_wait.sh +++ b/test/blobstore/blob_io_wait/blob_io_wait.sh @@ -16,7 +16,7 @@ truncate -s 64M $testdir/aio.bdev $rootdir/test/app/bdev_svc/bdev_svc --wait-for-rpc & bdev_svc_pid=$! -trap 'killprocess $bdev_svc_pid; exit 1' SIGINT SIGTERM EXIT +trap 'rm -f $testdir/bdevperf.json; rm -f $testdir/aio.bdev; killprocess $bdev_svc_pid; exit 1' SIGINT SIGTERM EXIT waitforlisten $bdev_svc_pid # Minimal number of bdev io pool (128) and cache (1)