crash-reporter: add a sanity check for kernel dmesg records
On some devices, after a cold boot, a junk pstore record
/dev/pstore/dmesg-ramoops-0 is created which is just a chunk
of uninitialized memory containing random bits, and it's not
the result of a kernel crash.
The sanity check scans for the dmesg log level pattern to
avoid creating junk .kcrash files.
TEST=platform_KernelErrorPaths with 3.8 and 3.14 kernel;
check no kcrash file is created for random binary ramoops dump
Signed-off-by: Ben Zhang <email@example.com>
Reviewed-by: Olof Johansson <firstname.lastname@example.org>
Reviewed-by: Grant Grundler <email@example.com>
Reviewed-by: Mike Frysinger <firstname.lastname@example.org>
2 files changed