diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2013-07-02 21:03:20 -0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2013-07-02 21:15:54 -0300 |
commit | 9de9e07da6ce6fc110b4359ff058b13b5e92dcf4 (patch) | |
tree | c83930685042d3b4c0ba68cd5c21d00355f2eae8 /testsuite | |
parent | a5cbde4bcea66e80418bada4e0aedbc26713e5ed (diff) | |
download | kmod-9de9e07da6ce6fc110b4359ff058b13b5e92dcf4.tar.gz kmod-9de9e07da6ce6fc110b4359ff058b13b5e92dcf4.tar.bz2 kmod-9de9e07da6ce6fc110b4359ff058b13b5e92dcf4.zip |
tools: Use test/kmod instead of kmod-nolib
The reason to have a kmod-nolib binary is that we need to call kmod on
test cases (or a symlink to it) and for testing things in tree. Since
we are using libtool if we are dinamically linking to libkmod what we
end up having is a shell script that (depending on the version *)
changes argv[0] to contain an "lt-" prefix. Since this screws with our
compat stuff, we had a kmod-nolib that links statically.
This all workaround works fine iff we are using one of the compat
commands, i.e. we are using the symlinks insmod, rmmod, modprobe, etc.
However if we are actually trying the kmod binary, this doesn't work
because we can't create a kmod symlink since there's already a kmod
binary.
So, completely give up on libtool fixing their mess. Now we create a
tool/test/ directory and the symlinks and kmod is put there.
* http://lists.gnu.org/archive/html/bug-libtool/2011-12/msg00023.html
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/test-depmod.c | 2 | ||||
-rw-r--r-- | testsuite/test-modinfo.c | 2 | ||||
-rw-r--r-- | testsuite/test-modprobe.c | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c index 0ea8982..64eb027 100644 --- a/testsuite/test-depmod.c +++ b/testsuite/test-depmod.c @@ -31,7 +31,7 @@ #define MODULES_ORDER_LIB_MODULES MODULES_ORDER_ROOTFS "/lib/modules/" MODULES_ORDER_UNAME static __noreturn int depmod_modules_order_for_compressed(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/depmod"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/depmod"; const char *const args[] = { progname, NULL, diff --git a/testsuite/test-modinfo.c b/testsuite/test-modinfo.c index c5934ea..430e7ad 100644 --- a/testsuite/test-modinfo.c +++ b/testsuite/test-modinfo.c @@ -28,7 +28,7 @@ static __noreturn int modinfo_jonsmodules(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/modinfo"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/modinfo"; const char *const args[] = { progname, "/ext4-i686.ko", "/ext4-ppc64.ko", "/ext4-s390x.ko", diff --git a/testsuite/test-modprobe.c b/testsuite/test-modprobe.c index cc90dae..e4a3243 100644 --- a/testsuite/test-modprobe.c +++ b/testsuite/test-modprobe.c @@ -28,7 +28,7 @@ static __noreturn int modprobe_show_depends(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/modprobe"; const char *const args[] = { progname, "--show-depends", "btusb", @@ -50,7 +50,7 @@ static DEFINE_TEST(modprobe_show_depends, static __noreturn int modprobe_show_depends2(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/modprobe"; const char *const args[] = { progname, "--show-depends", "psmouse", @@ -73,7 +73,7 @@ static DEFINE_TEST(modprobe_show_depends2, static __noreturn int modprobe_show_alias_to_none(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/modprobe"; const char *const args[] = { progname, "--show-depends", "--ignore-install", "--quiet", "psmouse", @@ -96,7 +96,7 @@ static DEFINE_TEST(modprobe_show_alias_to_none, static __noreturn int modprobe_builtin(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/modprobe"; const char *const args[] = { progname, "unix", @@ -115,7 +115,7 @@ static DEFINE_TEST(modprobe_builtin, static __noreturn int modprobe_softdep_loop(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/modprobe"; const char *const args[] = { progname, "bluetooth", @@ -135,7 +135,7 @@ static DEFINE_TEST(modprobe_softdep_loop, static __noreturn int modprobe_install_cmd_loop(const struct test *t) { - const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe"; + const char *progname = ABS_TOP_BUILDDIR "/tools/test/modprobe"; const char *const args[] = { progname, "snd-pcm", @@ -153,7 +153,7 @@ static DEFINE_TEST(modprobe_install_cmd_loop, [TC_INIT_MODULE_RETCODES] = "", }, .env_vars = (const struct keyval[]) { - { "MODPROBE", ABS_TOP_BUILDDIR "/tools/modprobe" }, + { "MODPROBE", ABS_TOP_BUILDDIR "/tools/test/modprobe" }, { } }, ); |