From 9f9f120cac9d9df2305b1eb45e34ef319b7c33d1 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Thu, 5 Dec 2019 12:53:59 -0700 Subject: [PATCH] test/iscsi: use run_test semantics in filesystem test. Change-Id: Ie58dfb5e6147437d325439fca9bbcaebbb4ccebb Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476946 Tested-by: SPDK CI Jenkins Community-CI: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker Reviewed-by: Karol Latecki --- test/iscsi_tgt/filesystem/filesystem.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/iscsi_tgt/filesystem/filesystem.sh b/test/iscsi_tgt/filesystem/filesystem.sh index b0e9029f9d..78aa79f747 100755 --- a/test/iscsi_tgt/filesystem/filesystem.sh +++ b/test/iscsi_tgt/filesystem/filesystem.sh @@ -75,7 +75,8 @@ parted -s /dev/$dev mklabel msdos parted -s /dev/$dev mkpart primary '0%' '100%' sleep 1 -for fstype in "ext4" "btrfs" "xfs"; do +function filesystem_test { + fstype=$1 if [ "$fstype" == "ext4" ]; then mkfs.${fstype} -F /dev/${dev}1 @@ -132,7 +133,11 @@ for fstype in "ext4" "btrfs" "xfs"; do rm -rf /mnt/device/aaa umount /mnt/device fi -done +} + +run_test "iscsi_tgt_filesystem_ext4" filesystem_test "ext4" +run_test "iscsi_tgt_filesystem_btrfs" filesystem_test "btrfs" +run_test "iscsi_tgt_filesystem_xfs" filesystem_test "xfs" rm -rf /mnt/device