zdtm: Make test_{doc,author} weak variables

Allows to override them in every test, optionally.

Signed-off-by: Dmitry Safonov <dima@arista.com>
This commit is contained in:
Dmitry Safonov 2020-01-24 11:55:00 +00:00 committed by Andrei Vagin
parent 72ff290708
commit 99346a2824
2 changed files with 5 additions and 2 deletions

View file

@ -113,8 +113,8 @@ static void helpexit(void)
exit(1);
}
const char *test_doc;
const char *test_author;
const char __attribute__((weak)) *test_doc;
const char __attribute__((weak)) *test_author;
static void prdoc(void)
{

View file

@ -155,6 +155,9 @@ struct zdtm_tcp_opts {
int flags;
};
extern const char *test_author;
extern const char *test_doc;
extern int tcp_init_server_with_opts(int family, int *port, struct zdtm_tcp_opts *opts);
extern pid_t sys_clone_unified(unsigned long flags, void *child_stack, void *parent_tid,
void *child_tid, unsigned long newtls);