Commit 34f28393 authored by Henning Schild's avatar Henning Schild Committed by Philippe Gerum

smokey/dlopen: fix testcase

The intention of another binary and fork/exec was to have a binary is
not a xenoami-binary already, to actually test dlopen.
Unfortunately a copy-paste mistake in Makefile.am resulted in dlopentest
being a xenomai application already. Therefore the dlopens tested
something they where not supposed to.

Change Makefile.am to make dlopentest a truly non-xenomai binary. And
change what it is testing accordingly. We do not support dlclose so do
not test it anymore.
Signed-off-by: Henning Schild's avatarHenning Schild <henning.schild@siemens.com>
parent 0dfccf7e
......@@ -42,16 +42,10 @@ test_PROGRAMS = dlopentest
dlopentest_SOURCES = dlopentest.c
dlopentest_CPPFLAGS = \
@XENO_USER_CFLAGS@ \
-Wno-format-security \
-DXENO_TEST_DIR='"$(XENO_TEST_DIR)"' \
-I$(top_srcdir)/include
dlopentest_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
-DXENO_TEST_DIR='"$(XENO_TEST_DIR)"'
dlopentest_LDADD = \
@XENO_CORE_LDADD@ \
@XENO_USER_LDADD@ \
-ldl
noinst_LIBRARIES = libdlopen.a
......
......@@ -75,14 +75,5 @@ int main(int argc, char *const argv[])
if (ret)
error(1, errno, "libposix_func: %s", strerror(-ret));
if (dlclose(handlep))
fprintf(stderr, "%s", dlerror());
if (dlclose(handlea))
fprintf(stderr, "%s", dlerror());
setenv("XENO_TEST_DLOPEN_NO_INIT", "1", 1);
ret = my_dlcall("libalchemy-test.so", "libalchemy_func", &handlea);
assert(ret == ENOMEM);
return 0;
}
......@@ -33,7 +33,7 @@ static size_t def_mem_pool_size = SIZE_MAX;
static int alchemy_tune(void)
{
if (getenv("XENO_TEST_DLOPEN_NO_INIT") || ran_init)
if (ran_init)
return 0;
def_mem_pool_size = get_config_tunable(mem_pool_size);
set_config_tunable(mem_pool_size, 2*def_mem_pool_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment