<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/watchdog, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-15T09:56:28+00:00</updated>
<entry>
<title>selftests: watchdog: skip ping loop if WDIOF_KEEPALIVEPING not supported</title>
<updated>2025-10-15T09:56:28+00:00</updated>
<author>
<name>Akhilesh Patil</name>
<email>akhilesh@ee.iitb.ac.in</email>
</author>
<published>2025-09-14T15:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5eff5c61caa4d739c9236e85cd197b8490da74e'/>
<id>urn:sha1:b5eff5c61caa4d739c9236e85cd197b8490da74e</id>
<content type='text'>
[ Upstream commit e8cfc524eaf3c0ed88106177edb6961e202e6716 ]

Check if watchdog device supports WDIOF_KEEPALIVEPING option before
entering keep_alive() ping test loop. Fix watchdog-test silently looping
if ioctl based ping is not supported by the device. Exit from test in
such case instead of getting stuck in loop executing failing keep_alive()

watchdog_info:
 identity:              m41t93 rtc Watchdog
 firmware_version:      0
Support/Status: Set timeout (in seconds)
Support/Status: Watchdog triggers a management or other external alarm not a reboot

Watchdog card disabled.
Watchdog timeout set to 5 seconds.
Watchdog ping rate set to 2 seconds.
Watchdog card enabled.
WDIOC_KEEPALIVE not supported by this device

without this change
Watchdog card disabled.
Watchdog timeout set to 5 seconds.
Watchdog ping rate set to 2 seconds.
Watchdog card enabled.
Watchdog Ticking Away!
(Where test stuck here forver silently)

Updated change log at commit time:
Shuah Khan &lt;skhan@linuxfoundation.org&gt;

Link: https://lore.kernel.org/r/20250914152840.GA3047348@bhairav-test.ee.iitb.ac.in
Fixes: d89d08ffd2c5 ("selftests: watchdog: Fix ioctl SET* error paths to take oneshot exit path")
Signed-off-by: Akhilesh Patil &lt;akhilesh@ee.iitb.ac.in&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/watchdog-test: Fix system accidentally reset after watchdog-test</title>
<updated>2024-12-14T18:53:08+00:00</updated>
<author>
<name>Li Zhijian</name>
<email>lizhijian@fujitsu.com</email>
</author>
<published>2024-10-29T03:13:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c1d17ef00f5b6a462a57576948a151888865582d'/>
<id>urn:sha1:c1d17ef00f5b6a462a57576948a151888865582d</id>
<content type='text'>
[ Upstream commit dc1308bee1ed03b4d698d77c8bd670d399dcd04d ]

When running watchdog-test with 'make run_tests', the watchdog-test will
be terminated by a timeout signal(SIGTERM) due to the test timemout.

And then, a system reboot would happen due to watchdog not stop. see
the dmesg as below:
```
[ 1367.185172] watchdog: watchdog0: watchdog did not stop!
```

Fix it by registering more signals(including SIGTERM) in watchdog-test,
where its signal handler will stop the watchdog.

After that
 # timeout 1 ./watchdog-test
 Watchdog Ticking Away!
 .
 Stopping watchdog ticks...

Link: https://lore.kernel.org/all/20241029031324.482800-1-lizhijian@fujitsu.com/
Signed-off-by: Li Zhijian &lt;lizhijian@fujitsu.com&gt;
Reviewed-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>.gitignore: add SPDX License Identifier</title>
<updated>2020-03-25T10:50:48+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-03-03T13:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d198b34f3855eee2571dda03eea75a09c7c31480'/>
<id>urn:sha1:d198b34f3855eee2571dda03eea75a09c7c31480</id>
<content type='text'>
Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: watchdog: Add command line option to show watchdog_info</title>
<updated>2019-10-02T19:44:43+00:00</updated>
<author>
<name>George G. Davis</name>
<email>george_davis@mentor.com</email>
</author>
<published>2019-09-17T18:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce3a677802121e038d2f062e90f96f84e7351da0'/>
<id>urn:sha1:ce3a677802121e038d2f062e90f96f84e7351da0</id>
<content type='text'>
With the new ioctl(WDIOC_GETSUPPORT) call in place, add a command
line option to show the watchdog_info.

Suggested-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Signed-off-by: George G. Davis &lt;george_davis@mentor.com&gt;
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: watchdog: Validate optional file argument</title>
<updated>2019-10-02T19:44:04+00:00</updated>
<author>
<name>George G. Davis</name>
<email>george_davis@mentor.com</email>
</author>
<published>2019-09-17T18:40:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f9577eda5b74de4bd8b186c67f20736bdea6e07'/>
<id>urn:sha1:8f9577eda5b74de4bd8b186c67f20736bdea6e07</id>
<content type='text'>
The newly added optional file argument does not validate if the
file is indeed a watchdog, e.g.:

./watchdog-test  -f /dev/zero
Watchdog Ticking Away!

Fix it by confirming that the WDIOC_GETSUPPORT ioctl succeeds.

Fixes: a4864a33f56caa ("selftests: watchdog: Add optional file argument")
Reported-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Signed-off-by: George G. Davis &lt;george_davis@mentor.com&gt;
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: watchdog: cleanup whitespace in usage options</title>
<updated>2019-09-23T14:33:16+00:00</updated>
<author>
<name>George G. Davis</name>
<email>george_davis@mentor.com</email>
</author>
<published>2019-08-30T22:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a54344ace273cd7fa182c287719b109cfd9e8613'/>
<id>urn:sha1:a54344ace273cd7fa182c287719b109cfd9e8613</id>
<content type='text'>
Convert hard spaces to tabs in usage options.

Suggested-by: Shuah Khan &lt;shuah@kernel.org&gt;
Signed-off-by: George G. Davis &lt;george_davis@mentor.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: watchdog: Add optional file argument</title>
<updated>2019-09-23T14:33:16+00:00</updated>
<author>
<name>George G. Davis</name>
<email>george_davis@mentor.com</email>
</author>
<published>2019-08-30T19:32:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4864a33f56caa6592acc69a6d265f3f3dca5eae'/>
<id>urn:sha1:a4864a33f56caa6592acc69a6d265f3f3dca5eae</id>
<content type='text'>
Some systems have multiple watchdog devices where the first device
registered is assigned to the /dev/watchdog device file. In order
to test other watchdog devices, add an optional file argument for
selecting non-default watchdog devices for testing.

Tested-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Signed-off-by: George G. Davis &lt;george_davis@mentor.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: watchdog: fix spelling mistake "experies" -&gt; "expires"</title>
<updated>2018-12-13T20:03:19+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-12-13T09:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ca2923e2a1e1eb3376900e1e3fc74e9b6345ee9'/>
<id>urn:sha1:0ca2923e2a1e1eb3376900e1e3fc74e9b6345ee9</id>
<content type='text'>
There is a spelling mistake in the --gettimeleft help text, fix it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: watchdog: Add gettimeleft command line arg</title>
<updated>2018-12-12T21:01:59+00:00</updated>
<author>
<name>Jerry Hoemann</name>
<email>jerry.hoemann@hpe.com</email>
</author>
<published>2018-11-30T17:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6059c6b1d526d47c0b9f028e106f30ad539dc323'/>
<id>urn:sha1:6059c6b1d526d47c0b9f028e106f30ad539dc323</id>
<content type='text'>
Add command line argument to call and display the results
of ioctl WDIOC_GETTIMELEFT.

Signed-off-by: Jerry Hoemann &lt;jerry.hoemann@hpe.com&gt;
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: watchdog: Fix ioctl SET* error paths to take oneshot exit path</title>
<updated>2018-10-24T20:49:36+00:00</updated>
<author>
<name>Shuah Khan (Samsung OSG)</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-09-26T22:37:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d89d08ffd2c5a9043c8df7333d9bee6c09904a8f'/>
<id>urn:sha1:d89d08ffd2c5a9043c8df7333d9bee6c09904a8f</id>
<content type='text'>
When ioctls for WDIOC_SETOPTIONS (WDIOS_DISABLECARD or WDIOS_ENABLECARD),
WDIOC_SETTIMEOUT, and WDIOC_SETPRETIMEOUT fail, the error path continues
to handler watchdog timer until user terminates it. When ioctl returns
error, it might not be safe to let the watchdog tick. The error could be
due an unsupported ioctl command or some other error.

Fix it to handle error paths as oneshot to stop the watchdog ticks and
exit right away.

Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
</feed>
