From: Martin Wilck <mwilck@suse.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: dm-devel@redhat.com, Martin Wilck <mwilck@suse.com>
Subject: [PATCH 01/19] tests/hwtable: set multipath_dir in local configuration
Date: Wed, 21 Nov 2018 11:18:21 +0100 [thread overview]
Message-ID: <20181121101839.30784-2-mwilck@suse.com> (raw)
In-Reply-To: <20181121101839.30784-1-mwilck@suse.com>
If internal libmultipath APIs change (such as, recently, the
checker API), test programs will fail because they'll link
with the standard system prioritizer / checker / foreign APIs.
Make sure we always link with our own shared libraries.
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
tests/Makefile | 7 ++++++-
tests/hwtable.c | 5 +++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index b37b5027..ef900866 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -26,7 +26,11 @@ hwtable-test_LIBDEPS := -ludev -lpthread -ldl
blacklist-test_OBJDEPS := ../libmultipath/blacklist.o
blacklist-test_LIBDEPS := -ludev
-%.out: %-test
+lib/libchecktur.so:
+ mkdir lib
+ ln -t lib ../libmultipath/{checkers,prioritizers,foreign}/*.so
+
+%.out: %-test lib/libchecktur.so
@echo == running $< ==
@LD_LIBRARY_PATH=$(multipathdir):$(mpathcmddir) ./$< >$@
@@ -34,6 +38,7 @@ OBJS = $(TESTS:%=%.o) test-lib.o
clean: dep_clean
$(RM) $(TESTS:%=%-test) $(TESTS:%=%.out) $(OBJS)
+ $(RM) -rf lib
.SECONDARY: $(OBJS)
diff --git a/tests/hwtable.c b/tests/hwtable.c
index 9146ecc3..1cd788ac 100644
--- a/tests/hwtable.c
+++ b/tests/hwtable.c
@@ -250,14 +250,19 @@ static void write_defaults(const struct hwt_state *hwt)
static struct key_value defaults[] = {
{ "config_dir", NULL },
{ "bindings_file", NULL },
+ { "multipath_dir", NULL },
{ "detect_prio", "no" },
{ "detect_checker", "no" },
};
char buf[sizeof(tmplate) + sizeof(bindings_name)];
+ char dirbuf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/%s", hwt->tmpname, bindings_name);
defaults[0].value = hwt->dirname;
defaults[1].value = buf;
+ assert_ptr_not_equal(getcwd(dirbuf, sizeof(dirbuf)), NULL);
+ strncat(dirbuf, "/lib", sizeof(dirbuf));
+ defaults[2].value = dirbuf;
write_section(hwt->config_file, "defaults",
ARRAY_SIZE(defaults), defaults);
}
--
2.19.1
next prev parent reply other threads:[~2018-11-21 10:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 10:18 [PATCH 00/19] multipath-tools: improve logging at -v3 Martin Wilck
2018-11-21 10:18 ` Martin Wilck [this message]
2018-11-21 10:18 ` [PATCH 02/19] tests/hwtable: adjust to new checker API Martin Wilck
2018-11-21 10:18 ` [PATCH 03/19] multipath-tools: decrease verbosity of state messages Martin Wilck
2018-11-21 10:18 ` [PATCH 04/19] libmultipath: decrease verbosity of pathinfo messages Martin Wilck
2018-11-21 10:18 ` [PATCH 05/19] libmultipath: decrease verbosity of TUR checker messages Martin Wilck
2018-11-21 10:18 ` [PATCH 06/19] libmultipath: avoid frequent messages from filter_property() Martin Wilck
2018-11-21 10:18 ` [PATCH 07/19] libmultipath: decrease log level of "disassembled" messages Martin Wilck
2018-11-21 10:18 ` [PATCH 08/19] libmultipath: decrease log level of word splitting Martin Wilck
2018-11-29 20:49 ` Benjamin Marzinski
2018-12-03 23:53 ` Benjamin Marzinski
2018-11-21 10:18 ` [PATCH 09/19] libmultipath: increase log level of map removal Martin Wilck
2018-11-21 10:18 ` [PATCH 10/19] multipathd: decrease log level of checker timing Martin Wilck
2018-11-21 10:18 ` [PATCH 11/19] libmultipath: decrease log level of "prioritizer refcount" message Martin Wilck
2018-11-21 10:18 ` [PATCH 12/19] libmpathpersist/update_map_pr: decrease log level for nop Martin Wilck
2018-11-21 10:18 ` [PATCH 13/19] libmultipath: simplify devt2devname() Martin Wilck
2018-11-21 10:18 ` [PATCH 14/19] libmultipath: decrease log level for failed VPD c9 Martin Wilck
2018-11-21 10:18 ` [PATCH 15/19] libmultipath: adopt_paths: check for size match Martin Wilck
2018-11-21 10:18 ` [PATCH 16/19] libmultipath: coalesce_paths: fix size mismatch handling Martin Wilck
2018-11-29 20:53 ` Benjamin Marzinski
2018-12-03 10:34 ` Martin Wilck
2018-11-21 10:18 ` [PATCH 17/19] tests: add unit tests for bitmask functions Martin Wilck
2018-11-21 10:18 ` [PATCH 18/19] multipathd: uev_remove_path: remove redundant orphan_paths call Martin Wilck
2018-11-21 10:18 ` [PATCH 19/19] libmultipath: improve logging from orphan_paths Martin Wilck
2018-11-29 20:54 ` [PATCH 00/19] multipath-tools: improve logging at -v3 Benjamin Marzinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181121101839.30784-2-mwilck@suse.com \
--to=mwilck@suse.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox