Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0-only
0003 
0004 # pstore_tests - Check pstore's behavior before crash/reboot
0005 #
0006 # Copyright (C) Hitachi Ltd., 2015
0007 #  Written by Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
0008 #
0009 
0010 . ./common_tests
0011 
0012 prlog -n "Checking pstore console is registered ... "
0013 dmesg | grep -Eq "console \[(pstore|${backend})"
0014 show_result $?
0015 
0016 prlog -n "Checking /dev/pmsg0 exists ... "
0017 test -e /dev/pmsg0
0018 show_result $?
0019 
0020 prlog -n "Writing unique string to /dev/pmsg0 ... "
0021 if [ -e "/dev/pmsg0" ]; then
0022     echo "${TEST_STRING_PATTERN}""$UUID" > /dev/pmsg0
0023     show_result $?
0024     echo "$UUID" > $TOP_DIR/uuid
0025 else
0026     prlog "FAIL"
0027     rc=1
0028 fi
0029 
0030 exit $rc