Subject: Re: [PATCH net-next 4/4] netconsole: selftest: Validate CPU number auto-population in userdata

From: Jakub Kicinski <[email-masked]>
Date: Mon, 18 Nov 2024 18:35:14 -0800

On Wed, 13 Nov 2024 07:10:55 -0800 Breno Leitao wrote:
> +	if ! grep -q "cpu=[0-9]\+" "${TMPFILENAME}"; then
> +		echo "FAIL: 'cpu=' not found in ${TMPFILENAME}" >&2
> +		cat "${TMPFILENAME}" >&2
> +		exit "${ksft_fail}"
> +	fi

Could we try to do something like pick a 'random' CPU ID from sysfs,
taskset the write / echo, and match that the incoming message has the
expected CPU ID, not just any?