From 99346a28247a3abeae094008fefa2edbc78fbb4d Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Fri, 24 Jan 2020 11:55:00 +0000 Subject: [PATCH] zdtm: Make test_{doc,author} weak variables Allows to override them in every test, optionally. Signed-off-by: Dmitry Safonov --- test/zdtm/lib/parseargs.c | 4 ++-- test/zdtm/lib/zdtmtst.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/zdtm/lib/parseargs.c b/test/zdtm/lib/parseargs.c index 7e411f6b6..d8aa4ed63 100644 --- a/test/zdtm/lib/parseargs.c +++ b/test/zdtm/lib/parseargs.c @@ -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) { diff --git a/test/zdtm/lib/zdtmtst.h b/test/zdtm/lib/zdtmtst.h index 1fbf795bf..2cd4bdd1d 100644 --- a/test/zdtm/lib/zdtmtst.h +++ b/test/zdtm/lib/zdtmtst.h @@ -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);