[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <753241EEF6DFAB4CAF20F32F515C4E358B347A@GSjpTK1DCembx02.service.hitachi.net>
Date: Wed, 16 Sep 2015 12:11:09 +0000
From: 阿口誠司 / AGUCHI,SEIJI
<seiji.aguchi.tr@...achi.com>
To: 豊岡拓 / Toyooka,Hiraku
<hiraku.toyooka.gu@...achi.com>, Kees Cook <keescook@...omium.org>
CC: LKML <linux-kernel@...r.kernel.org>,
Tony Luck <tony.luck@...el.com>,
Linux API <linux-api@...r.kernel.org>,
Anton Vorontsov <anton@...msg.org>,
Shuah Khan <shuahkh@....samsung.com>,
Mark Salyzyn <salyzyn@...roid.com>,
Colin Cross <ccross@...roid.com>
Subject: RE: [PATCH 2/2] selftests/pstore: add pstore test scripts going
with reboot
>+prlog "Causing kernel crash ..."
>+
>+# enable all functions triggered by sysrq
>+echo 1 > /proc/sys/kernel/sysrq
>+# setting to reboot in 3 seconds after panic
>+echo 3 > /proc/sys/kernel/panic
>+# setting to cause panic when oops occurs
>+echo 1 > /proc/sys/kernel/panic_on_oops
>+
>+# create a file as reboot flag
>+touch $REBOOT_FILE
>+sync
>+
>+# cause crash
>+echo c > /proc/sysrq-trigger
Do you need to stop kdump service before the sysrq?
Or, does it cover oops and kdump case?
Seiji
> -----Original Message-----
> From: 豊岡拓 / Toyooka,Hiraku
> Sent: Tuesday, September 15, 2015 11:42 AM
> To: Kees Cook
> Cc: LKML; Tony Luck; Linux API; Anton Vorontsov; Shuah Khan; Mark Salyzyn; Colin Cross; 阿口誠司 / AGUCHI,SEIJI
> Subject: Re: [PATCH 2/2] selftests/pstore: add pstore test scripts going with reboot
>
> Hello Kees,
>
> >> +run_crash:
> >> + @sh pstore_crash_test || echo "pstore_crash_test: [FAIL]"
> >
> > This is probably better written to exit 1 on failure, otherwise it
> > just _says_ it fails. (Though lots of selftests in the tree already
> > have this problem, it's best to avoid the pattern for new stuff.)
> > Maybe something like:
> >
> > @sh pstore_crash_test || { echo "pstore_crash_test: [FAIL]";
> exit 1; }
>
> OK. I'll add the "exit 1".
>
> >> +prlog -n "Checking dmesg files exist in pstore filesystem ... "
> >> +if [ -e dmesg-${backend}-0 ]; then
> >> + prlog "ok"
> >> + for f in `ls dmesg-${backend}-*`; do
> >> + prlog -e "\t${f}"
> >> + done
> >> +else
> >> + prlog "FAIL"
> >> + rc=1
> >> +fi
> >
> > This test pattern is repeated a lot. Maybe better to create a helper
> > function instead? It could make the tests much more readable.
>
> Yes, I should make a helper function in v2.
>
> Best regards,
> Hiraku Toyooka
Powered by blists - more mailing lists