Complete help message adding option before desc
PATCH 1/1 Complete help message adding option before desc
Signed-off-by Andrea Cervesato <[email protected]>
--- lib/tst_test.c | 10 +++- testcases/kernel/fs/lftest/lftest.c | 2 +- testcases/kernel/fs/read_all/read_all.c | 16 +++---- testcases/kernel/io/ltp-aiodio/dio_append.c | 6 +-- .../kernel/mem/hugetlb/hugemmap/hugemmap01.c | 4 +- .../kernel/mem/hugetlb/hugemmap/hugemmap02.c | 4 +- .../kernel/mem/hugetlb/hugemmap/hugemmap04.c | 4 +- .../kernel/mem/hugetlb/hugemmap/hugemmap05.c | 6 +-- .../mem/hugetlb/hugeshmat/hugeshmat01.c | 2 +- .../mem/hugetlb/hugeshmat/hugeshmat02.c | 2 +- .../mem/hugetlb/hugeshmat/hugeshmat03.c | 2 +- .../mem/hugetlb/hugeshmctl/hugeshmctl01.c | 2 +- .../mem/hugetlb/hugeshmctl/hugeshmctl02.c | 2 +- .../mem/hugetlb/hugeshmctl/hugeshmctl03.c | 2 +- .../mem/hugetlb/hugeshmdt/hugeshmdt01.c | 2 +- .../mem/hugetlb/hugeshmget/hugeshmget01.c | 2 +- .../mem/hugetlb/hugeshmget/hugeshmget02.c | 2 +- .../mem/hugetlb/hugeshmget/hugeshmget03.c | 2 +- .../mem/hugetlb/hugeshmget/hugeshmget05.c | 2 +- testcases/kernel/mem/ksm/ksm01.c | 6 +-- testcases/kernel/mem/ksm/ksm02.c | 6 +-- testcases/kernel/mem/ksm/ksm03.c | 6 +-- testcases/kernel/mem/ksm/ksm04.c | 6 +-- testcases/kernel/mem/ksm/ksm06.c | 2 +- testcases/kernel/mem/mtest01/mtest01.c | 10 ++-- testcases/kernel/mem/mtest06/mmap3.c | 8 ++-- .../kernel/mem/tunable/overcommit_memory.c | 2 +- .../integrity/ima/src/ima_boot_aggregate.c | 4 +- .../security/integrity/ima/src/ima_mmap.c | 2 +- testcases/kernel/syscalls/execve/execve05.c | 2 +- .../kernel/syscalls/fallocate/fallocate04.c | 2 +- .../syscalls/gettimeofday/gettimeofday02.c | 2 +- testcases/kernel/syscalls/ioctl/ioctl01.c | 2 +- testcases/kernel/syscalls/ioctl/ioctl07.c | 2 +- .../perf_event_open/perf_event_open02.c | 2 +- .../kernel/syscalls/readahead/readahead02.c | 2 +- .../syscalls/request_key/request_key03.c | 2 +- testcases/kernel/syscalls/splice/splice02.c | 2 +- testcases/kernel/syscalls/splice/splice04.c | 2 +- testcases/kernel/syscalls/splice/splice05.c | 2 +- testcases/kernel/syscalls/tgkill/tgkill01.c | 2 +- testcases/kernel/tracing/pt_test/pt_test.c | 6 +-- .../network/can/filter-tests/can_filter.c | 2 +- .../can/filter-tests/can_rcv_own_msgs.c | 2 +- testcases/network/netstress/netstress.c | 48 +++++++++---------- .../network/nfs/nfs_stress/nfs05_make_tree.c | 6 +-- testcases/network/sctp/sctp_big_chunk.c | 2 +- .../stress/route/route-change-netlink.c | 12 ++--- 48 files changed, 117 insertions(+), 111 deletions(-)
lib/tst_test.c +8 -2
@@ -474,6 +474,7 @@ static struct option {static void print_help (void ) {unsigned int i; +char msg[1024 ];/* see doc/user-guide.txt, which lists also shell API variables */ fprintf (stderr,"Environment Variables\n" );
@@ -498,8 +499,13 @@ static void print_help(void)if (!tst_test->options)return ; -for (i =0 ; tst_test->options[i].optstr; i++) -fprintf (stderr,"%s\n" , tst_test->options[i].help); +for (i =0 ; tst_test->options[i].optstr; i++) { +snprintf (msg,1024 ,"-%c\t %s" , + tst_test->options[i].optstr[0 ], + tst_test->options[i].help); + +fprintf (stderr,"%s\n" , msg); + } }static void print_test_tags (void )
testcases/kernel/fs/lftest/lftest.c +1 -1
@@ -70,7 +70,7 @@ static void run(void)static struct tst_test test = { .options = (struct tst_option []) { - {"n:" , &str_bufnum,"-n COUNT Number of megabytes to write (default 100)" }, + {"n:" , &str_bufnum,"COUNT Number of megabytes to write (default 100)" }, {} }, .needs_tmpdir =1 ,
testcases/kernel/fs/read_all/read_all.c +8 -8
@@ -450,21 +450,21 @@ static void run(void)static struct tst_test test = { .options = (struct tst_option []) { {"v" , &verbose, -"-v Print information about successful reads." }, +"Print information about successful reads." }, {"q" , &quiet, -"-q Don't print file read or open errors." }, +"Don't print file read or open errors." }, {"d:" , &root_dir, -"-d path Path to the directory to read from, defaults to /sys." }, +"Path to the directory to read from, defaults to /sys." }, {"e:" , &blacklist[0 ], -"-e pattern Ignore files which match an 'extended' pattern, see fnmatch(3)." }, +"Pattern Ignore files which match an 'extended' pattern, see fnmatch(3)." }, {"r:" , &str_reads, -"-r count The number of times to schedule a file for reading." }, +"Count The number of times to schedule a file for reading." }, {"w:" , &str_max_workers, -"-w count Set the worker count limit, the default is 15." }, +"Count Set the worker count limit, the default is 15." }, {"W:" , &str_worker_count, -"-W count Override the worker count. Ignores (-w) and the processor count." }, +"Count Override the worker count. Ignores (-w) and the processor count." }, {"p" , &drop_privs, -"-p Drop privileges; switch to the nobody user." }, +"Drop privileges; switch to the nobody user." }, {} }, .setup = setup,
testcases/kernel/io/ltp-aiodio/dio_append.c +3 -3
@@ -86,9 +86,9 @@ static struct tst_test test = { .needs_tmpdir = 1, .forks_child = 1, .options = (struct tst_option []) { - {"n:" , &str_numchildren,"-n\t Number of processes (default 16)" }, - {"w:" , &str_writesize,"-w\t Write size for each append (default 64K)" }, - {"c:" , &str_appends,"-c\t Number of appends (default 1000)" }, + {"n:" , &str_numchildren,"Number of processes (default 16)" }, + {"w:" , &str_writesize,"Write size for each append (default 64K)" }, + {"c:" , &str_appends,"Number of appends (default 1000)" }, {} }, };
testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c +2 -2
@@ -91,8 +91,8 @@ static struct tst_test test = { .needs_root = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"H:" , &Hopt,"-H /.. Location of hugetlbfs, i.e. -H /var/hugetlbfs" }, - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"H:" , &Hopt,"Location of hugetlbfs, i.e. -H /var/hugetlbfs" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c +2 -2
@@ -138,8 +138,8 @@ static struct tst_test test = { .needs_root = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"H:" , &Hopt,"-H /.. Location of hugetlbfs, i.e. -H /var/hugetlbfs" }, - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"H:" , &Hopt,"Location of hugetlbfs, i.e. -H /var/hugetlbfs" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c +2 -2
@@ -109,8 +109,8 @@ static struct tst_test test = { .needs_root = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"H:" , &Hopt,"-H /.. Location of hugetlbfs, i.e. -H /var/hugetlbfs" }, - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"H:" , &Hopt,"Location of hugetlbfs, i.e. -H /var/hugetlbfs" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c +3 -3
@@ -299,9 +299,9 @@ static struct tst_test test = { .needs_root = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"s" , &opt_sysfs,"-s Setup hugepages from sysfs" }, - {"m" , &opt_shmid,"-m Reserve hugepages by shmget" }, - {"a:" , &opt_alloc,"-a Number of overcommint hugepages" }, + {"s" , &opt_sysfs,"Setup hugepages from sysfs" }, + {"m" , &opt_shmid,"Reserve hugepages by shmget" }, + {"a:" , &opt_alloc,"Number of overcommint hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c +1 -1
@@ -173,7 +173,7 @@ static struct tst_test test = { .needs_root = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .tcnt = ARRAY_SIZE(tcases),
testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c +1 -1
@@ -100,7 +100,7 @@ static struct tst_test test = { .needs_root = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .tcnt = ARRAY_SIZE(tcases),
testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c +1 -1
@@ -95,7 +95,7 @@ static struct tst_test test = { .forks_child = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .test_all = verify_hugeshmat,
testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c +1 -1
@@ -303,7 +303,7 @@ static struct tst_test test = { .needs_root = 1, .forks_child = 1, .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c +1 -1
@@ -105,7 +105,7 @@ static struct tst_test test = { .needs_root = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c +1 -1
@@ -128,7 +128,7 @@ static struct tst_test test = { .forks_child = 1, .needs_tmpdir = 1, .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c +1 -1
@@ -146,7 +146,7 @@ void cleanup(void)static struct tst_test test = { .needs_root =1 , .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c +1 -1
@@ -72,7 +72,7 @@ static void cleanup(void)static struct tst_test test = { .needs_root =1 , .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c +1 -1
@@ -91,7 +91,7 @@ void cleanup(void)static struct tst_test test = { .needs_root =1 , .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c +1 -1
@@ -90,7 +90,7 @@ static void cleanup(void)static struct tst_test test = { .needs_root =1 , .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c +1 -1
@@ -86,7 +86,7 @@ void cleanup(void)static struct tst_test test = { .needs_root =1 , .options = (struct tst_option []) { - {"s:" , &nr_opt,"-s num Set the number of the been allocated hugepages" }, + {"s:" , &nr_opt,"Set the number of the been allocated hugepages" }, {} }, .setup = setup,
testcases/kernel/mem/ksm/ksm01.c +3 -3
@@ -96,9 +96,9 @@ static struct tst_test test = { .needs_root = 1, .forks_child = 1, .options = (struct tst_option []) { - {"n:" , &opt_numstr,"-n Number of processes" }, - {"s:" , &opt_sizestr,"-s Memory allocation size in MB" }, - {"u:" , &opt_unitstr,"-u Memory allocation unit in MB" }, + {"n:" , &opt_numstr,"Number of processes" }, + {"s:" , &opt_sizestr,"Memory allocation size in MB" }, + {"u:" , &opt_unitstr,"Memory allocation unit in MB" }, {} }, .setup = setup,
testcases/kernel/mem/ksm/ksm02.c +3 -3
@@ -116,9 +116,9 @@ static struct tst_test test = { .needs_root = 1, .forks_child = 1, .options = (struct tst_option []) { - {"n:" , &opt_numstr,"-n Number of processes" }, - {"s:" , &opt_sizestr,"-s Memory allocation size in MB" }, - {"u:" , &opt_unitstr,"-u Memory allocation unit in MB" }, + {"n:" , &opt_numstr,"Number of processes" }, + {"s:" , &opt_sizestr,"Memory allocation size in MB" }, + {"u:" , &opt_unitstr,"Memory allocation unit in MB" }, {} }, .setup = setup,
testcases/kernel/mem/ksm/ksm03.c +3 -3
@@ -97,9 +97,9 @@ static struct tst_test test = { .needs_root = 1, .forks_child = 1, .options = (struct tst_option []) { - {"n:" , &opt_numstr,"-n Number of processes" }, - {"s:" , &opt_sizestr,"-s Memory allocation size in MB" }, - {"u:" , &opt_unitstr,"-u Memory allocation unit in MB" }, + {"n:" , &opt_numstr,"Number of processes" }, + {"s:" , &opt_sizestr,"Memory allocation size in MB" }, + {"u:" , &opt_unitstr,"Memory allocation unit in MB" }, {} }, .setup = setup,
testcases/kernel/mem/ksm/ksm04.c +3 -3
@@ -116,9 +116,9 @@ static struct tst_test test = { .needs_root = 1, .forks_child = 1, .options = (struct tst_option []) { - {"n:" , &opt_numstr,"-n Number of processes" }, - {"s:" , &opt_sizestr,"-s Memory allocation size in MB" }, - {"u:" , &opt_unitstr,"-u Memory allocation unit in MB" }, + {"n:" , &opt_numstr,"Number of processes" }, + {"s:" , &opt_sizestr,"Memory allocation size in MB" }, + {"u:" , &opt_unitstr,"Memory allocation unit in MB" }, {} }, .setup = setup,
testcases/kernel/mem/ksm/ksm06.c +1 -1
@@ -89,7 +89,7 @@ static void cleanup(void)static struct tst_test test = { .needs_root =1 , .options = (struct tst_option []) { - {"n:" , &n_opt,"-n x Allocate x pages memory per node" }, + {"n:" , &n_opt,"Allocate x pages memory per node" }, {} }, .setup = setup,
testcases/kernel/mem/mtest01/mtest01.c +5 -5
@@ -227,11 +227,11 @@ static void mem_test(void)static struct tst_test test = { .forks_child =1 , .options = (struct tst_option []) { - {"c:" , &opt_chunksize,"-c size of chunk in bytes to malloc on each pass" }, - {"b:" , &opt_maxbytes,"-b maximum number of bytes to allocate before stopping" }, - {"p:" , &opt_maxpercent,"-p percent of total memory used at which the program stops" }, - {"w" , &dowrite,"-w write to the memory after allocating" }, - {"v" , &verbose,"-v verbose" }, + {"c:" , &opt_chunksize,"Size of chunk in bytes to malloc on each pass" }, + {"b:" , &opt_maxbytes,"Maximum number of bytes to allocate before stopping" }, + {"p:" , &opt_maxpercent,"Percent of total memory used at which the program stops" }, + {"w" , &dowrite,"Write to the memory after allocating" }, + {"v" , &verbose,"Verbose" }, {} }, .setup = setup,
testcases/kernel/mem/mtest06/mmap3.c +4 -4
@@ -181,10 +181,10 @@ static void cleanup(void)static struct tst_test test = { .options = (struct tst_option []) { - {"l:" , &str_loops,"-l uint Number of map-write-unmap loops" }, - {"n:" , &str_threads,"-n uint Number of worker threads" }, - {"p" , &map_private,"-p Turns on MAP_PRIVATE (default MAP_SHARED)" }, - {"x:" , &str_exec_time,"-x float Execution time in hours (default 24H)" }, + {"l:" , &str_loops,"Number of map-write-unmap loops" }, + {"n:" , &str_threads,"Number of worker threads" }, + {"p" , &map_private,"Turns on MAP_PRIVATE (default MAP_SHARED)" }, + {"x:" , &str_exec_time,"float Execution time in hours (default 24H)" }, {} }, .needs_tmpdir =1 ,
testcases/kernel/mem/tunable/overcommit_memory.c +1 -1
@@ -265,7 +265,7 @@ static void calculate_total_batch_size(void)static struct tst_test test = { .needs_root =1 , .options = (struct tst_option []) { - {"R:" , &R_opt," -R n Percentage of overcommitting memory" }, + {"R:" , &R_opt,"Percentage of overcommitting memory" }, {} }, .setup = setup,
testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c +2 -2
@@ -123,8 +123,8 @@ static void do_test(void) }static struct tst_option options[] = { - {"d" , &debug,"-d enable debug" }, - {"f:" , &file,"-f x binary_bios_measurement file (required)\n" }, + {"d" , &debug,"Enable debug" }, + {"f:" , &file,"binary_bios_measurement file (required)\n" }, {NULL ,NULL ,NULL } };
testcases/kernel/security/integrity/ima/src/ima_mmap.c +1 -1
@@ -43,7 +43,7 @@ static void run(void)static struct tst_test test = { .options = (struct tst_option []) { - {"f:" , &filename,"-f file File to mmap" }, + {"f:" , &filename,"File to mmap" }, {} }, .test_all = run,
testcases/kernel/syscalls/execve/execve05.c +1 -1
@@ -80,7 +80,7 @@ static void setup(void)static struct tst_test test = { .test_all = verify_execve, .options = (struct tst_option []) { - {"n:" , &opt_nchild,"-n numbers of children" }, + {"n:" , &opt_nchild,"Numbers of children" }, {} }, .forks_child =1 ,
testcases/kernel/syscalls/fallocate/fallocate04.c +1 -1
@@ -298,7 +298,7 @@ static void cleanup(void)static struct tst_test test = { .options = (struct tst_option []) { - {"v" , &verbose,"-v Turns on verbose mode" }, + {"v" , &verbose,"Turns on verbose mode" }, {} }, .cleanup = cleanup,
testcases/kernel/syscalls/gettimeofday/gettimeofday02.c +1 -1
@@ -81,7 +81,7 @@ static void setup(void)static struct tst_test test = { .setup = setup, .options = (struct tst_option []) { - {"T:" , &str_rtime,"-T len Test iteration runtime in seconds" }, + {"T:" , &str_rtime,"Test iteration runtime in seconds" }, {}, }, .test_all = verify_gettimeofday,
testcases/kernel/syscalls/ioctl/ioctl01.c +1 -1
@@ -107,7 +107,7 @@ static struct tst_test test = { .test = verify_ioctl, .tcnt = ARRAY_SIZE(tcases), .options = (struct tst_option []) { - {"D:" , &device,"-D <tty device> : for example, /dev/tty[0-9]" }, + {"D:" , &device,"Tty device. For example, /dev/tty[0-9]" }, {} } };
testcases/kernel/syscalls/ioctl/ioctl07.c +1 -1
@@ -50,7 +50,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .options = (struct tst_option []) { - {"f:" , &s_fuzz,"-f c Fuzz factor for valid match (default 2)" }, + {"f:" , &s_fuzz,"Fuzz factor for valid match (default 2)" }, {} }, .test_all = verify_ioctl,
testcases/kernel/syscalls/perf_event_open/perf_event_open02.c +1 -1
@@ -330,7 +330,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .options = (struct tst_option []) { - {"v" , &verbose,"-v verbose output" }, + {"v" , &verbose,"Verbose output" }, {}, }, .test_all = verify,
testcases/kernel/syscalls/readahead/readahead02.c +1 -1
@@ -401,7 +401,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .options = (struct tst_option []) { - {"s:" , &opt_fsizestr,"-s testfile size (default 64MB)" }, + {"s:" , &opt_fsizestr,"Testfile size (default 64MB)" }, {} }, .test = test_readahead,
testcases/kernel/syscalls/request_key/request_key03.c +1 -1
@@ -183,7 +183,7 @@ static struct tst_test test = { .test_all = do_test, .forks_child = 1, .options = (struct tst_option []) { - {"b:" , &opt_bug,"-b Bug to test for (cve-2017-15299 or cve-2017-15951; default is both)" }, + {"b:" , &opt_bug,"Bug to test for (cve-2017-15299 or cve-2017-15951; default is both)" }, {} }, .tags = (const struct tst_tag []) {
testcases/kernel/syscalls/splice/splice02.c +1 -1
@@ -157,7 +157,7 @@ static struct tst_test test = { .forks_child = 1, .min_kver = "2.6.17", .options = (struct tst_option []) { - {"s:" , &sarg,"-s x Size of output file in bytes (default: 16x max pipe size, i.e. 1M on intel)" }, + {"s:" , &sarg,"Size of output file in bytes (default: 16x max pipe size, i.e. 1M on intel)" }, {} }, };
testcases/kernel/syscalls/splice/splice04.c +1 -1
@@ -80,7 +80,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .options = (struct tst_option []) { - {"l:" , &str_len_data,"-l <num> Length of test data (in bytes)" }, + {"l:" , &str_len_data,"Length of test data (in bytes)" }, {} }, .min_kver = "2.6.31"
testcases/kernel/syscalls/splice/splice05.c +1 -1
@@ -105,7 +105,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .options = (struct tst_option []) { - {"l:" , &str_len_data,"-l <num> Length of test data (in bytes)" }, + {"l:" , &str_len_data,"Length of test data (in bytes)" }, {} }, .min_kver = "2.6.17"
testcases/kernel/syscalls/tgkill/tgkill01.c +1 -1
@@ -122,7 +122,7 @@ static void setup(void)static struct tst_test test = { .options = (struct tst_option []) { - {"t:" , &str_threads,"-t Number of threads (default 10)" }, + {"t:" , &str_threads,"Number of threads (default 10)" }, {} }, .needs_checkpoints =1 ,
testcases/kernel/tracing/pt_test/pt_test.c +3 -3
@@ -219,9 +219,9 @@ static void cleanup(void)static struct tst_test test = { .test_all = intel_pt_trace_check, .options = (struct tst_option []) { - {"m" , &str_mode,"-m different mode, default is full mode" }, - {"e:" , &str_exclude_info,"-e exclude info, user or kernel" }, - {"b" , &str_branch_flag,"-b if disable branch trace" }, + {"m" , &str_mode,"Different mode, default is full mode" }, + {"e:" , &str_exclude_info,"Exclude info, user or kernel" }, + {"b" , &str_branch_flag,"Disable branch trace" }, {} }, .min_kver ="4.1" ,
testcases/network/can/filter-tests/can_filter.c +1 -1
@@ -172,7 +172,7 @@ static void run(unsigned int n)static struct tst_test test = { .tcnt =TC , .options = (struct tst_option []) { - {"D:" , &can_dev_name,"-D <device> CAN device name" }, + {"D:" , &can_dev_name,"CAN device name" }, {} }, .setup = setup,
testcases/network/can/filter-tests/can_rcv_own_msgs.c +1 -1
@@ -134,7 +134,7 @@ static void run(void)static struct tst_test test = { .options = (struct tst_option []) { - {"D:" , &can_dev_name,"-D <device> CAN device name" }, + {"D:" , &can_dev_name,"CAN device name" }, {} }, .setup = setup,
testcases/network/netstress/netstress.c +24 -24
54 lines not on this page · raw message
testcases/network/nfs/nfs_stress/nfs05_make_tree.c +3 -3
@@ -60,9 +60,9 @@ static int file_num = 100;static char *t_arg, *d_arg, *f_arg;static struct tst_option opts[] = { - {"t:" , &t_arg,"-t x Number of threads to generate, default: 8\n" }, - {"d:" , &d_arg,"-d x Number of subdirs to generate, default: 100\n" }, - {"f:" , &f_arg,"-f x Number of c files in each dir, default: 100\n" }, + {"t:" , &t_arg,"Number of threads to generate, default: 8" }, + {"d:" , &d_arg,"Number of subdirs to generate, default: 100" }, + {"f:" , &f_arg,"Number of c files in each dir, default: 100" }, {NULL ,NULL ,NULL } };
testcases/network/sctp/sctp_big_chunk.c +1 -1
@@ -178,7 +178,7 @@ static struct tst_test test = { .forks_child = 1, .test_all = run, .options = (struct tst_option []) { - {"a:" , &addr_param,"-a number of additional IP address params" }, + {"a:" , &addr_param,"Number of additional IP address params" }, {} }, .tags = (const struct tst_tag []) {
testcases/network/stress/route/route-change-netlink.c +6 -6
@@ -309,12 +309,12 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .options = (struct tst_option []) { - {"6" , &ipv6_opt,"-6 Use IPv6 (default is IPv4)" }, - {"c:" , &c_opt,"-c x Num loops (mandatory)" }, - {"d:" , &d_opt,"-d iface Interface to work on (mandatory)" }, - {"g:" , &g_opt,"-g x Gateway IP" }, - {"p:" , &p_opt,"-p port Rhost port (mandatory)" }, - {"r:" , &r_opt,"-r x Rhost IP (mandatory)\n\n-g, -r IP parameter can contain more IP, separated by " + {"6" , &ipv6_opt,"Use IPv6 (default is IPv4)" }, + {"c:" , &c_opt,"Num loops (mandatory)" }, + {"d:" , &d_opt,"Interface to work on (mandatory)" }, + {"g:" , &g_opt,"Gateway IP" }, + {"p:" , &p_opt,"Rhost port (mandatory)" }, + {"r:" , &r_opt,"Rhost IP (mandatory)\n\n-g, -r IP parameter can contain more IP, separated by " CHR2STR (IP_ADDR_DELIM )}, {} },
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 11 lines
static void
print_help(void)
{lib/tst_test.c +1
-0unsigned int i; +char msg[1024 ];/* see doc/user-guide.txt, which lists also shell API variables */ fprintf (stderr,"Environment Variables\n" );@@ -498,8 +499,13 @@ static void print_help(void)if (!tst_test->options)return ;
lib/tst_test.c static void print_help(void) · line 509
Quoted 10 lines
lib/tst_test.c +7
-2-for (i =0 ; tst_test->options[i].optstr; i++) -fprintf (stderr,"%s\n" , tst_test->options[i].help); +for (i =0 ; tst_test->options[i].optstr; i++) { +snprintf (msg,1024 ,"-%c\t %s" , + tst_test->options[i].optstr[0 ], + tst_test->options[i].help); + +fprintf (stderr,"%s\n" , msg); + } }
I got rid of the useless temporary buffer here and pushed, thanks.
This is actually a step into a right direction and it also makes the generated documentation a bit better too. Ideally the tst_test structure could be also improved to include the default value for the option too...
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp