Re: [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional

Muhammad Usama Anjum <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 21/08/2026 4:43 pm, Mark Brown wrote:
> On Fri, Aug 21, 2026 at 03:15:51PM +0100, Muhammad Usama Anjum wrote:
> 
>> +static bool merge_across_nodes_available(void)
>> +{
>> +	const char *path = PATH_KSM "merge_across_nodes";
>> +
>> +	if (!access(path, R_OK | W_OK))
>> +		return true;
>> +	if (errno == ENOENT)
>> +		return false;
>> +
>> +	ksft_exit_fail_msg("Unable to read and write %s: %s\n", path,
>> +			   strerror(errno));
>> +}
> 
> If prerequistites for the test aren't available I'd expect this to be a
> skip rather than a fail.

You're right. Access to the attribute is a prerequisite rather than the
behavior under test, so I'll report access failures as KSFT_SKIP.

-- 
Thanks,
Usama

-- 
Thanks,
Usama
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.