lkml.org 
[lkml]   [2020]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: selftests: Linux Kernel Dump Test Module output
On Wed, Feb 26, 2020 at 11:32:46PM +0530, Naresh Kamboju wrote:
> Yeah i see this case at my end also.
>
> my two cents,
> I have two comments,
> 1) shell check

I'll fix these up; thanks for the suggestions!

> Test output with set -x for debugging shell scripts.
> [...]
> ++ dmesg -c
> +++ mktemp --tmpdir -t lkdtm-XXXXXX
> ++ LOG=/tmp/lkdtm-r5yZ7K
> ++ trap cleanup EXIT
> ++ /bin/sh -c 'cat <(echo BUG) >/sys/kernel/debug/provoke-crash/DIRECT'
> ++ true
> ++ dmesg -c
> ++ cat /tmp/lkdtm-r5yZ7K

This is the part that is failing and I don't know why.

clear the kernel event log:
dmesg -c
trigger the kernel event:
/bin/sh -c 'cat <(echo BUG) >/sys/kernel/debug/provoke-crash/DIRECT'
dump the newly added event logs into a file (set -x doesn't report
redirection to /tmp/lkdtm-r5yZ7K):
dmesg -c

It seems /tmp/lkdtm-r5yZ7K is empty?

--
Kees Cook

\
 
 \ /
  Last update: 2020-02-26 20:02    [W:0.048 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site