diff options
author | Karol Lewandowski <k.lewandowsk@samsung.com> | 2019-02-21 16:34:57 +0100 |
---|---|---|
committer | Karol Lewandowski <k.lewandowsk@samsung.com> | 2019-02-26 13:39:46 +0000 |
commit | 8663d442a71f8f9f87283986fce97e4a9e9b2eb4 (patch) | |
tree | d03666c779544737528ff25deebc9c0328971a38 | |
parent | 5cd071d122d6fd4713a0fce51116d62639b00940 (diff) | |
download | crash-worker-8663d442a71f8f9f87283986fce97e4a9e9b2eb4.tar.gz crash-worker-8663d442a71f8f9f87283986fce97e4a9e9b2eb4.tar.bz2 crash-worker-8663d442a71f8f9f87283986fce97e4a9e9b2eb4.zip |
system tests: rationalize naming
Change-Id: I21d22e7cba27ce4ede716573056946bf3cd3ddd6
-rwxr-xr-x | tests/system/critical_process/critical_process.sh.template | 4 | ||||
-rw-r--r-- | tests/system/info_file/info_file.sh.template | 20 | ||||
-rw-r--r-- | tests/system/log_file/log_file.sh.template | 12 | ||||
-rw-r--r-- | tests/system/report_type_info/report_type_info.sh.template | 4 | ||||
-rw-r--r-- | tests/system/so_info_file/so_info_file.sh.template | 12 | ||||
-rw-r--r-- | tests/system/utils/minicore-utils.sh | 12 | ||||
-rwxr-xr-x | tests/system/wait_for_opt_usr/wait_for_opt_usr.sh.template | 4 | ||||
-rw-r--r-- | tests/system/without_core/without_core.sh.template | 6 |
8 files changed, 37 insertions, 37 deletions
diff --git a/tests/system/critical_process/critical_process.sh.template b/tests/system/critical_process/critical_process.sh.template index 4c8ce35..e3c38e1 100755 --- a/tests/system/critical_process/critical_process.sh.template +++ b/tests/system/critical_process/critical_process.sh.template @@ -13,7 +13,7 @@ fi . ${CRASH_WORKER_SYSTEM_TESTS}/utils/minicore-utils.sh -clean_crash_root +clean_crash_dump SUICIDE_SERVICE_PATH='/usr/lib/systemd/user/suicide.service' SES_ID=`su - owner -c "loginctl list-sessions | head -n2 | tail -n1 | tr -s ' ' | cut -d' ' -f2"` @@ -60,7 +60,7 @@ restore_core_pattern TIMEOUT=240 while true; do - if [[ `ls ${CRASH_ROOT_PATH}` =~ sh.*.zip ]]; then + if [[ `ls ${CRASH_DUMP_PATH}` =~ sh.*.zip ]]; then tlm-client -s --username owner --password tizen --seat seat0 1> /dev/null 2>&1 sleep 4 gum-utils -d --username test1 1> /dev/null 2>&1 diff --git a/tests/system/info_file/info_file.sh.template b/tests/system/info_file/info_file.sh.template index b98b6a9..129799a 100644 --- a/tests/system/info_file/info_file.sh.template +++ b/tests/system/info_file/info_file.sh.template @@ -8,7 +8,7 @@ fi . ${CRASH_WORKER_SYSTEM_TESTS}/utils/minicore-utils.sh -clean_crash_root +clean_crash_dump { ${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny & @@ -20,35 +20,35 @@ sleep 2 wait_for_app crash-manager -REPORT_ZIP=$(ls ${CRASH_ROOT_PATH}) +REPORT_ZIP=$(ls ${CRASH_DUMP_PATH}) REPORT_DIR=$(basename ${REPORT_ZIP} .zip) -if [ ! -f ${CRASH_ROOT_PATH}/${REPORT_ZIP} ]; then - exit_with_code "FAIL: no report in ${CRASH_ROOT_PATH}" 1 +if [ ! -f ${CRASH_DUMP_PATH}/${REPORT_ZIP} ]; then + exit_with_code "FAIL: no report in ${CRASH_DUMP_PATH}" 1 fi -pushd ${CRASH_ROOT_PATH} +pushd ${CRASH_DUMP_PATH} if ! unzip ${REPORT_ZIP} > /dev/nulll; then popd exit_with_code "FAIL: report ${REPORT_ZIP} does not exist" fi popd -RESULT=$(cat ${CRASH_ROOT_PATH}/${REPORT_DIR}/${REPORT_DIR}.info) +RESULT=$(cat ${CRASH_DUMP_PATH}/${REPORT_DIR}/${REPORT_DIR}.info) check "Executable File Path: ${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny" -RESULT=$(cat ${CRASH_ROOT_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Register Information/,/Memory information/p') +RESULT=$(cat ${CRASH_DUMP_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Register Information/,/Memory information/p') check "[a-z0-9]+[ \t]+= 0x[a-f0-9]+" -RESULT=$(cat ${CRASH_ROOT_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Memory information/,/Threads Information/p') +RESULT=$(cat ${CRASH_DUMP_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Memory information/,/Threads Information/p') check "MemTotal:" check "VmExe:" check "VmSwap:" -RESULT=$(cat ${CRASH_ROOT_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Maps Information/,/End of Maps Information/p') +RESULT=$(cat ${CRASH_DUMP_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Maps Information/,/End of Maps Information/p') check "${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny" check '[heap]' @@ -60,7 +60,7 @@ check '/usr/lib/libpthread-.*.so' check '/usr/lib/ld-.*.so' check '[stack]' -RESULT=$(cat ${CRASH_ROOT_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Callstack Information/,/End of Call Stack/p') +RESULT=$(cat ${CRASH_DUMP_PATH}/${REPORT_DIR}/${REPORT_DIR}.info | sed -n '/Callstack Information/,/End of Call Stack/p') check ': .*nanosleep' check ': .*sleep.*' diff --git a/tests/system/log_file/log_file.sh.template b/tests/system/log_file/log_file.sh.template index f032f15..3a0c385 100644 --- a/tests/system/log_file/log_file.sh.template +++ b/tests/system/log_file/log_file.sh.template @@ -22,7 +22,7 @@ function check_section { . ${CRASH_WORKER_SYSTEM_TESTS}/utils/minicore-utils.sh -clean_crash_root +clean_crash_dump { ${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny & @@ -34,21 +34,21 @@ sleep 2 wait_for_app crash-manager -REPORT_ZIP=$(ls ${CRASH_ROOT_PATH}) +REPORT_ZIP=$(ls ${CRASH_DUMP_PATH}) REPORT_DIR=$(basename ${REPORT_ZIP} .zip) -if [ ! -f ${CRASH_ROOT_PATH}/${REPORT_ZIP} ]; then - exit_with_code "FAIL: no report in ${CRASH_ROOT_PATH}" 1 +if [ ! -f ${CRASH_DUMP_PATH}/${REPORT_ZIP} ]; then + exit_with_code "FAIL: no report in ${CRASH_DUMP_PATH}" 1 fi -pushd ${CRASH_ROOT_PATH} +pushd ${CRASH_DUMP_PATH} if ! unzip ${REPORT_ZIP} > /dev/nulll; then popd exit_with_code "FAIL: report ${REPORT_ZIP} does not exist" fi popd -RESULT=$(cat ${CRASH_ROOT_PATH}/${REPORT_DIR}/${REPORT_DIR}.log) +RESULT=$(cat ${CRASH_DUMP_PATH}/${REPORT_DIR}/${REPORT_DIR}.log) check_section "==== Binary version" 7 check_section "==== Tizen version" 4 diff --git a/tests/system/report_type_info/report_type_info.sh.template b/tests/system/report_type_info/report_type_info.sh.template index a9021b1..eaaf748 100644 --- a/tests/system/report_type_info/report_type_info.sh.template +++ b/tests/system/report_type_info/report_type_info.sh.template @@ -10,7 +10,7 @@ fi CRASH_MANAGER_CONF=/etc/crash-manager.conf -clean_crash_root +clean_crash_dump mount -o rw,remount / backup_file ${CRASH_MANAGER_CONF} @@ -28,7 +28,7 @@ restore_file ${CRASH_MANAGER_CONF} wait_for_app crash-manager -if ! compgen -G ${CRASH_ROOT_PATH}/kenny*info > /dev/null; then +if ! compgen -G ${CRASH_DUMP_PATH}/kenny*info > /dev/null; then exit_with_code "FAIL: info file not found" 1 fi diff --git a/tests/system/so_info_file/so_info_file.sh.template b/tests/system/so_info_file/so_info_file.sh.template index d736198..fe5c8c0 100644 --- a/tests/system/so_info_file/so_info_file.sh.template +++ b/tests/system/so_info_file/so_info_file.sh.template @@ -8,7 +8,7 @@ fi . ${CRASH_WORKER_SYSTEM_TESTS}/utils/minicore-utils.sh -clean_crash_root +clean_crash_dump { ${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny & @@ -20,20 +20,20 @@ sleep 2 wait_for_app crash-manager -REPORT_ZIP=$(ls ${CRASH_ROOT_PATH}) +REPORT_ZIP=$(ls ${CRASH_DUMP_PATH}) REPORT_DIR=$(basename ${REPORT_ZIP} .zip) -if [ ! -f ${CRASH_ROOT_PATH}/${REPORT_ZIP} ]; then - exit_with_code "FAIL: no report in ${CRASH_ROOT_PATH}" 1 +if [ ! -f ${CRASH_DUMP_PATH}/${REPORT_ZIP} ]; then + exit_with_code "FAIL: no report in ${CRASH_DUMP_PATH}" 1 fi -pushd ${CRASH_ROOT_PATH} +pushd ${CRASH_DUMP_PATH} if ! unzip ${REPORT_ZIP} > /dev/nulll; then exit_with_code "FAIL: report ${REPORT_ZIP} does not exist" fi popd -RESULT=$(cat ${CRASH_ROOT_PATH}/${REPORT_DIR}/${REPORT_DIR}.so_info) +RESULT=$(cat ${CRASH_DUMP_PATH}/${REPORT_DIR}/${REPORT_DIR}.so_info) check "utils/kenny [a-z0-9]+ crash-worker_system-tests;[^;]+;[^;]+;[a-z0-9]+" check "/usr/lib/libm[^ ]+ [a-z0-9]+ glibc;[^;]+;[^;]+;[a-z0-9]+" diff --git a/tests/system/utils/minicore-utils.sh b/tests/system/utils/minicore-utils.sh index 75f2bfc..9cb8627 100644 --- a/tests/system/utils/minicore-utils.sh +++ b/tests/system/utils/minicore-utils.sh @@ -39,23 +39,23 @@ function tzplatform_var { return 1 } -function clean_crash_root { - export CRASH_ROOT_PATH=`tzplatform_var TZ_SYS_CRASH` +function clean_crash_dump { + export CRASH_DUMP_PATH=`tzplatform_var TZ_SYS_CRASH` killall crash-manager killall minicoredumper sleep 1 - if [ -z ${CRASH_ROOT_PATH} ]; then + if [ -z ${CRASH_DUMP_PATH} ]; then exit_with_code "Couldn't get TZ_SYS_CRASH or TZ_SYS_CRASH is empty" 1 fi - if [ ! -d ${CRASH_ROOT_PATH} ]; then - exit_with_code "${CRASH_ROOT_PATH} does not exist" 1 + if [ ! -d ${CRASH_DUMP_PATH} ]; then + exit_with_code "${CRASH_DUMP_PATH} does not exist" 1 fi - rm -rf ${CRASH_ROOT_PATH}/* + rm -rf ${CRASH_DUMP_PATH}/* } function wait_for_file { diff --git a/tests/system/wait_for_opt_usr/wait_for_opt_usr.sh.template b/tests/system/wait_for_opt_usr/wait_for_opt_usr.sh.template index 7c00b99..c799e18 100755 --- a/tests/system/wait_for_opt_usr/wait_for_opt_usr.sh.template +++ b/tests/system/wait_for_opt_usr/wait_for_opt_usr.sh.template @@ -13,7 +13,7 @@ fi OPT_MOUNTPOINT='/opt' MTAB=`cat /etc/mtab | grep " ${OPT_MOUNTPOINT}"` -clean_crash_root +clean_crash_dump if ! umount -l ${OPT_MOUNTPOINT}; then exit_with_code "umount ${OPT_MOUNTPOINT} error" 1 @@ -46,4 +46,4 @@ done wait_for_app crash-manager -wait_for_file ${CRASH_ROOT_PATH}'/kenny*zip' +wait_for_file ${CRASH_DUMP_PATH}'/kenny*zip' diff --git a/tests/system/without_core/without_core.sh.template b/tests/system/without_core/without_core.sh.template index be8869c..5e99dba 100644 --- a/tests/system/without_core/without_core.sh.template +++ b/tests/system/without_core/without_core.sh.template @@ -10,7 +10,7 @@ fi CRASH_MANAGER_CONF=/etc/crash-manager.conf -clean_crash_root +clean_crash_dump mount -o rw,remount / backup_file ${CRASH_MANAGER_CONF} @@ -28,14 +28,14 @@ restore_file ${CRASH_MANAGER_CONF} wait_for_app crash-manager -pushd ${CRASH_ROOT_PATH} +pushd ${CRASH_DUMP_PATH} if ! unzip kenny*zip > /dev/null; then popd exit_with_code "FAIL: report does not exist" 1 fi popd -if ls ${CRASH_ROOT_PATH}/kenny*/kenny*.coredump > /dev/null; then +if ls ${CRASH_DUMP_PATH}/kenny*/kenny*.coredump > /dev/null; then exit_with_code "FAIL: coredump file exists" 1 fi |