Skip to content
Snippets Groups Projects
Commit 4e1986fa authored by Nithin Mysore Nagesh's avatar Nithin Mysore Nagesh Committed by Walter Lozano
Browse files

Adapt pstore test to use systemd-pstore


After systemd has started to support pstore the test needs to be adapted to use this new functionality.
Upon startup, systemd-pstore will monitor and extract the pstore contents and save it inside /var/lib/systemd/pstore/.

This also fixes the failure in the current test as /sys/fs/pstore: is not longer available.

Signed-off-by: default avatarNithin M N <MN.Nithin@in.bosch.com>
parent 2df875ae
No related branches found
No related tags found
1 merge request!603Adapt pstore test to use systemd-pstore
Pipeline #695120 passed
......@@ -13,26 +13,27 @@ metadata:
description: "Test the pstore functionality usage"
expected:
- "After reboot, logs ca be found at /sys/fs/pstore:"
- "After a crash induced reboot, logs can be found at /var/lib/systemd/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
-rw------- 1 root root 4084 Mar 1 08:32 console-ramoops-0
-rw------- 1 root root 4023 Mar 1 08:27 dmesg-ramoops-0
-rw-r----- 1 root root 4040 Mar 1 08:15 dmesg.txt
- "Logs saved should be same as what was displayed after running pstore display command"
run:
steps:
- "For test purpose, you can generate a kernel crash by setting reboot timeout to 10 seconds and trigger a panic:"
- $ 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
- "While the target reboots enter the U-Boot"
- "In U-Boot, logs can be displayed or saved using pstore command."
- $ 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"
- "When the target reboots enter U-Boot"
- "In U-Boot, logs can be displayed using pstore command."
- "PStore parameters need to be set during U-Boot configuration and match kernel ramoops parameters"
- "In the U-Boot execute the below command"
- "=> pstore set 0x30000000 0x100000 0x2000 0x2000"
- "To view the logs in U-Boot, execute the following command to set the pstore location"
- => pstore set 0x30000000 0x100000 0x2000 0x2000
- "Then all available dumps can be displayed using:"
- "=> pstore display"
- "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:"
- "=> pstore save mmc 1:1 /"
- "After reboot, logs ca be found at /sys/fs/pstore:"
- "$ sudo ls -l /sys/fs/pstore"
\ No newline at end of file
- => pstore display
- "Make a note of the timestamp of the logs"
- => boot
- "After target is booted, logs can be found at /var/lib/systemd/pstore:"
- "$ sudo ls -l /var/lib/systemd/pstore"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment