Commit 14dd46cb authored by xuhuagen's avatar xuhuagen Committed by Jim Harris
Browse files

autotest: update iscsi filesystem test (porting from nightly to autotest)



Add iscsi filesystem test cases(run fio) with
lvol and nvme backend in nightly.

Change-Id: I822e5c570fb9ef96ce63bf1c853c537b35c8b1d7
Signed-off-by: default avatarxuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/405513


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent e1060940
Loading
Loading
Loading
Loading
+41 −18
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ source $rootdir/scripts/common.sh

timing_enter filesystem


rpc_py="python $rootdir/scripts/rpc.py"
# Remove lvol bdevs and stores.
function remove_backends()
@@ -77,6 +76,29 @@ for fstype in "ext4" "btrfs" "xfs"; do
		mkfs.${fstype} -f /dev/${dev}1
	fi
	mount /dev/${dev}1 /mnt/device
	if [ $RUN_NIGHTLY -eq 1 ]; then
		fio -filename=/mnt/device/test -direct=1 -iodepth 64 -thread=1 -invalidate=1 -rw=randwrite -ioengine=libaio -bs=4k \
		 -size=1024M -name=job0
		umount /mnt/device

		iscsiadm -m node --logout
		sleep 1
		iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
		sleep 1
		dev=$(iscsiadm -m session -P 3 | grep "Attached scsi disk" | awk '{print $4}')
		mount -o rw /dev/${dev}1 /mnt/device
		if [ -f "/mnt/device/test" ]; then
			echo "File existed."
			fio -filename=/mnt/device/test -direct=1 -iodepth 64 -thread=1 -invalidate=1 -rw=randread \
			-ioengine=libaio -bs=4k -runtime=20 -time_based=1 -name=job0
		else
			echo "File doesn't exist."
			exit 1
		fi

		rm -rf /mnt/device/test
		umount /mnt/device
	else
		touch /mnt/device/aaa
		umount /mnt/device

@@ -96,6 +118,7 @@ for fstype in "ext4" "btrfs" "xfs"; do

		rm -rf /mnt/device/aaa
		umount /mnt/device
	fi
done

rm -rf /mnt/device