[PATCH net-next 3/4] selftests/netconsole: Switch to configfs send_msg interface

Breno Leitao posted 4 patches 3 days, 8 hours ago
There is a newer version of this series
[PATCH net-next 3/4] selftests/netconsole: Switch to configfs send_msg interface
Posted by Breno Leitao 3 days, 8 hours ago
Update the netcons_sysdata test to use the configfs send_msg
attribute for message injection instead of /dev/kmsg. This
validates the new direct message sending functionality that
bypasses the kernel's printk infrastructure.

Only move this test to the new mechanism, given the traditional printk()
flow continues to be default path, and the one that should be mostly
tested.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 tools/testing/selftests/drivers/net/netcons_sysdata.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/drivers/net/netcons_sysdata.sh b/tools/testing/selftests/drivers/net/netcons_sysdata.sh
index baf69031089e..27df730dc8f3 100755
--- a/tools/testing/selftests/drivers/net/netcons_sysdata.sh
+++ b/tools/testing/selftests/drivers/net/netcons_sysdata.sh
@@ -195,7 +195,7 @@ function runtest {
 	# Wait for socat to start and listen to the port.
 	wait_local_port_listen "${NAMESPACE}" "${PORT}" udp
 	# Send the message
-	taskset -c "${CPU}" echo "${MSG}: ${TARGET}" > /dev/kmsg
+	taskset -c "${CPU}" echo "${MSG}: ${TARGET}" > "$NETCONS_PATH"/send_msg
 	# Wait until socat saves the file to disk
 	busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}"
 }

-- 
2.47.3
Re: [PATCH net-next 3/4] selftests/netconsole: Switch to configfs send_msg interface
Posted by Simon Horman 1 day, 7 hours ago
On Fri, Nov 28, 2025 at 06:20:48AM -0800, Breno Leitao wrote:
> Update the netcons_sysdata test to use the configfs send_msg
> attribute for message injection instead of /dev/kmsg. This
> validates the new direct message sending functionality that
> bypasses the kernel's printk infrastructure.
> 
> Only move this test to the new mechanism, given the traditional printk()
> flow continues to be default path, and the one that should be mostly
> tested.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Simon Horman <horms@kernel.org>