[LTP] [PATCH 2/2] tst_net.sh: Add more doc

Petr Vorel pvorel@suse.cz
Fri Jan 17 14:55:39 CET 2025


Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Example usage:

# ping01.sh
ping01 1 TINFO: Running: ping01.sh -h
ping01 1 TINFO: Tested kernel: Linux ts 6.13.0-rc4-1.g4a5c6a6-default #1 SMP PREEMPT_DYNAMIC Sun Dec 22 22:11:35 UTC 2024 (4a5c6a6) x86_64 x86_64 x86_64 GNU/Linux
Usage: /opt/ltp/testcases/bin/ping01.sh [-6]

OPTIONS (network tests only)
----------------------------
-6      IPv6 tests

Environment Variables (network tests only)
------------------------------------------
TST_NET_RHOST_RUN_DEBUG=1
Print commands used by tst_rhost_run()

LTP_NET_FEATURES_IGNORE_PERFORMANCE_FAILURE=1
Ignore performance failure and test only the network functionality in tests
which use tst_netload_compare().

OPTIONS
-------
-h      Prints this help
-i n    Execute test n times

Environment Variables
---------------------
KCONFIG_PATH         Specify kernel config file
KCONFIG_SKIP_CHECK   Skip kernel config check if variable set (not set by default)
LTPROOT              Prefix for installed LTP (default: /opt/ltp)
LTP_COLORIZE_OUTPUT  Force colorized output behaviour (y/1 always, n/0: never)
LTP_DEV              Path to the block device to be used (for .needs_device)
LTP_DEV_FS_TYPE      Filesystem used for testing (default: ext2)
LTP_SINGLE_FS_TYPE   Testing only - specifies filesystem instead all supported (for TST_ALL_FILESYSTEMS=1)
LTP_TIMEOUT_MUL      Timeout multiplier (must be a number >=1, ceiled to int)
TMPDIR               Base directory for template directory (for .needs_tmpdir, default: /tmp)


 testcases/lib/tst_net.sh | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 9a8b8d7214..4f2336537b 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -42,10 +42,29 @@ tst_net_usage()
 	if [ -n "$TST_USAGE_CALLER" ]; then
 		$TST_USAGE_CALLER
 	else
-		echo "Usage: $0 [-6]"
-		echo "OPTIONS"
+	cat << EOF
+Usage: $0 [-6]
+
+OPTIONS (network tests only)
+----------------------------
+EOF
 	fi
-	echo "-6      IPv6 tests"
+
+	cat << EOF
+-6      IPv6 tests
+
+Environment Variables (network tests only)
+------------------------------------------
+TST_NET_RHOST_RUN_DEBUG=1
+Print commands used by tst_rhost_run()
+
+LTP_NET_FEATURES_IGNORE_PERFORMANCE_FAILURE=1
+Ignore performance failure and test only the network functionality in tests
+which use tst_netload_compare().
+
+OPTIONS
+-------
+EOF
 }
 
 tst_net_remote_tmpdir()
-- 
2.47.1



More information about the ltp mailing list