summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9050cd5)
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.
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
blacklist-test_OBJDEPS := ../libmultipath/blacklist.o
blacklist-test_LIBDEPS := -ludev
blacklist-test_OBJDEPS := ../libmultipath/blacklist.o
blacklist-test_LIBDEPS := -ludev
+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) ./$< >$@
@echo == running $< ==
@LD_LIBRARY_PATH=$(multipathdir):$(mpathcmddir) ./$< >$@
clean: dep_clean
$(RM) $(TESTS:%=%-test) $(TESTS:%=%.out) $(OBJS)
clean: dep_clean
$(RM) $(TESTS:%=%-test) $(TESTS:%=%.out) $(OBJS)
static struct key_value defaults[] = {
{ "config_dir", NULL },
{ "bindings_file", NULL },
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)];
{ "detect_prio", "no" },
{ "detect_checker", "no" },
};
char buf[sizeof(tmplate) + sizeof(bindings_name)];
snprintf(buf, sizeof(buf), "%s/%s", hwt->tmpname, bindings_name);
defaults[0].value = hwt->dirname;
defaults[1].value = buf;
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);
}
write_section(hwt->config_file, "defaults",
ARRAY_SIZE(defaults), defaults);
}