Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
31 lines
844 B
Bash
Executable File
31 lines
844 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# pstore_crash_test - Pstore test shell script which causes crash and reboot
|
|
#
|
|
# Copyright (C) Hitachi Ltd., 2015
|
|
# Written by Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
|
|
#
|
|
# Released under the terms of the GPL v2.
|
|
|
|
# exit if pstore backend is not registered
|
|
. ./common_tests
|
|
|
|
prlog "Causing kernel crash ..."
|
|
|
|
# enable all functions triggered by sysrq
|
|
echo 1 > /proc/sys/kernel/sysrq
|
|
# setting to reboot in 3 seconds after panic
|
|
echo 3 > /proc/sys/kernel/panic
|
|
|
|
# save uuid file by different name because next test execution will replace it.
|
|
mv $TOP_DIR/uuid $TOP_DIR/prev_uuid
|
|
|
|
# create a file as reboot flag
|
|
touch $REBOOT_FLAG
|
|
sync
|
|
|
|
# cause crash
|
|
# Note: If you use kdump and want to see kmesg-* files after reboot, you should
|
|
# specify 'crash_kexec_post_notifiers' in 1st kernel's cmdline.
|
|
echo c > /proc/sysrq-trigger
|