mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 19:11:31 +00:00
d195c39052
If the pstore backend changes, there's no indication in the logs what the console is (it always says "pstore"). Instead, pass through the active backend's name. (Also adjust the selftest to match.) Link: https://lore.kernel.org/lkml/20200510202436.63222-5-keescook@chromium.org/ Link: https://lore.kernel.org/lkml/20200526135429.GQ12456@shao2-debian Signed-off-by: Kees Cook <keescook@chromium.org>
31 lines
659 B
Bash
Executable File
31 lines
659 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
# pstore_tests - Check pstore's behavior before crash/reboot
|
|
#
|
|
# Copyright (C) Hitachi Ltd., 2015
|
|
# Written by Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
|
|
#
|
|
|
|
. ./common_tests
|
|
|
|
prlog -n "Checking pstore console is registered ... "
|
|
dmesg | grep -Eq "console \[(pstore|${backend})"
|
|
show_result $?
|
|
|
|
prlog -n "Checking /dev/pmsg0 exists ... "
|
|
test -e /dev/pmsg0
|
|
show_result $?
|
|
|
|
prlog -n "Writing unique string to /dev/pmsg0 ... "
|
|
if [ -e "/dev/pmsg0" ]; then
|
|
echo "${TEST_STRING_PATTERN}""$UUID" > /dev/pmsg0
|
|
show_result $?
|
|
echo "$UUID" > $TOP_DIR/uuid
|
|
else
|
|
prlog "FAIL"
|
|
rc=1
|
|
fi
|
|
|
|
exit $rc
|