From: Shuah Khan <skhan@linuxfoundation.org>
To: Li Zhijian <lizhijian@fujitsu.com>,
shuah@kernel.org, linux-kselftest@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/watchdog-test: Fix system accidentally reset after watchdog-test
Date: Mon, 28 Oct 2024 21:39:26 -0600 [thread overview]
Message-ID: <f9d8f7a6-22a4-4d03-ab1e-e488dfdbbd51@linuxfoundation.org> (raw)
In-Reply-To: <20241029031324.482800-1-lizhijian@fujitsu.com>
On 10/28/24 21:13, Li Zhijian wrote:
> 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...
>
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
> ---
> tools/testing/selftests/watchdog/watchdog-test.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c
> index bc71cbca0dde..a1f506ba5578 100644
> --- a/tools/testing/selftests/watchdog/watchdog-test.c
> +++ b/tools/testing/selftests/watchdog/watchdog-test.c
> @@ -334,7 +334,13 @@ int main(int argc, char *argv[])
>
> printf("Watchdog Ticking Away!\n");
>
> + /*
> + * Register the signals
> + */
> signal(SIGINT, term);
> + signal(SIGTERM, term);
> + signal(SIGKILL, term);
> + signal(SIGQUIT, term);
>
> while (1) {
> keep_alive();
Thank you applied to kselftest fixes for next rc.
thanks,
-- Shuah
prev parent reply other threads:[~2024-10-29 3:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 3:13 [PATCH] selftests/watchdog-test: Fix system accidentally reset after watchdog-test Li Zhijian
2024-10-29 3:39 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9d8f7a6-22a4-4d03-ab1e-e488dfdbbd51@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lizhijian@fujitsu.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox