diff mbox series

[v2] runtest/fs: filter /dev/watchdog* for read_all_dev by default

Message ID 1521455915-3081-1-git-send-email-xuyang.jy@cn.fujitsu.com
State Accepted
Headers show
Series [v2] runtest/fs: filter /dev/watchdog* for read_all_dev by default | expand

Commit Message

yang xu March 19, 2018, 10:38 a.m. UTC
On some distros with Magic Close feature or built-in CONFIG_WATCHDOG_NOWAYOUT,
just closing /dev/watchdog* enabled by open leads to system reboot as expected.

If Magic Close feature is supported, just writing a specific magic character 'V'
into /dev/watchdog* before closing it can disable the watchdog.

If CONFIG_WATCHDOG_NOWAYOUT is built-in, there is no way to disable the watchdog.

Magic Close feature is introduced by:
commit 017cf080("watchDog Timer Driver Core - Add Magic Close feature")

Please see the following url for detailed watchdog info:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/watchdog/watchdog-api.txt

Signed-off-by: yang xu <xuyang.jy@cn.fujitsu.com>
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/fs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Palethorpe March 19, 2018, 2:29 p.m. UTC | #1
Hello,

yang xu writes:

> On some distros with Magic Close feature or built-in CONFIG_WATCHDOG_NOWAYOUT,
> just closing /dev/watchdog* enabled by open leads to system reboot as expected.
>
> If Magic Close feature is supported, just writing a specific magic character 'V'
> into /dev/watchdog* before closing it can disable the watchdog.
>
> If CONFIG_WATCHDOG_NOWAYOUT is built-in, there is no way to disable the watchdog.
>
> Magic Close feature is introduced by:
> commit 017cf080("watchDog Timer Driver Core - Add Magic Close feature")
>
> Please see the following url for detailed watchdog info:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/watchdog/watchdog-api.txt
>
> Signed-off-by: yang xu <xuyang.jy@cn.fujitsu.com>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
>  runtest/fs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/runtest/fs b/runtest/fs
> index a595edb..42a9bfc 100644
> --- a/runtest/fs
> +++ b/runtest/fs
> @@ -69,7 +69,7 @@ fs_di fs_di -d $TMPDIR
>  # Was not sure why it should reside in runtest/crashme and won´t get tested ever
>  proc01 proc01 -m 128
>  
> -read_all_dev read_all -d /dev -q -r 10
> +read_all_dev read_all -d /dev -e '/dev/watchdog?(0)' -q -r 10
>  read_all_proc read_all -d /proc -q -r 10
>  read_all_sys read_all -d /sys -q -r 10

LGTM, thanks!
Cyril Hrubis March 20, 2018, 11:51 a.m. UTC | #2
Hi!
Applied, thanks.
diff mbox series

Patch

diff --git a/runtest/fs b/runtest/fs
index a595edb..42a9bfc 100644
--- a/runtest/fs
+++ b/runtest/fs
@@ -69,7 +69,7 @@  fs_di fs_di -d $TMPDIR
 # Was not sure why it should reside in runtest/crashme and won´t get tested ever
 proc01 proc01 -m 128
 
-read_all_dev read_all -d /dev -q -r 10
+read_all_dev read_all -d /dev -e '/dev/watchdog?(0)' -q -r 10
 read_all_proc read_all -d /proc -q -r 10
 read_all_sys read_all -d /sys -q -r 10