test/blobfs: fix a bug that $SPDK_TEST_STORAGE is NULL
Move "source $rootdir/test/common/autotest_common.sh" above where $SPDK_TEST_STORAGE is used, or else $SPDK_TEST_STORAGE is NULL for its value is assigned in autotest_common.sh. Signed-off-by: Richael Zhuang <richael.zhuang@arm.com> Change-Id: Ie86af6034847ca2c046b18cd67cd8ad5707697a8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2694 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
4e6f8167ea
commit
e1fc678b65
@ -8,6 +8,8 @@ fi
|
|||||||
|
|
||||||
testdir=$(readlink -f $(dirname $0))
|
testdir=$(readlink -f $(dirname $0))
|
||||||
rootdir=$(readlink -f $testdir/../..)
|
rootdir=$(readlink -f $testdir/../..)
|
||||||
|
source $rootdir/test/common/autotest_common.sh
|
||||||
|
|
||||||
rpc_server=/var/tmp/spdk-blobfs.sock
|
rpc_server=/var/tmp/spdk-blobfs.sock
|
||||||
rpc_py="$rootdir/scripts/rpc.py -s $rpc_server"
|
rpc_py="$rootdir/scripts/rpc.py -s $rpc_server"
|
||||||
tmp_file=$SPDK_TEST_STORAGE/blobfs_file
|
tmp_file=$SPDK_TEST_STORAGE/blobfs_file
|
||||||
@ -16,8 +18,6 @@ bdevname=BlobfsBdev
|
|||||||
mount_dir=/tmp/spdk_tmp_mount
|
mount_dir=/tmp/spdk_tmp_mount
|
||||||
test_cache_size=512
|
test_cache_size=512
|
||||||
|
|
||||||
source $rootdir/test/common/autotest_common.sh
|
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
if [[ -n $blobfs_pid && -e /proc/$blobfs_pid ]]; then
|
if [[ -n $blobfs_pid && -e /proc/$blobfs_pid ]]; then
|
||||||
killprocess $blobfs_pid
|
killprocess $blobfs_pid
|
||||||
|
Loading…
Reference in New Issue
Block a user