From 7c774350fcca87b6a533b912917a6f738bb70545 Mon Sep 17 00:00:00 2001 From: Artem Savkov Date: Mon, 14 Jan 2019 12:20:43 +0100 Subject: [PATCH] integration: save dmesg on detected errors Dump dmesg to dmesg.log when detecting a call trace. Signed-off-by: Artem Savkov --- test/integration/kpatch-test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/integration/kpatch-test b/test/integration/kpatch-test index 6c2f89e..c0bd0ac 100755 --- a/test/integration/kpatch-test +++ b/test/integration/kpatch-test @@ -320,7 +320,10 @@ fi unload_all -dmesg |grep -q "Call Trace" && error "kernel error detected in printk buffer" +if dmesg | grep -q "Call Trace"; then + dmesg > dmesg.log + error "kernel error detected in printk buffer" +fi if [[ $ERROR -gt 0 ]]; then log "$ERROR errors encountered"