blob: 1d0e3073a057a0d2d158731439dc52cb172965ce [file]
#!/bin/sh
# - iterations
cd $BENCHMARK_ROOT/stutter || exit
. $LKP_SRC/lib/unit.sh
. $LKP_SRC/lib/reproduce-log.sh
set_memtotal_bytes()
{
local default_memory_bytes=$(to_byte "8G")
local memory_bytes=$(to_byte $memory)
# limit the memory to speed up the test
if [ $memory_bytes -gt $default_memory_bytes ]; then
memory_bytes=$default_memory_bytes
fi
log_eval export MEMTOTAL_BYTES=$memory_bytes
}
set_memtotal_bytes
log_eval export ITERATIONS=$iterations
log_eval export LOGDIR_RESULTS=$RESULT_ROOT/log_result
log_cmd mkdir -p $LOGDIR_RESULTS
[ -z "$mount_points" ] && exit
log_eval export TESTDISK_DIR="${mount_points%% *}"
log_cmd ./run.sh
ret=$?
# This case reuqires disk_size > (system memory * 2 * 2), but it seems lkp has
# not an existed filter to handle it, so here is to check whether there is a
# 'No space left on device' error
grep 'No space left on device' $LOGDIR_RESULTS/*.log && ret=1
if [ $ret -ne 0 ]; then
echo "stutter: fail"
else
echo "stutter: pass"
fi
exit $ret