]> git.ipfire.org Git - thirdparty/kmod.git/log
thirdparty/kmod.git
10 years agokmod 17 v17
Lucas De Marchi [Sun, 6 Apr 2014 20:52:44 +0000 (17:52 -0300)] 
kmod 17

10 years agotestsuite: Remove duplicate test
Lucas De Marchi [Sun, 6 Apr 2014 20:43:19 +0000 (17:43 -0300)] 
testsuite: Remove duplicate test

This partially reverts ad7f175 ("Add test for depmod using search dirs
with same prefix"). Testing it twice in the inverted order doesn't
ensure we get the bug with wrong ordering.

As put by Anssi Hannula <anssi@mageia.org>:

So the bug is triggered only if the shorter name is higher-prio _and_
shorter name is traversed first. If the long name is traversed first,
the bug don't trigger with either "search" directive order (and on my
"make check" runs this is the case).

10 years agobuild-sys: enable python in bootstrap-configure
Lucas De Marchi [Sun, 6 Apr 2014 20:14:23 +0000 (17:14 -0300)] 
build-sys: enable python in bootstrap-configure

10 years agotestsuite: Warn if sysconfdir is not /etc
Michal Marek [Fri, 4 Apr 2014 09:30:07 +0000 (11:30 +0200)] 
testsuite: Warn if sysconfdir is not /etc

10 years agotestsuite: Do not run tests with *.ko.gz if zlib is not enabled
Michal Marek [Fri, 4 Apr 2014 11:05:49 +0000 (13:05 +0200)] 
testsuite: Do not run tests with *.ko.gz if zlib is not enabled

10 years agotestsuite: Uncompress most modules
Michal Marek [Fri, 4 Apr 2014 10:32:16 +0000 (12:32 +0200)] 
testsuite: Uncompress most modules

Only keep test-depmod/modules-order-compressed to test compressed module
support.

10 years agoconfig: also parse softdeps from modules
Tom Gundersen [Mon, 31 Mar 2014 13:18:51 +0000 (15:18 +0200)] 
config: also parse softdeps from modules

This information can be found in /lib/modules/`uname -r`/modules.softdep, and
has only recently been exported by the kernel.

Also remove the advice about copying modules.softdep to /lib/modules as it is
not clear how to do this correctly with several kernels installed with
potentially conflicting soft dependencies.

10 years agolibkmod: Ignore errors from softdeps
Michal Marek [Mon, 31 Mar 2014 13:18:50 +0000 (15:18 +0200)] 
libkmod: Ignore errors from softdeps

Before we had softdeps, the usual idiom was

install foo /sbin/modprobe bar; /sbin/modprobe --ignore-install foo

ignoring errors from the first modprobe invocation. This also matches
the behavior of module-init-tools' implementation of softdep.

10 years agobuild-sys: add hooks to build python bindings
Lucas De Marchi [Mon, 24 Mar 2014 11:27:19 +0000 (08:27 -0300)] 
build-sys: add hooks to build python bindings

Add --enable-python configure switch so we build the python bindings. We
also pass version.py through SED_PROCESS macro, so the version is kept
in sync with kmod.

Acked-by: Andy Grover <agrover@redhat.com>
10 years agopython: Remove unused files from import
Lucas De Marchi [Thu, 20 Mar 2014 10:33:40 +0000 (07:33 -0300)] 
python: Remove unused files from import

Acked-by: Andy Grover <agrover@redhat.com>
10 years agoMerge branch 'master' of python-kmod
Lucas De Marchi [Mon, 10 Mar 2014 07:23:19 +0000 (04:23 -0300)] 
Merge branch 'master' of python-kmod

This is python-kmod is found in git@github.com:agrover/kmod.git
d5b6f22639c077b86659828bcc78dcedc9daaa94

Its history has being rewritten to prepare for a merge:

- Every commit has been prefixed with "python: " in its commit
  message
- s-o-b's have been removed
- Every file has been moved to libkmod/python directory

Some files don't make much sense anymore and are being removed
in this merge.

Acked-by: Andy Grover <agrover@redhat.com>
10 years agopython: Issue #15: resovled by using setuptools_cython
Guy Rozendorn [Tue, 2 Apr 2013 14:46:45 +0000 (17:46 +0300)] 
python: Issue #15: resovled by using setuptools_cython

10 years agopython: Issue #15: Cython needs to be in setup_requires
Guy Rozendorn [Tue, 2 Apr 2013 13:46:23 +0000 (16:46 +0300)] 
python: Issue #15: Cython needs to be in setup_requires

We need Cython BEFORE installing kmod (done with setup_requires),
and AFTER installation - during runtime (done with install_requires)

10 years agopython: Issue #15 Cython is now a dependency
Guy Rozendorn [Tue, 2 Apr 2013 08:00:22 +0000 (11:00 +0300)] 
python: Issue #15 Cython is now a dependency

10 years agopython: update version to 0.9.1
Andy Grover [Mon, 1 Apr 2013 22:24:41 +0000 (15:24 -0700)] 
python: update version to 0.9.1

10 years agopython: Issue #13 skipping building extensions on non-Linux platforms
Guy Rozendorn [Sun, 31 Mar 2013 10:25:30 +0000 (13:25 +0300)] 
python: Issue #13 skipping building extensions on non-Linux platforms

10 years agopython: Make kmod.modprobe() raise an error if no modules found
Andy Grover [Tue, 12 Feb 2013 00:55:11 +0000 (16:55 -0800)] 
python: Make kmod.modprobe() raise an error if no modules found

Add 'quiet' option to override.

Add docstring.

10 years agopython: Add self as maintainer to setup.py
Andy Grover [Tue, 18 Dec 2012 22:47:37 +0000 (14:47 -0800)] 
python: Add self as maintainer to setup.py

10 years agopython: Correct building for python 2.6
Andy Grover [Tue, 18 Dec 2012 18:56:53 +0000 (10:56 -0800)] 
python: Correct building for python 2.6

Reported-by: Oz Nahum Tiram <nahumoz@gmail.com>
10 years agopython: add docstring to insert and remove methods
Oz [Sun, 16 Dec 2012 22:27:09 +0000 (23:27 +0100)] 
python: add docstring to insert and remove methods

10 years agopython: add docstring to rmmod
Oz [Sun, 16 Dec 2012 22:23:31 +0000 (23:23 +0100)] 
python: add docstring to rmmod

10 years agopython: update version to 0.9
Andy Grover [Fri, 14 Dec 2012 17:34:25 +0000 (09:34 -0800)] 
python: update version to 0.9

10 years agopython: Update README
Andy Grover [Fri, 14 Dec 2012 17:27:36 +0000 (09:27 -0800)] 
python: Update README

Last update changed API slightly:
* loaded_modules renamed to modules
* returns a module object instead of (name, size)

10 years agopython: MANIFEST.in: add AUTHORS to distibuted source files.
W. Trevor King [Sat, 20 Oct 2012 01:57:18 +0000 (21:57 -0400)] 
python: MANIFEST.in: add AUTHORS to distibuted source files.

10 years agopython: Ran update-copyright.py.
W. Trevor King [Sat, 20 Oct 2012 01:56:02 +0000 (21:56 -0400)] 
python: Ran update-copyright.py.

10 years agopython: .update-copyright.conf: update to pipe separators.
W. Trevor King [Sat, 20 Oct 2012 01:54:20 +0000 (21:54 -0400)] 
python: .update-copyright.conf: update to pipe separators.

This brings the config file up to speed with the following
update-copyright commit:

  commit 3c68a1a48419d8b2bbc2ce0e7f1700b996ec30e9
  Author: W. Trevor King <wking@tremily.us>
  Date:   Fri Oct 19 21:52:48 2012 -0400

    project: for consistency, also separate ignored paths with pipes.

10 years agopython: .update-copyright.conf: add MANIFEST.in to ignored files.
W. Trevor King [Sat, 20 Oct 2012 01:31:00 +0000 (21:31 -0400)] 
python: .update-copyright.conf: add MANIFEST.in to ignored files.

10 years agopython: .update-copyright.conf: add Red Hat alias for Andy Grover.
W. Trevor King [Sat, 20 Oct 2012 01:25:46 +0000 (21:25 -0400)] 
python: .update-copyright.conf: add Red Hat alias for Andy Grover.

He seems to be assigning copyright of files he writes to Red Hat.
Avoiding .mailmap so the git log will still attribute changes to him.
I'm not sure which name should go in the AUTHORS file.

10 years agopython: .update-copyright.conf: add README.rst to ignored files.
W. Trevor King [Sat, 20 Oct 2012 01:22:33 +0000 (21:22 -0400)] 
python: .update-copyright.conf: add README.rst to ignored files.

10 years agopython: .mailmap: consolidate Andy Grover email addresses.
W. Trevor King [Sat, 20 Oct 2012 01:02:25 +0000 (21:02 -0400)] 
python: .mailmap: consolidate Andy Grover email addresses.

10 years agopython: .update-copyright.conf: add copyright configuration.
W. Trevor King [Sat, 20 Oct 2012 00:16:21 +0000 (20:16 -0400)] 
python: .update-copyright.conf: add copyright configuration.

Use my external update-copyright package to maintain copyright blurbs.

http://pypi.python.org/pypi/update-copyright/

10 years agopython: module: fix versions -> info typo in Module._info_get() error message.
W. Trevor King [Fri, 19 Oct 2012 13:10:53 +0000 (09:10 -0400)] 
python: module: fix versions -> info typo in Module._info_get() error message.

10 years agopython: Initialize Kmod.mod_dir to None in __cinit__().
W. Trevor King [Fri, 19 Oct 2012 11:49:16 +0000 (07:49 -0400)] 
python: Initialize Kmod.mod_dir to None in __cinit__().

10 years agopython: Use an OrderedDict for Module.info (preserving modinfo ordering).
W. Trevor King [Fri, 19 Oct 2012 11:18:58 +0000 (07:18 -0400)] 
python: Use an OrderedDict for Module.info (preserving modinfo ordering).

10 years agopython: Add Module.info attribute.
W. Trevor King [Fri, 19 Oct 2012 05:07:42 +0000 (01:07 -0400)] 
python: Add Module.info attribute.

10 years agopython: Use Cython's libc.errno for EEXIST.
W. Trevor King [Fri, 19 Oct 2012 04:50:21 +0000 (00:50 -0400)] 
python: Use Cython's libc.errno for EEXIST.

10 years agopython: Add Module.versions attribute.
W. Trevor King [Fri, 19 Oct 2012 04:47:51 +0000 (00:47 -0400)] 
python: Add Module.versions attribute.

10 years agopython: README.rst: add .rst symlink for GitHub.
W. Trevor King [Fri, 19 Oct 2012 04:20:31 +0000 (00:20 -0400)] 
python: README.rst: add .rst symlink for GitHub.

10 years agopython: README: mention Cython dependency.
W. Trevor King [Fri, 19 Oct 2012 04:11:17 +0000 (00:11 -0400)] 
python: README: mention Cython dependency.

10 years agopython: README: cleanup reStructuredText syntax.
W. Trevor King [Fri, 19 Oct 2012 04:10:20 +0000 (00:10 -0400)] 
python: README: cleanup reStructuredText syntax.

10 years agopython: Add missing copyright blurbs.
W. Trevor King [Fri, 19 Oct 2012 04:08:00 +0000 (00:08 -0400)] 
python: Add missing copyright blurbs.

10 years agopython: Add docstrings to kmod.kmod and kmod.kmod.Kmod.
W. Trevor King [Fri, 19 Oct 2012 04:07:39 +0000 (00:07 -0400)] 
python: Add docstrings to kmod.kmod and kmod.kmod.Kmod.

10 years agopython: MANIFEST.in: add missing source to the sdist tarball.
W. Trevor King [Fri, 19 Oct 2012 04:00:53 +0000 (00:00 -0400)] 
python: MANIFEST.in: add missing source to the sdist tarball.

10 years agopython: Add additional out Module attributes (path, refcnt, ...).
W. Trevor King [Fri, 19 Oct 2012 03:57:30 +0000 (23:57 -0400)] 
python: Add additional out Module attributes (path, refcnt, ...).

10 years agopython: Convert to Cython.
W. Trevor King [Fri, 19 Oct 2012 03:30:30 +0000 (23:30 -0400)] 
python: Convert to Cython.

With Cython we get easier memory handling and Python 3 compatibility.

10 years agopython: update FSF address in COPYING and COPYING.LESSER
Andy Grover [Tue, 17 Apr 2012 18:35:30 +0000 (11:35 -0700)] 
python: update FSF address in COPYING and COPYING.LESSER

Please FSF, never move again.

10 years agopython: whitespace
Andy Grover [Mon, 19 Mar 2012 04:53:26 +0000 (21:53 -0700)] 
python: whitespace

10 years agopython: add proper error handling to loaded_modules()
Andy Grover [Mon, 19 Mar 2012 04:49:07 +0000 (21:49 -0700)] 
python: add proper error handling to loaded_modules()

We need to check the result of basically all Py* calls and cleanup
properly if they fail.

10 years agopython: Improve README's description of kmod
Andy Grover [Tue, 13 Mar 2012 22:06:37 +0000 (15:06 -0700)] 
python: Improve README's description of kmod

Based on text from kmod's README.

10 years agopython: Make setup.py version match version in .c
Andy Grover [Tue, 13 Mar 2012 22:01:03 +0000 (15:01 -0700)] 
python: Make setup.py version match version in .c

10 years agopython: Add README
Andy Grover [Tue, 13 Mar 2012 22:00:37 +0000 (15:00 -0700)] 
python: Add README

10 years agopython: More cleanup and renaming of stuff. Add docstrings.
Andy Grover [Tue, 13 Mar 2012 07:42:22 +0000 (00:42 -0700)] 
python: More cleanup and renaming of stuff. Add docstrings.

10 years agopython: Add support for listing loaded modules, modprobe, rmmod
Andy Grover [Tue, 13 Mar 2012 06:16:35 +0000 (23:16 -0700)] 
python: Add support for listing loaded modules, modprobe, rmmod

And other misc. cleanups and changes.

10 years agopython: use c99 init for struct init
Andy Grover [Mon, 12 Mar 2012 17:41:51 +0000 (10:41 -0700)] 
python: use c99 init for struct init

move casts of pyobject -> kmodobject to the functions from the struct
init.

10 years agopython: a skeleton that compiles
Andy Grover [Sun, 11 Mar 2012 00:51:49 +0000 (16:51 -0800)] 
python: a skeleton that compiles

10 years agopython: initial checkin
Andy Grover [Sat, 10 Mar 2012 01:15:42 +0000 (17:15 -0800)] 
python: initial checkin

10 years agobuild-sys: try harder to shut up compiler wrt strict-aliasing
Lucas De Marchi [Tue, 25 Mar 2014 02:50:24 +0000 (23:50 -0300)] 
build-sys: try harder to shut up compiler wrt strict-aliasing

With -Wstrict-aliasing=2 we get the following warning:

libkmod/libkmod-signature.c:124:20: note: in expansion of macro 'get_unaligned'
  sig_len = be32toh(get_unaligned(&modsig->sig_len));

However there's nothing wrong with it. modsig->sig_len is uint32_t and
get_unaligned in this case returns uint32_t. There's notstrict aliasing
violation.

10 years agolibkmod: Fix unaligned access
Lucas De Marchi [Mon, 24 Mar 2014 17:33:50 +0000 (14:33 -0300)] 
libkmod: Fix unaligned access

From Jan Engelhardt:

Program received signal SIGBUS, Bus error.
[Switching to process 11100]
0x00035278 in kmod_module_signature_info (file=0x4eeb8, sig_info=0xffffc254)
    at libkmod/libkmod-signature.c:124
124             sig_len = be32toh(modsig->sig_len);
(gdb) p modsig
$1 = (const struct module_signature *) 0xf7dfe143

modsig->sig_len can be unaligned if modsig is unaligned, so the padding
in the struct has no effect since we are mapping it to the mem buffer.

10 years agobuild-sys: Remove -Werror from CFLAGS
Lucas De Marchi [Mon, 24 Mar 2014 10:58:32 +0000 (07:58 -0300)] 
build-sys: Remove -Werror from CFLAGS

Just let the warnings be emmited, but don't fail on them.

10 years agobuild-sys: Remove bogus line causing warning
Lucas De Marchi [Thu, 20 Mar 2014 12:50:12 +0000 (09:50 -0300)] 
build-sys: Remove bogus line causing warning

./configure: line 14316: xyes: command not found

We are not using have_manpages, so remove it.

10 years agoAdd test for depmod using search dirs with same prefix
Lucas De Marchi [Wed, 19 Mar 2014 12:15:59 +0000 (09:15 -0300)] 
Add test for depmod using search dirs with same prefix

Test depmod with search dirs "foo" and "foobar". Previously to 49b33c1
("depmod: do not allow partial matches with "search" directive") we were
failing this test due to matching the prefix without checking if
it's the full dir name.

We are adding 2 tests here in order to catch the case we only pass the
test due to processing the directories in a favourable order.

10 years agodepmod: do not allow partial matches with "search" directive
Anssi Hannula [Tue, 18 Mar 2014 23:26:00 +0000 (01:26 +0200)] 
depmod: do not allow partial matches with "search" directive

Currently e.g. "search foo foobar built-in" will cause unpredictable
results if baz.ko is in both foo/ and foobar/, since "foo" in search may
match both of those directories and the preferred module therefore
depends on processing order.

Fix the code to ensure that the match is performed on full pathname
components only.

10 years agoAdd test for simple search order in depmod
Lucas De Marchi [Wed, 19 Mar 2014 10:59:38 +0000 (07:59 -0300)] 
Add test for simple search order in depmod

10 years agodepmod: fix debug print parameter order
Anssi Hannula [Tue, 18 Mar 2014 23:26:01 +0000 (01:26 +0200)] 
depmod: fix debug print parameter order

10 years agolibkmod-elf: Fix check by class in get_modversions()
Lucas De Marchi [Fri, 7 Mar 2014 04:17:10 +0000 (01:17 -0300)] 
libkmod-elf: Fix check by class in get_modversions()

Commit 51c409b ("Cache the offset of crc") unintentinally changed the
comparison "if (elf->class & KMOD_ELF_32)" to
"if (elf->class == KMOD_ELF_32)".

This has been reported by Serge Voilokov <serge0x76@gmail.com>:

On Raspberry PI elf->class equals KMOD_ELF_32|KMOD_ELF_LSB so
valid condition should be (elf->class & KMOD_ELF_32) instead of
(elf->class == KMOD_ELF_32).

This fixes "modprobe --dump-modversions" failing on 32b systems.

10 years agotestsuite: Fix uname() during glibc startup
Michal Marek [Thu, 6 Mar 2014 17:03:46 +0000 (18:03 +0100)] 
testsuite: Fix uname() during glibc startup

In a specific configuration (chroot with the linux32 personality), the
modprobe_install_cmd_loop test failed, because the bash process handling
the install command segfaulted. The backtrace showed a uname() call
during libpthread initialization, at which point the environ pointer
hadn't been initialized yet:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x080c1591 in getenv (name=<optimized out>,
    name@entry=0xf775f850 "TESTSUITE_UNAME_R") at getenv.c:81
81       for (i = 0, len = strlen (name); environ[i]; i++)
(gdb) bt
#0  0x080c1591 in getenv (name=<optimized out>,
    name@entry=0xf775f850 "TESTSUITE_UNAME_R") at getenv.c:81
#1  0xf775f754 in uname (u=u@entry=0xff946350) at testsuite/uname.c:32
#2  0xf74ffc6c in is_smp_system ()
    at ../nptl/sysdeps/unix/sysv/linux/i386/smp.h:39
#3  __pthread_initialize_minimal_internal () at nptl-init.c:460
#4  0xf74fe32c in _init () at ../sysdeps/i386/crti.S:74
#5  0x00000000 in ?? ()
(gdb) p environ
$1 = (char **) 0x0

I don't know why it only happend in the chroot, but glibc can call its
own functions and impose any restrictions before main() is started, so
we have to adapt.

Also, do not return error if there is an environment, but the
environment variable is not found. If uname() is called by kmod, then
the respective test will simply fail later. If it's something else
calling uname(), then we do not want to disturb the program.

10 years agoman: use systemd as example instead of udev
Lucas De Marchi [Thu, 6 Mar 2014 05:47:05 +0000 (02:47 -0300)] 
man: use systemd as example instead of udev

Nowadays udev doesn't create nodes in /dev anymore. This role is rather
taken by systemd-tmpfiles on early boot so reference it generically as
systemd.

10 years agoman: clarify the support to modules.dep file
Lucas De Marchi [Thu, 6 Mar 2014 05:46:27 +0000 (02:46 -0300)] 
man: clarify the support to modules.dep file

10 years agobuild-sys: Do not require xsltproc for installation of man pages
Lucas De Marchi [Mon, 24 Feb 2014 13:52:58 +0000 (10:52 -0300)] 
build-sys: Do not require xsltproc for installation of man pages

Same reason as found in this commit to systemd:

commit 4ca39b280fce3c60d2fdecbd478fd9bf7f9d3e64
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Sun Feb 23 11:21:13 2014 -0500

    configure: Do not require xsltproc for installation of man pages

    The release tarballs ship with pre-generated man pages, so we do not
    need xsltproc for a typical end-user build.

    Developers will probably have xsltproc anyway, but if not they will now
    encounter a build-time failure instead of an error in configure.

10 years agobuild-sys: add small redirecting Makefiles
Lucas De Marchi [Thu, 6 Mar 2014 04:51:33 +0000 (01:51 -0300)] 
build-sys: add small redirecting Makefiles

These redirecting makefiles simplifies compiling from some editors and
when CWD is not the root of the source tree. This is similar to what was
introduced in systemd in 340d89e ("build-sys: add small redirecting
Makefiles to simplify compilation from within emacs")

10 years agotestsuite: add test for '.' correctly parsed in param's value
Lucas De Marchi [Thu, 6 Mar 2014 04:36:02 +0000 (01:36 -0300)] 
testsuite: add test for '.' correctly parsed in param's value

In kcmdline it's possible to have a dot in the param's value. The
support for this was added in 66f3228 ("libkmod: Add support for '.' in
module parameter on kcmdline") and is needed to correctly support some
modules that depend on it.

This test was added in order to make sure the commit  aa87854
("libkmod-config: Only match dot before '=' in /proc/cmdline") didn't
break it. Although that commit  message says it's allowing to match a
dot before '=' it's actually enforcing the first part of the string to
be always in the format "<module-name>.param". Dots after '=' are still
correctly allowed.

10 years agotestsuite: add test to ignore unrelated strings in kcmdline
Lucas De Marchi [Thu, 6 Mar 2014 04:24:32 +0000 (01:24 -0300)] 
testsuite: add test to ignore unrelated strings in kcmdline

Strings unrelated to modules and modprobe should be ignored and not
appear in the output of "modprobe -c".

This adds a test for the fix provided in aa87854 ("libkmod-config: Only
match dot before '=' in /proc/cmdline").

10 years agotestsuite: give a more suitable description to test
Lucas De Marchi [Thu, 6 Mar 2014 04:14:12 +0000 (01:14 -0300)] 
testsuite: give a more suitable description to test

We are not only checking if those options are correctly parsed from
kcmdline, but if in fact they are being passed to the final
(f)init_module call. This is why we use 'modprobe --show-depends'
instead of the simpler 'modprobe -c'.

10 years agotestsuite: add test for kcmdline params with no value
Lucas De Marchi [Thu, 6 Mar 2014 04:09:30 +0000 (01:09 -0300)] 
testsuite: add test for kcmdline params with no value

Use "modprobe -c" to dump the configuration. Since we configure our
rootfs to have only a /proc/cmdline file, this should dump the knowledge
we have from its parsed content.

Test if <module>.option, without any value is correctly parsed, as fixed
in commit 493dc65 ("libkmod: Fix getting param with no value from kcmdline")

10 years agolibkmod-config: Only match dot before '=' in /proc/cmdline
Michal Marek [Wed, 5 Mar 2014 12:27:41 +0000 (13:27 +0100)] 
libkmod-config: Only match dot before '=' in /proc/cmdline

Otherwise, we also parse strings like

  BOOT_IMAGE=/boot/vmlinuz-3.12.12-57.g5f654cf-default

In practice, this is not a problem, because there is no module named
BOOT_IMAGE=/boot/vmlinuz-3. It just disturbs in modprobe -c output.

10 years agolibkmod-config,depmod: Accept special files as configuration files, too
Michal Marek [Tue, 4 Mar 2014 15:51:25 +0000 (16:51 +0100)] 
libkmod-config,depmod: Accept special files as configuration files, too

If we can open it and read it, it's good enough for us. Otherwise, we
cannot use -C /dev/null to skip the system configuration for instance:

$ ./tools/modprobe -C /dev/null -c
libkmod: ERROR libkmod/libkmod-config.c:821 conf_files_list: unsupported
file mode /dev/null: 0x21b6
...

10 years agolibkmod-module: Simplify kmod_module_insert_module()
Michal Marek [Fri, 28 Feb 2014 12:05:32 +0000 (13:05 +0100)] 
libkmod-module: Simplify kmod_module_insert_module()

Store the file and elf pointer in the kmod_module structure and have it
freed together with the module.

10 years agoAdd some tests for kernels without finit_module(2)
Michal Marek [Fri, 28 Feb 2014 12:05:31 +0000 (13:05 +0100)] 
Add some tests for kernels without finit_module(2)

10 years agotestsuite: Do not provide finit_module(2) on older kernels
Michal Marek [Fri, 28 Feb 2014 12:05:30 +0000 (13:05 +0100)] 
testsuite: Do not provide finit_module(2) on older kernels

If the test's uname -r is less that 3.8, return -ENOSYS from
finit_module(), so that the fallback is tested.

10 years agotestsuite: Add test for modprobe --force
Michal Marek [Fri, 28 Feb 2014 12:05:29 +0000 (13:05 +0100)] 
testsuite: Add test for modprobe --force

There is no check if the correct flags are passed to finit_module, but
at least we cover the respective code path in kmod.

10 years agotestsuite: Check the list of loaded modules after a test
Michal Marek [Fri, 28 Feb 2014 12:05:28 +0000 (13:05 +0100)] 
testsuite: Check the list of loaded modules after a test

Add a ->modules_loaded member to struct test, which is a comma-separated
list of modules that should be present after the test finishes. Both
missing and excess modules cause an error.

10 years agoRemove "rmmod -w" documentation and getopt entry
Stephen Kitt [Sun, 26 Jan 2014 20:00:23 +0000 (18:00 -0200)] 
Remove "rmmod -w" documentation and getopt entry

This patch removes the cmdopts declaration and the documentation. They
were leftover from the -w removal.

10 years agoman: insmod documentation fix
Lukas Berk [Thu, 23 Jan 2014 19:08:58 +0000 (14:08 -0500)] 
man: insmod documentation fix

Add comma between lsmod(8) and modinfo(8)

Signed-off-by: Lukas Berk <lberk@redhat.com>
10 years agoRemove duplicate includes
Lucas De Marchi [Tue, 21 Jan 2014 16:03:02 +0000 (14:03 -0200)] 
Remove duplicate includes

Found by
https://raw.github.com/karelzak/util-linux/master/tools/checkincludes.pl

10 years agoman: Change my contact email address
Lucas De Marchi [Thu, 2 Jan 2014 19:13:38 +0000 (17:13 -0200)] 
man: Change my contact email address

10 years agokmod 16 v16
Lucas De Marchi [Sun, 22 Dec 2013 21:45:19 +0000 (19:45 -0200)] 
kmod 16

10 years agoUse C11's noreturn
Lucas De Marchi [Tue, 17 Dec 2013 21:10:16 +0000 (19:10 -0200)] 
Use C11's noreturn

Also define noreturn w/o <stdnoreturn.h> and move it to macro.h instead
of in the testsuite.

Based on similar commit on systemd by Shawn Landden
<shawn@churchofgit.com>.

10 years agomodule: use _cleanup_free and remove useless call to free()
Lucas De Marchi [Mon, 18 Nov 2013 13:52:53 +0000 (11:52 -0200)] 
module: use _cleanup_free and remove useless call to free()

10 years agofile: use _cleanup_free_
Lucas De Marchi [Mon, 18 Nov 2013 13:43:10 +0000 (11:43 -0200)] 
file: use _cleanup_free_

10 years agoarray: avoid duplicate code to reallocate
Lucas De Marchi [Mon, 18 Nov 2013 13:28:28 +0000 (11:28 -0200)] 
array: avoid duplicate code to reallocate

10 years agoutil: Be OOM-safe and use _cleanup_free_
Lucas De Marchi [Mon, 18 Nov 2013 07:31:14 +0000 (05:31 -0200)] 
util: Be OOM-safe and use _cleanup_free_

10 years agotestsuite: add basic test for getline_wrapped
Lucas De Marchi [Mon, 18 Nov 2013 07:13:59 +0000 (05:13 -0200)] 
testsuite: add basic test for getline_wrapped

10 years agoutil: use _cleanup_free_ on path_make_absolute_cwd()
Lucas De Marchi [Thu, 14 Nov 2013 06:16:16 +0000 (04:16 -0200)] 
util: use _cleanup_free_ on path_make_absolute_cwd()

10 years agoconfig: Use _cleanup_free_
Lucas De Marchi [Thu, 14 Nov 2013 02:33:28 +0000 (00:33 -0200)] 
config: Use _cleanup_free_

10 years agoutil: Add cleanup attribute
Lucas De Marchi [Thu, 14 Nov 2013 02:19:15 +0000 (00:19 -0200)] 
util: Add cleanup attribute

10 years agotestsuite: Move test-alias to test-util
Lucas De Marchi [Mon, 18 Nov 2013 06:32:45 +0000 (04:32 -0200)] 
testsuite: Move test-alias to test-util

Move file so we can use the same file to test other functions from
libkmod-util.c

10 years agobuild: Allow disabling maintainer mode
Anders Olofsson [Mon, 11 Nov 2013 01:41:25 +0000 (23:41 -0200)] 
build: Allow disabling maintainer mode

This allows make rules for generated build files (i.e.  configure,
Makefile.in, ... ) to be skipped.  This is useful when
the source is stored without timestamps (for example in CVS or GIT).

When the build rules trigger to regenerate the build files, it tries to
use the same autotools version (currently 1.14) as was originally used
for the release.  Since many of our build machines run Debian Squeeze,
they only have autotools 1.11 available and the build fails.

Currently, we have to work around this by touching all the generated
files before building to avoid triggering the make rule. With this
patch, we would be able to just run configure with
--disable-maintainer-mode instead.  The patch sets the default to enable
to not change the default behavior.

10 years agobuild-sys: enable colored diagnostics if available
Lucas De Marchi [Sat, 26 Oct 2013 04:51:05 +0000 (02:51 -0200)] 
build-sys: enable colored diagnostics if available

10 years agoMakefile.am: add mkdir testsuite
Saul Wold [Thu, 10 Oct 2013 06:49:48 +0000 (23:49 -0700)] 
Makefile.am: add mkdir testsuite

If we are note building in the existing source tree and have disabled
dependency-tracking then the testsuite directory is not created during
the configure phase and will not exist when the cp of ROOTFS_PRISTINE
occurs, thus causing an error and fail.

10 years agoMakefile.am: Add target to all cross-compilation of testsuite
Saul Wold [Thu, 10 Oct 2013 01:09:52 +0000 (18:09 -0700)] 
Makefile.am: Add target to all cross-compilation of testsuite

The buildtest-TESTS target allows for cross-compilation of the testsuites
without the actual running of the tests that check normally does.