These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / tools / testing / selftests / pstore / pstore_tests
1 #!/bin/sh
2
3 # pstore_tests - Check pstore's behavior before crash/reboot
4 #
5 # Copyright (C) Hitachi Ltd., 2015
6 #  Written by Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
7 #
8 # Released under the terms of the GPL v2.
9
10 . ./common_tests
11
12 prlog -n "Checking pstore console is registered ... "
13 dmesg | grep -q "console \[pstore"
14 show_result $?
15
16 prlog -n "Checking /dev/pmsg0 exists ... "
17 test -e /dev/pmsg0
18 show_result $?
19
20 prlog -n "Writing unique string to /dev/pmsg0 ... "
21 if [ -e "/dev/pmsg0" ]; then
22     echo "${TEST_STRING_PATTERN}""$UUID" > /dev/pmsg0
23     show_result $?
24     echo "$UUID" > $TOP_DIR/uuid
25 else
26     prlog "FAIL"
27     rc=1
28 fi
29
30 exit $rc