Basic WLTH-ioclass tests added

Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
Michal Rakowski
2019-05-07 12:38:02 +02:00
parent 7649ede1a3
commit 347644ad59
6 changed files with 390 additions and 1 deletions

View File

@@ -879,6 +879,49 @@ stats() {
clear_options
}
check_fio_ver() {
check_options ${FUNCNAME[0]}
fio_ver="$(fio -v)"
if [ -z $fio_ver ] ; then
echo_yellow "Fio is not installed, skipping test!"
return 1
fi
major=`echo $fio_ver | cut -d '.' -f 1 | cut -d '-' -f 2`
minor=`echo $fio_ver | cut -d '.' -f 2`
if [[ $major -lt $FIO_MAJOR_OPTION ]] ; then
echo_yellow "Invalid fio version, skipping test!"
return 1
elif [[ $major -eq $FIO_MAJOR_OPTION ]] && \
[[ $minor -lt $FIO_MINOR_OPTION ]] ; then
echo_yellow "Invalid fio minor revision, skipping test!"
return 1
fi
clear_options
return 0
}
check_kernel_ver() {
check_options ${FUNCNAME[0]}
kernel_ver="$(uname -r)"
kernel_version=`echo ${kernel_ver} | cut -d '.' -f 1`
major=`echo ${kernel_ver} | cut -d '.' -f 2`
if [[ $kernel_version -lt $KERNEL_VER_OPTION ]] ; then
echo_yellow "Invalid kernel version, skipping test!"
return 1
elif [[ $kernel_version -eq $KERNEL_VER_OPTION ]] && \
[[ $major -lt $KERNEL_MAJOR_OPTION ]] ; then
echo_yellow "Invalid kernel major revision, skipping test!"
return 1
fi
clear_options
return 0
}
export -f mount_cache
export -f remove_partitions
export -f make_primary_partitions
@@ -893,6 +936,8 @@ export -f io_class_load
export -f stats
export -f io_class_stats
export -f check_is_nvme_atomic
export -f check_fio_ver
export -f check_kernel_ver
export CAS_FUNCTIONS_LOADED="1"