Files
linux/tools/testing/selftests/pstore/pstore_crash_test
T
Thomas Gleixner 63307d015b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 472
Based on 1 normalized pattern(s):

  released under the terms of the gpl v2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 5 file(s).

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Reviewed-by: Enrico Weigelt <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-19 17:09:11 +02:00

31 lines
842 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
# pstore_crash_test - Pstore test shell script which causes crash and reboot
#
# Copyright (C) Hitachi Ltd., 2015
# Written by Hiraku Toyooka <[email protected]>
#
# 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