pstore_tests 647 B

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