[LTP] [PATCH] tst_test.c: set the test id automatically

Petr Vorel pvorel@suse.cz
Tue May 23 10:29:27 CEST 2017


Hi Cyril,

> Use the argv[0] to set the tst_test->tid automatically since we fail to
> update it commonly and we end up with wrong tid due to copy&paste.

> Now it's initialized in the test setup based on argv[0]. If argv[0] is a
> path we take last element in it.
I like it, any simplification of the setup is good :-).

I'm thinking about using similar for shell variable TCID (it should be possible to know
the path of sourcing script in shell libraries via $0).


Kind regards,
Petr


More information about the ltp mailing list