pstore-test manual

high

Image Types:
hmi-armhf
Image Deployment:
APT, OSTree
Type:
functional

Description

Test the pstore functionality usage


Execution Steps

  1. For test purpose, you can generate a kernel crash by setting reboot timeout to 10 seconds and trigger a panic:
  2. $ sudo sh -c "echo 1 > /proc/sys/kernel/sysrq
    $ sudo sh -c "echo 10 > /proc/sys/kernel/panic
    $ sudo sh -c "echo c > /proc/sysrq-trigger
  3. While the target reboots enter the U-Boot
  4. In U-Boot, logs can be displayed or saved using pstore command.
  5. PStore parameters need to be set during U-Boot configuration and match kernel ramoops parameters
  6. In the U-Boot execute the below command
  7. => pstore set 0x30000000 0x100000 0x2000 0x2000
  8. Then all available dumps can be displayed using:
  9. => pstore display
  10. Logs can be saved to an existing directory in an Ext2 or Ext4 partition using pstore save, e.g. on root directory of 1st partition of the 2nd MMC:
  11. => pstore save mmc 1:1 /
  12. After reboot, logs ca be found at /sys/fs/pstore:
  13. $ sudo ls -l /sys/fs/pstore

Expected

After reboot, logs ca be found at /sys/fs/pstore:

total 0

-r--r--r-- 1 root root 8180 2019-11-15 11:58 console-ramoops-0

-r--r--r-- 1 root root 8136 2019-11-15 11:51 dmesg-ramoops-0

-r--r--r-- 1 root root 7856 2019-11-15 11:51 dmesg-ramoops-1