Commit 00f3b325 authored by Andre Carvalho's avatar Andre Carvalho Committed by Jakub Kicinski
Browse files

selftests: netconsole: ensure required log level is set on netcons_basic



This commit ensures that the required log level is set at the start of
the test iteration.

Part of the cleanup performed at the end of each test iteration resets
the log level (do_cleanup in lib_netcons.sh) to the values defined at the
time test script started. This may cause further test iterations to fail
if the default values are not sufficient.

Signed-off-by: default avatarAndre Carvalho <asantostc@gmail.com>
Reviewed-by: default avatarBreno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20251121-netcons-basic-loglevel-v1-1-577f8586159c@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d350d283
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -28,8 +28,6 @@ OUTPUT_FILE="/tmp/${TARGET}"

# Check for basic system dependency and exit if not found
check_for_dependencies
# Set current loglevel to KERN_INFO(6), and default to KERN_NOTICE(5)
echo "6 5" > /proc/sys/kernel/printk
# Remove the namespace, interfaces and netconsole target on exit
trap cleanup EXIT

@@ -39,6 +37,9 @@ do
	for IP_VERSION in "ipv6" "ipv4"
	do
		echo "Running with target mode: ${FORMAT} (${IP_VERSION})"
		# Set current loglevel to KERN_INFO(6), and default to
		# KERN_NOTICE(5)
		echo "6 5" > /proc/sys/kernel/printk
		# Create one namespace and two interfaces
		set_network "${IP_VERSION}"
		# Create a dynamic target for netconsole