[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF3JpA4G4+cHmthLYbXF1sSatQB8SCMe4YUa-kHZwAgAJ2rgtQ@mail.gmail.com>
Date: Fri, 1 Aug 2025 08:27:19 -0700
From: Moon Hee Lee <moonhee.lee.ca@...il.com>
To: Olivier Blin <olivier.blin@...tathome.com>
Cc: shuah@...nel.org, yifei.l.liu@...cle.com, zhujun2@...s.chinamobile.com,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] selftests: breakpoints: use suspend_stats to reliably
check suspend success
Hi Olivier,
On Fri, Aug 1, 2025 at 5:39 AM Olivier Blin <olivier.blin@...tathome.com> wrote:
> Shouldn't you also remove the timerfd variable?
> It seems to be of no functional use after this change.
The timerfd is still required because it provides the wake-up event for
this test. Just before suspend the code programs a CLOCK_BOOTTIME_ALARM
to expire in five seconds. While the system is asleep it needs an
interrupt to resume; this timer supplies it. The patch only changes how
success is checked: we read /sys/power/suspend_stats/success after
resume, instead of comparing time diffs on the timerfd. If the timerfd
were removed, the machine could suspend with no scheduled event to bring
it back, turning the test into a hang rather than yielding a result.
Thanks for the review.
Regards,
Moon
Powered by blists - more mailing lists