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

From: Jakub Kicinski
Date: Mon Nov 18 2024 - 21:35:29 EST


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?