diff --git a/test/iscsi_tgt/digests/digests.sh b/test/iscsi_tgt/digests/digests.sh index db3a798d91..55e82411ba 100755 --- a/test/iscsi_tgt/digests/digests.sh +++ b/test/iscsi_tgt/digests/digests.sh @@ -7,6 +7,10 @@ source $rootdir/test/iscsi_tgt/common.sh function node_login_fio_logout() { + for arg in "$@" + do + iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.$arg + done iscsiadm -m node --login -p $TARGET_IP:$PORT sleep 1 $fio_py 512 1 write 2 @@ -19,15 +23,13 @@ function iscsi_header_digest_test() { # Enable HeaderDigest to CRC32C timing_enter HeaderDigest_enabled - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.HeaderDigest -v CRC32C - node_login_fio_logout + node_login_fio_logout "HeaderDigest -v CRC32C" timing_exit HeaderDigest_enabled # Let iscsi target to decide its preference on # HeaderDigest based on its capability. timing_enter preferred - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.HeaderDigest -v CRC32C,None - node_login_fio_logout + node_login_fio_logout "HeaderDigest -v CRC32C,None" timing_exit preferred } @@ -35,31 +37,23 @@ function iscsi_header_data_digest_test() { # Only enable HeaderDigest to CRC32C timing_enter HeaderDigest_enabled - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.HeaderDigest -v CRC32C - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.DataDigest -v None - node_login_fio_logout + node_login_fio_logout "HeaderDigest -v CRC32C" "DataDigest -v None" timing_exit HeaderDigest_enabled # Only enable DataDigest to CRC32C timing_enter DataDigest_enabled - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.HeaderDigest -v None - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.DataDigest -v CRC32C - node_login_fio_logout + node_login_fio_logout "HeaderDigest -v None" "DataDigest -v CRC32C" timing_exit DataDigest_enabled # Let iscsi target to decide its preference on both # HeaderDigest and DataDigest based on its capability. timing_enter both_preferred - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.HeaderDigest -v CRC32C,None - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.DataDigest -v CRC32C,None - node_login_fio_logout + node_login_fio_logout "HeaderDigest -v CRC32C,None" "DataDigest -v CRC32C,None" timing_exit both_preferred # Enable HeaderDigest and DataDigest both. timing_enter both_enabled - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.HeaderDigest -v CRC32C - iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.DataDigest -v CRC32C - node_login_fio_logout + node_login_fio_logout "HeaderDigest -v CRC32C" "DataDigest -v CRC32C" timing_exit both_enabled }