%{_libdir}/crash-worker/system-tests/utils/libcrash-servicetest
%{_libdir}/crash-worker/system-tests/utils/minicore-utils.sh
%{_libdir}/crash-worker/system-tests/wait_for_opt_usr/wait_for_opt_usr.sh
+%{_libdir}/crash-worker/system-tests/without_so_info_file/without_so_info_file.sh
%{_libdir}/crash-worker/system-tests/without_core/without_core.sh
%if %{with livedumper}
char *temp_report;
if (config.report_type >= REP_TYPE_FULL) {
/* Save shared objects info (file names, bulid IDs, rpm package names) */
- save_so_info(cinfo);
+ if (config.dump_so_info)
+ save_so_info(cinfo);
+ else
+ _I("Not saving .so_info (disabled in configuration)");
/* Wait misc. pids */
wait_for_pid(dump_state_pid, NULL);
# This option applies to ReportType=FULL only!
# DumpCore=1
+# DumpSharedObjectInfo - 1 to enable (default), 0 to disable
+# This option controls creation of .so_info file
+#
+# Note! When set to 0 report will not include information about packages that were
+# mapped into process memory. This information is normally needed to re-create
+# sysroot for the use with debugger.
+#
+# DumpSharedObjectInfo=1
+
# Use Legacy ProcessCrashed DBus signal
# When '0' (default), crash worker emits new-style signal with extensive data:
# 1. cmd name,
UPDATE(c->max_retention_sec, int, "MaxRetentionSec");
UPDATE(c->max_crash_dump, int, "MaxCrashDump");
UPDATE(c->dump_core, boolean, "DumpCore");
+ UPDATE(c->dump_so_info, boolean, "DumpSharedObjectInfo");
UPDATE(c->allow_zip, boolean, "AllowZip");
UPDATE(c->legacy_notification, boolean, "UseLegacyNotification");
c->max_retention_sec = MAX_RETENTION_SEC;
c->max_crash_dump = MAX_CRASH_DUMP;
c->dump_core = DUMP_CORE;
+ c->dump_so_info = DUMP_SO_INFO;
c->allow_zip = ALLOW_ZIP;
c->legacy_notification = LEGACY_NOTIFICATION;
"config: max_retention_sec = %d\n"
"config: max_crash_dump = %d\n"
"config: dump_core = %d\n"
+ "config: dump_so_info = %d\n"
"config: allow_zip = %d\n"
"config: legacy_notification = %d\n",
c->crash_root_path,
c->max_retention_sec,
c->max_crash_dump,
c->dump_core,
+ c->dump_so_info,
c->allow_zip,
c->legacy_notification);
}
#define MAX_RETENTION_SEC 0
#define MAX_CRASH_DUMP 0
#define DUMP_CORE 1
+#define DUMP_SO_INFO 1
#define ALLOW_ZIP 1
#define LEGACY_NOTIFICATION 0
typedef struct config {
bool allow_zip;
bool dump_core;
+ bool dump_so_info;
bool legacy_notification;
enum ReportType report_type;
int system_max_use;
configure_test("report_basic")
configure_test("report_type_info")
configure_test("without_core")
+configure_test("without_so_info_file")
configure_test("crash_root_path")
configure_test("dump_systemstate_extras")
configure_test("livedumper")
--- /dev/null
+#!/bin/bash
+
+# Checks ability to disable .so_info
+
+if [ -z "${CRASH_WORKER_SYSTEM_TESTS}" ]; then
+ CRASH_WORKER_SYSTEM_TESTS="@CRASH_SYSTEM_TESTS_PATH@"
+fi
+
+. ${CRASH_WORKER_SYSTEM_TESTS}/utils/minicore-utils.sh
+
+CONF_DIR=/etc/crash-manager.conf.d
+CONF_FILE=${CONF_DIR}/crash-worker-without-so-info.conf
+
+mount -o rw,remount /
+
+mkdir -p $CONF_DIR
+rm -f $CONF_FILE || :
+cat <<EOF >$CONF_FILE
+[CrashManager]
+DumpSharedObjectInfo=0
+EOF
+
+clean_crash_dump
+
+{
+ ${CRASH_WORKER_SYSTEM_TESTS}/utils/kenny &
+ sleep 1
+ kill -6 $!
+} 1> /dev/null 2>&1
+
+sleep 2
+
+wait_for_app crash-manager
+
+rm -f ${CONF_FILE} || :
+
+test -f ${CRASH_DUMP_PATH}/kenny*zip || fail "crash report not created"
+unzip -l ${CRASH_DUMP_PATH}/kenny*zip | egrep 'kenny*/kenny*.so_info$' && fail ".so_info file found despite being disabled in config"
+
+exit_ok