stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Li Zhijian <lizhijian@fujitsu.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	shuah@kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH AUTOSEL 6.6 10/14] selftests/watchdog-test: Fix system accidentally reset after watchdog-test
Date: Mon,  4 Nov 2024 05:52:02 -0500	[thread overview]
Message-ID: <20241104105228.97053-10-sashal@kernel.org> (raw)
In-Reply-To: <20241104105228.97053-1-sashal@kernel.org>

From: Li Zhijian <lizhijian@fujitsu.com>

[ 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 | 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 bc71cbca0dde7..a1f506ba55786 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();
-- 
2.43.0


  parent reply	other threads:[~2024-11-04 10:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04 10:51 [PATCH AUTOSEL 6.6 01/14] wifi: radiotap: Avoid -Wflex-array-member-not-at-end warnings Sasha Levin
2024-11-04 10:51 ` [PATCH AUTOSEL 6.6 02/14] ASoC: codecs: rt5640: Always disable IRQs from rt5640_cancel_work() Sasha Levin
2024-11-04 10:51 ` [PATCH AUTOSEL 6.6 03/14] ASoC: Intel: bytcr_rt5640: Add support for non ACPI instantiated codec Sasha Levin
2024-11-04 10:51 ` [PATCH AUTOSEL 6.6 04/14] ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet Sasha Levin
2024-11-04 10:51 ` [PATCH AUTOSEL 6.6 05/14] ASoC: Intel: sst: Support LPE0F28 ACPI HID Sasha Levin
2024-11-04 10:51 ` [PATCH AUTOSEL 6.6 06/14] wifi: iwlwifi: mvm: Use the sync timepoint API in suspend Sasha Levin
2024-11-04 10:51 ` [PATCH AUTOSEL 6.6 07/14] mac80211: fix user-power when emulating chanctx Sasha Levin
2024-11-04 10:52 ` [PATCH AUTOSEL 6.6 08/14] usb: add support for new USB device ID 0x17EF:0x3098 for the r8152 driver Sasha Levin
2024-11-04 10:52 ` [PATCH AUTOSEL 6.6 09/14] usb: typec: use cleanup facility for 'altmodes_node' Sasha Levin
2024-11-04 10:52 ` Sasha Levin [this message]
2024-11-04 10:52 ` [PATCH AUTOSEL 6.6 11/14] ALSA: hda/realtek: Add subwoofer quirk for Infinix ZERO BOOK 13 Sasha Levin
2024-11-04 10:52 ` [PATCH AUTOSEL 6.6 12/14] x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB Sasha Levin
2024-11-04 10:52 ` [PATCH AUTOSEL 6.6 13/14] bpf: fix filed access without lock Sasha Levin
2024-11-04 10:52 ` [PATCH AUTOSEL 6.6 14/14] net: usb: qmi_wwan: add Quectel RG650V Sasha Levin

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=20241104105228.97053-10-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).