system tests: rationalize naming 86/200386/5
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 21 Feb 2019 15:34:57 +0000 (16:34 +0100)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 26 Feb 2019 13:39:46 +0000 (13:39 +0000)
Change-Id: I21d22e7cba27ce4ede716573056946bf3cd3ddd6

tests/system/critical_process/critical_process.sh.template
tests/system/info_file/info_file.sh.template
tests/system/log_file/log_file.sh.template
tests/system/report_type_info/report_type_info.sh.template
tests/system/so_info_file/so_info_file.sh.template
tests/system/utils/minicore-utils.sh
tests/system/wait_for_opt_usr/wait_for_opt_usr.sh.template
tests/system/without_core/without_core.sh.template

index 4c8ce35..e3c38e1 100755 (executable)
@@ -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
index b98b6a9..129799a 100644 (file)
@@ -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.*'
index f032f15..3a0c385 100644 (file)
@@ -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
index a9021b1..eaaf748 100644 (file)
@@ -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
 
index d736198..fe5c8c0 100644 (file)
@@ -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]+"
index 75f2bfc..9cb8627 100644 (file)
@@ -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 {
index 7c00b99..c799e18 100755 (executable)
@@ -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'
index be8869c..5e99dba 100644 (file)
@@ -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