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 <firstname.lastname@example.org>
Reviewed-by: Olof Johansson <email@example.com>
Reviewed-by: Grant Grundler <firstname.lastname@example.org>
Reviewed-by: Mike Frysinger <email@example.com>
2 files changed