[LTP] [PATCH v3 2/3] lib: Add support for TDEBUG tst_res() flag

Petr Vorel pvorel@suse.cz
Thu Dec 14 13:08:26 CET 2023


Hi Cyril,

...
> > > >  	{"h",  "-h       Prints this help"},
> > > >  	{"i:", "-i n     Execute test n times"},
> > > >  	{"I:", "-I x     Execute test for n seconds"},
> > > > +	{"v",  "-v       Prints debug information"},

> > > Maybe this should now be called -d since we call it TDEBUG and that will
> > > avoid having a bit confusing parameters with both -v and -V used.

> > Yes, I didn't like the flag name does not correspond to the option.
> > I previously wrote that more tests use -d for something else:

> > $ git grep '"d:"' $(git grep -l tst_option)
> > testcases/kernel/fs/read_all/read_all.c:                {"d:", &root_dir,
> > testcases/kernel/io/ltp-aiodio/aio-stress.c:            { "d:", &str_depth, "Number of pending aio requests for each file (default 64)" },
> > testcases/network/netstress/netstress.c:                {"d:", &rpath, "Path to file where result is saved"},
> > testcases/network/nfs/nfs_stress/nfs05_make_tree.c:     {"d:", &d_arg, "Number of subdirs to generate, default: 100"},
> > testcases/network/stress/route/route-change-netlink.c:          {"d:", &d_opt, "Interface to work on (mandatory)"},

> > Hopefully all could be changed to -D in separate commits.

> Or we can use -D for TDEBUG. I suppose that we use -V for version for
> the same reason.

Good point, thanks! -D is still used, but in less C tests.

$ git grep '"D:"' $(git grep -l tst_option)
testcases/kernel/syscalls/ioctl/ioctl02.c:              {"D:", &device, "Tty device. For example, /dev/tty[0-9]"},
testcases/network/can/filter-tests/can_filter.c:                {"D:", &can_dev_name, "CAN device name"},
testcases/network/can/filter-tests/can_rcv_own_msgs.c:          {"D:", &can_dev_name, "CAN device name"},
testcases/network/netstress/netstress.c:                {"D:", &dev, "Bind to device x"},

But at least -D is not used in shell.
$ git grep "TST_OPTS=.*D"

Kind regards,
Petr


More information about the ltp mailing list