%{_libdir}/crash-worker_system-tests/cmp_backtraces/cp.sh
%{_libdir}/crash-worker_system-tests/crash_root_path/crash_root_path.sh
%{_libdir}/crash-worker_system-tests/critical_process/critical_process.sh
+%{_libdir}/crash-worker_system-tests/dbus_notify/dbus_notify.sh
%{_libdir}/crash-worker_system-tests/dump_systemstate_extras/dump_systemstate_extras.sh
%{_libdir}/crash-worker_system-tests/extra_script/extra_script.sh
%{_libdir}/crash-worker_system-tests/info_file/info_file.sh
configure_test("dump_systemstate_extras")
configure_test("livedumper")
configure_test("extra_script")
+configure_test("dbus_notify")
get_property(TESTS_LIST GLOBAL PROPERTY TMP_TESTS_LIST)
--- /dev/null
+#!/bin/bash
+
+# Check the report type change in the config file
+
+if [ -z "${CRASH_WORKER_SYSTEM_TESTS}" ]; then
+ CRASH_WORKER_SYSTEM_TESTS="@CRASH_SYSTEM_TESTS_PATH@"
+fi
+
+. ${CRASH_WORKER_SYSTEM_TESTS}/utils/minicore-utils.sh
+
+# We are looking for following signal - example for `sleep` command:
+#
+# signal time=1420079847.594970 sender=:1.82 -> destination=(null destination) serial=2 path=/Org/Tizen/System/Crash/Crash; interface=org.tizen.system.crash.Crash; member=ProcessCrashed
+# string "sleep"
+# string "/usr/bin/sleep"
+# string "sleep"
+# string "sleep"
+# string "/opt/usr/share/crash/dump//sleep_2782_20150101113723.zip"
+# int32 2782
+# int32 2782
+# array [
+# dict entry(
+# string "arm.pc"
+# variant uint32 3069275660
+# )
+# dict entry(
+# string "arm.lr"
+# variant uint32 3070220008
+# )
+# ]
+
+( ${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny &
+ pid=$!
+ sleep 2
+ kill -6 $pid ) &
+
+TMPFILE=$(mktemp /tmp/dbus_notify.XXXXXX)
+dbus-monitor --system type=signal,path=/Org/Tizen/System/Crash/Crash,interface=org.tizen.system.crash.Crash,member=ProcessCrashed > $TMPFILE &
+monpid=$!
+
+cleanup()
+{
+ kill $monpid
+ rm -f $TMPFILE
+}
+
+trap cleanup 0
+
+sleep 3
+
+PATTERN='path=/Org/Tizen/System/Crash/Crash; interface=org\.tizen\.system\.crash\.Crash; member=ProcessCrashed'
+for i in $(seq 1 10); do
+ score=0
+ if egrep "$PATTERN" $TMPFILE; then
+ if egrep "string \"kenny" $TMPFILE; then
+ score=$(($score + 1))
+ fi
+
+ if egrep "string \"/opt/usr/share/crash/dump.*kenny" $TMPFILE; then
+ score=$(($score + 1))
+ fi
+
+ if egrep "string \"${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny" $TMPFILE; then
+ score=$(($score + 1))
+ fi
+
+ if [ $score -eq 3 ]; then
+ exit_with_code "SUCCESS" ${SUCCESS_CODE}
+ fi
+ fi
+
+ sleep 1
+done
+
+exit_with_code "FAIL: dbus signal does not match" ${FAIL_CODE}