commit | a5bf5254ca94e0164af76d409224ea0764632d22 | [log] [tgz] |
---|---|---|
author | Cyril Hrubis <chrubis@suse.cz> | Tue Mar 14 15:25:29 2017 +0800 |
committer | Cyril Hrubis <chrubis@suse.cz> | Tue May 23 17:36:31 2017 +0200 |
tree | fae76291801319628a0e857a555c34c17a6c91ee | |
parent | d96efcf348d74718bdde273efe8a680f7397dd86 [diff] |
tst_test.c: set the test id automatically 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. This patch is based on v1 by Li Wang but I've omitted moving the parse_opts() up in the setup() since the setup() function expects that tst_test sturcture is non-NULL and may segfault if that is not true. Signed-off-by: Li Wang <liwang@redhat.com> Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Petr Vorel <pvorel@suse.cz>