test_suite: current state

Signed-off-by: Thomas Schoebel-Theuer <schoebel@bell.site>
This commit is contained in:
Frank Liepold 2013-11-20 09:00:57 +01:00 committed by Thomas Schoebel-Theuer
parent 6579393177
commit f3c9d8757f
10 changed files with 72 additions and 29 deletions

View File

@ -1,12 +1,12 @@
#!/bin/bash
src_dir=/home/fl/mars/test_suite-readonly-1
host_list='("ovzd-test-bs1" "ovzd-test-bap1")'
host_list='("istore-test-bs7" "istore-test-bap7")'
checkout_dir=/home/fl/mars/mars-git-hub
branches_to_test="origin/master"
branches_to_test="master"
base_dir=/home/fl/mars/test_suite-readonly-1
install_mars_src_dir=/home/fl/mars/mars-git-hub
make_mars_src_dir=/home/fl/mars/mars-git-hub
mars_kernel_src_dir=/home/fl/mars/linux-infong-3.2-readonly-1
make_mars_kernel_src_dir=/home/fl/mars/linux-infong-3.2-readonly-1
tests_to_skip="build_test_environment/checkout build_test_environment/make build_test_environment/install_mars build_test_environment/lv_config build_test_environment/cluster build_test_environment/resource/create_resource test_cases/admin/apply_fetch/apply test_cases/admin/apply_fetch/fetch test_cases/destroy_secondary_logfile test_cases/admin/resizing test_cases/admin/logrotate test_cases/admin/logdelete test_cases/bugs/memleak test_cases/admin/switch2primary test_cases/admin/datadev_full test_cases/hardcore/mars_dir_full/write_other_file test_cases/hardcore/mars_dir_full/write_data_dev test_cases/stabil/net_failure/connection_cut test_cases/stabil/crash/crash_primary test_cases/stabil/crash/crash_primary_logger_comletion_semantics__aio_sync_mode test_cases/stabil/crash/crash_primary_logger_completion_semantics test_cases/stabil/crash/crash_primary_aio_sync_mode test_cases/bugs/aio_filehandle build_test_environment/resource/leave_resource test_cases/perf"
tests_to_skip="build_test_environment/checkout build_test_environment/make build_test_environment/install_mars build_test_environment/lv_config build_test_environment/cluster build_test_environment/resource/create_resource test_cases/admin/apply_fetch/fetch test_cases/destroy_secondary_logfile test_cases/admin/logrotate test_cases/admin/logdelete test_cases/bugs/memleak test_cases/admin/switch2primary test_cases/perf"
tests_to_skip="build_test_environment/checkout build_test_environment/make build_test_environment/install_mars build_test_environment/lv_config build_test_environment/cluster build_test_environment/resource/create_resource test_cases/admin/apply_fetch/apply test_cases/admin/apply_fetch/fetch test_cases/destroy_secondary_logfile test_cases/admin/logrotate test_cases/admin/logdelete test_cases/bugs/memleak test_cases/admin/switch2primary test_cases/admin/datadev_full test_cases/hardcore/mars_dir_full/write_other_file test_cases/stabil/net_failure/connection_cut test_cases/stabil/crash/crash_primary test_cases/stabil/crash/crash_primary_logger_comletion_semantics__aio_sync_mode test_cases/stabil/crash/crash_primary_logger_completion_semantics test_cases/stabil/crash/crash_primary_aio_sync_mode test_cases/bugs/aio_filehandle build_test_environment/resource/leave_resource test_cases/perf"

View File

@ -0,0 +1,12 @@
#!/bin/bash
src_dir=/home/fl/mars/test_suite
host_list='("istore-test-bs4" "istore-test-bap4")'
checkout_dir=/home/fl/mars/mars-testing
branches_to_test="schoebel/WIP-compress"
base_dir=/home/fl/mars/test_suite
install_mars_src_dir=/home/fl/mars/mars-testing
make_mars_src_dir=/home/fl/mars/mars-testing
mars_kernel_src_dir=/home/fl/mars/linux-infong-3.2
make_mars_kernel_src_dir=/home/fl/mars/linux-infong-3.2

View File

@ -25,7 +25,7 @@ enable_checkout_mars=0
# not used up to now
checkout_mars_git_repository="checkout_mars_git_repository_not_set"
checkout_mars_git_branch=origin/TEST
checkout_mars_git_branch=schoebel/WIP-compress
checkout_mars_git_tag=

View File

@ -39,7 +39,7 @@ file_destroy_time_constant_apply=5
# time for which the length of the given logfile must be constant to declare
# the fetch process as inactive
file_destroy_time_constant_fetch=10
file_destroy_time_constant_fetch=20
# time for which the amount of data to sync must be constant
# to declare the sync process as inactive

View File

@ -5,7 +5,7 @@ main_base_directory=/home/fl/mars/test_suite
## hosts the tests are running on. The first host is initially always used as
## primary host
main_host_list=("istore-test-bs7" "istore-test-bap7")
main_host_list=("istore-test-bs4" "istore-test-bap4")
## file to implement a primitive locking mechanism to avoid concurrent runs
## of the test suite on the same host

View File

@ -1,5 +1,4 @@
#!/bin/bash
#!/bin/bash
# Copyright 2010-2013 Frank Liepold / 1&1 Internet AG
#
# Email: frank.liepold@1und1.de
@ -20,24 +19,43 @@
#####################################################################
WIP WIP WIP do not use!!!
# This script is used to generate a given rate of write operations on a
# given number of mars resources.
# It is assumed that the data devices are named as follows:
# /dev/mars/lv-1-<size> ... /dev/mars/lv-<max-res-nr>-<size>
# where size is the size of the device in GB.
# It is assumed that the data devices are named as follows (the strings
# in <...> denotes shell variables defined below):
# /dev/mars/lv-1-<dev_size_gb> ... /dev/mars/lv-<max_res_nr>-<dev_size_gb>
#
# The given write rate (kb_per_sec) is put into effect as follows:
# - up to seven write processes TODO
# The given write rate kb_per_sec is put into effect as follows:
# 1.) at first kb_per_sec is divided in max_res_nr random defined
# percentage write rates so that the sum of these
# rates amount to kb_per_sec
# 2.) for each of these percentage rates > 0 a write process is started
# which realizes this rate on one resource.
# 3.) after a random defined time between min_runtime_writer and
# max_runtime_writer the processes are killed and we restart at 1.)
# number of resources
max_res_nr=7
# min- and maxtime (seconds) the started write processes may write on the data
# devices before they are killed
max_runtime_writer=60
min_runtime_writer=10
# max value of $RANDOM
max_random=32767
kb_per_sec=$(((4 * 1024 * 1024) / (10 * 60))) # corresponds to 4G / 10min
device_size_g=2
device_size_kb=$(($device_size_g * 1024 * 1024))
# write rate in KB/s
kb_per_sec=70000 # corresponds to 4G / 10min
# size of the data device in GB
dev_size_gb=2
# size of the data device in KB
device_size_kb=$(($dev_size_gb * 1024 * 1024))
# time (seconds) after which log-rotate and log-delete should be called
log_rotate_delete_intervall=600
function calculate_kb_per_sec_per_resource
{
@ -58,7 +76,7 @@ function start_writer_on_resource
{
local res_nr=$1
local kb_per_sec=${kb_per_sec_res[$i]}
local output_dev=/dev/mars/lv-$res_nr-$device_size_g
local output_dev=/dev/mars/lv-$res_nr-$dev_size_gb
local loop_count=0
date && echo "starting writer on $res_nr (kb_per_sec=$kb_per_sec)"
if [ $kb_per_sec -eq 0 ]; then
@ -116,6 +134,8 @@ function kill_process
}
sum_sleeptime=0
while true; do
calculate_kb_per_sec_per_resource
runtime_writer=$(( ($RANDOM * ($max_runtime_writer - $min_runtime_writer) / $max_random ) + $min_runtime_writer))
@ -129,8 +149,14 @@ while true; do
done
date && echo sleeping $runtime_writer
sleep $runtime_writer
let sum_sleeptime+=$runtime_writer
for i in $(seq 1 1 $max_res_nr); do
kill_process ${pid[$i]} $i
done
if [ $sum_sleeptime -ge $log_rotate_delete_intervall ]; then
marsadm log-rotate all
marsadm log-delete all
sum_sleeptime=0
fi
done

View File

@ -44,7 +44,9 @@ function lib_check_for_kernel_oops_after_start_time
{
local host last_stack_line kern_log=/var/log/kern.log
if [ -z "$main_start_time" ];then
lib_exit 1 " variable main_start_time not set"
echo " variable main_start_time not set" >&2
echo " cannot look for recent kernel oops" >&2
return
fi
for host in "${main_host_list[@]}"; do
last_stack_line="$(lib_remote_idfile $host "grep -w Stack $kern_log | tail -1")"

View File

@ -170,7 +170,7 @@ function lv_config_recreate_logical_volumes
if [ ${lv_config_vg_recreatable_list[$host]} -eq 0 ]; then
lib_vmsg " skipping recreation of vg $lv_config_lvg_name on $host"
else
lv_config_create_vg
lv_config_create_vg $host
fi
fi
for lv_name in "${lv_config_lv_name_list[@]}"; do

View File

@ -366,14 +366,16 @@ function resource_mount_mars_and_rm_resource_dir_all
cluster_rmmod_mars_all
for host in "${main_host_list[@]}"; do
local mars_lv=${cluster_mars_dir_lv_name_list[$host]}
local mars_dev=$(lv_config_get_lv_device $mars_lv)
lib_vmsg " check whether mars device $host:$mars_dev exists"
if lib_remote_idfile $host "ls -l $mars_dev"; then
cluster_mount_mars_dir $host
lib_vmsg " removing $host:$res_dir"
local mars_lv=${cluster_mars_dir_lv_name_list[$host]}
local mars_dev=$(lv_config_get_lv_device $mars_lv)
lib_vmsg " removing $host:$res_dir whether mounted or not"
lib_remote_idfile $host "rm -rf $res_dir" || lib_exit 1
fi
lib_vmsg " check whether mars device $host:$mars_dev exists"
if lib_remote_idfile $host "ls -l $mars_dev"; then
cluster_mount_mars_dir $host
lib_vmsg " removing $host:$res_dir"
lib_remote_idfile $host "rm -rf $res_dir" || lib_exit 1
fi
done
}

View File

@ -19,7 +19,7 @@
#####################################################################
main_host_list=("ovzd-test-bs1" "ovzd-test-bap1")
main_host_list=("istore-test-bs7" "istore-test-bap7")
main_set_globals_depending_on_main_host_list
multires_lv_size=2
@ -45,4 +45,5 @@ verbose_script=1
resource_fs_on_data_device_necessary=0
run_list="resource_prepare resource_run_all"
run_list="lv_config_prepare lv_config_run resource_prepare resource_run_all"
run_list="lv_config_run resource_prepare resource_run_all"