kexec-tools/tests/scripts/testcases/local-kdump/0-local.sh
DistroBaker 17a51515f0 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#4f492cf73ea11ff74f5b062e18fcea45cb5e7eeb
2020-11-20 12:35:49 +00:00

33 lines
542 B
Bash
Executable File

on_build() {
:
}
on_test() {
local boot_count=$(get_test_boot_count)
if [ $boot_count -eq 1 ]; then
cat << EOF > /etc/kdump.conf
path /var/crash
core_collector makedumpfile -l --message-level 7 -d 31
EOF
kdumpctl start || test_failed "Failed to start kdump"
sync
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
elif [ $boot_count -eq 2 ]; then
if has_valid_vmcore_dir /var/crash; then
test_passed
else
test_failed "Vmcore missing"
fi
shutdown -h 0
else
test_failed "Unexpected reboot"
fi
}