]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/watchdog-test: Fix system accidentally reset after watchdog-test
authorLi Zhijian <lizhijian@fujitsu.com>
Tue, 29 Oct 2024 03:13:24 +0000 (11:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:47:41 +0000 (19:47 +0100)
commit501ac2d1aae65e10374e63771dc3dac75420fd29
treecc35314e78316c60f0424c476c7e4fcb2de64fb8
parent6b5737b14af157996d763ff31ed895e3207720bb
selftests/watchdog-test: Fix system accidentally reset after watchdog-test

[ 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 <lizhijian@fujitsu.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/watchdog/watchdog-test.c