History log of /linux-master/tools/testing/selftests/pstore/pstore_tests
Revision Date Author Comments
# d195c390 08-May-2020 Kees Cook <keescook@chromium.org>

pstore/platform: Use backend name for console registration

If the pstore backend changes, there's no indication in the logs what
the console is (it always says "pstore"). Instead, pass through the
active backend's name. (Also adjust the selftest to match.)

Link: https://lore.kernel.org/lkml/20200510202436.63222-5-keescook@chromium.org/
Link: https://lore.kernel.org/lkml/20200526135429.GQ12456@shao2-debian
Signed-off-by: Kees Cook <keescook@chromium.org>


# 63307d01 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 472

Based on 1 normalized pattern(s):

released under the terms of the gpl v2

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 5 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Enrico Weigelt <info@metux.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081203.398003637@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cc04a46f 02-Oct-2015 Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>

selftests/pstore: add pstore test script for pre-reboot

The pstore_tests script includes test cases which check pstore's
behavior before crash (and reboot).

The test cases are currently following.

- Check pstore backend is registered
- Check pstore console is registered
- Check /dev/pmsg0 exists
- Write unique string to /dev/pmsg0

The unique string written to /dev/pmsg includes UUID. The UUID is also
left in 'uuid' file in order to enable us to check if the pmsg keeps the
string correctly after reboot.

Example usage is following.

# cd /path/to/selftests
# make run_tests -C pstore (or just .pstore/pstore_tests)
make: Entering directory '/path/to/selftests/pstore'
=== Pstore unit tests (pstore_tests) ===
UUID=b49b02cf-b0c2-4309-be43-b08c3971e37f
Checking pstore backend is registered ... ok
backend=ramoops
cmdline=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait mem=768M ramoops.mem_address=0x30000000 ramoops.mem_size=0x10000
Checking pstore console is registered ... ok
Checking /dev/pmsg0 exists ... ok
Writing unique string to /dev/pmsg0 ... ok
selftests: pstore_tests [PASS]
make: Leaving directory '/path/to/selftests/pstore'

We can also see test logs later.

# cat pstore/logs/20151001-072718_b49b02cf-b0c2-4309-be43-b08c3971e37f/pstore_tests.log
Thu Oct 1 07:27:18 UTC 2015
=== Pstore unit tests (pstore_tests) ===
UUID=b49b02cf-b0c2-4309-be43-b08c3971e37f
Checking pstore backend is registered ... ok
backend=ramoops
cmdline=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait mem=768M ramoops.mem_address=0x30000000 ramoops.mem_size=0x10000
Checking pstore console is registered ... ok
Checking /dev/pmsg0 exists ... ok
Writing unique string to /dev/pmsg0 ... ok

Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mark Salyzyn <salyzyn@android.com>
Cc: Seiji Aguchi <seiji.aguchi.tr@hitachi.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-api@vger.kernel.org
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>