From: Simon Horman <horms@kernel.org>
To: Junjie Cao <junjie.cao@intel.com>
Cc: Shuah Khan <shuah@kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] selftests: ptp: treat unsupported PHC operations as skip
Date: Tue, 27 Jan 2026 17:04:39 +0000 [thread overview]
Message-ID: <aXjwJ-p47nn1GfYO@horms.kernel.org> (raw)
In-Reply-To: <20260126061532.12532-2-junjie.cao@intel.com>
On Mon, Jan 26, 2026 at 02:15:32PM +0800, Junjie Cao wrote:
> Some PTP hardware clock (PHC) devices may return -EOPNOTSUPP for
> operations like settime, adjtime, or adjfreq. This commonly occurs
> with timestamp-only PHC implementations that don't support full clock
> control.
>
> For background, syzbot previously exposed a crash risk when PTP clock
> drivers lacked required callbacks[1]. Subsequent work[2] made callback
> presence a registration requirement. As a result, some drivers (like
> iwlwifi MVM/MLD[3]) now provide stub callbacks that return -EOPNOTSUPP
> for unsupported operations.
>
> When phc_ctl encounters such devices, the "Operation not supported"
> error should be treated as a skip (device limitation) rather than a
> test failure. This patch:
> - Adds [SKIP] output handling in log_test()
> - Detects "Operation not supported" from phc_ctl and returns ksft_skip
> - Returns ksft_skip if all tests are skipped, preventing false-positive
> results when testing timestamp-only PHC implementations
>
> Link: https://lore.kernel.org/netdev/20251028043216.1971292-1-junjie.cao@intel.com/ [1]
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfb073d32cac [2]
> Link: https://lore.kernel.org/netdev/20251204123204.9316-1-ziyao@disroot.org/ [3]
> Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2026-01-27 17:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 6:15 [PATCH v2 1/2] selftests: ptp: use KSFT_SKIP exit code for skip scenarios Junjie Cao
2026-01-26 6:15 ` [PATCH v2 2/2] selftests: ptp: treat unsupported PHC operations as skip Junjie Cao
2026-01-27 17:04 ` Simon Horman [this message]
2026-01-26 6:32 ` [PATCH v2 1/2] selftests: ptp: use KSFT_SKIP exit code for skip scenarios Junjie Cao
2026-01-27 17:04 ` Simon Horman
2026-01-28 2:10 ` patchwork-bot+netdevbpf
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=aXjwJ-p47nn1GfYO@horms.kernel.org \
--to=horms@kernel.org \
--cc=junjie.cao@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.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