# This is a selftest to test cmdline arguments on netconsole. # It exercises loading of netconsole from cmdline instead of the dynamic # reconfiguration. This includes parsing the long netconsole= line and all the # flow through init_netconsole(). # # Author: Breno Leitao <leitao@debian.org>
# The content of kmsg will be save to the following file
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 and network interfaces
trap do_cleanup EXIT # Create one namespace and two interfaces
set_network # Create the command line for netconsole, with the configuration from the # function above
CMDLINE="$(create_cmdline_str)"
# Load the module, with the cmdline set
modprobe netconsole "${CMDLINE}"
# Listed for netconsole port inside the namespace and destination interface
listen_port_and_save_to "${OUTPUT_FILE}" & # Wait for socat to start and listen to the port.
wait_local_port_listen "${NAMESPACE}""${PORT}" udp # Send the message echo"${MSG}: ${TARGET}" > /dev/kmsg # Wait until socat saves the file to disk
busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}" # Make sure the message was received in the dst part # and exit
validate_msg "${OUTPUT_FILE}"
exit "${ksft_pass}"
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.