Commit Graph

1275 Commits

Author SHA1 Message Date
Lucas De Marchi
1669be85de testsuite: convert test-init function to use mod-simple.ko 2015-02-03 05:19:38 -02:00
Lucas De Marchi
0e68c6258e build: let touch on directory as last step
We need to let these instructions in kmod to be the last executed ones.
Otherwise the subdirectory containing the modules could propagate up the
time access.
2015-02-03 05:19:38 -02:00
Lucas De Marchi
450c1f037b testsuite: port test-dependencies to module-playground 2015-02-03 01:12:13 -02:00
Lucas De Marchi
d2db083ab6 testsuite: make test-dependencies use DEFINE_TEST
It went missing from previous conversions.
2015-02-03 01:09:22 -02:00
Lucas De Marchi
8dddac5999 testsuite: use mod-simple.ko for search-order-same-prefix test 2015-02-03 01:09:22 -02:00
Lucas De Marchi
4002d77aff testsuite: beef up module-playground in the build system
Instead of shipping pre-compiled module, this prepares the build system
to be able to compile the necessary modules from module-playground. This
preparations starts by replacing md5.ko with our own dummy
mod-simple.ko, built from source. It works by copying the modules to
their final location while preparing the rootfs.
2015-02-03 01:09:17 -02:00
Lucas De Marchi
45f38e8c40 Update TODO 2015-01-26 23:31:04 -02:00
Caio Marcelo de Oliveira Filho
2200a448d4 testsuite: add tests for kmod_list
Some tests cover internal API that wasn't used
elsewhere. The choice here was to test and keep the
list implementation complete instead of removing it.
2015-01-26 19:20:51 -02:00
Lucas De Marchi
c677bf2c7d Revert "build: enable LTO and _FORTIFY_SOURCE with optimization"
This reverts commit 27bcc9111b.

Let the distro decide about this flag. It's relatively recent and
doesn't work well with gcc 4.[678] making the testsuite to fail.
2015-01-26 19:16:03 -02:00
Lucas De Marchi
01f9bc6dee Fix uninitialized warning
Initialize variable to NULL before calling kmod_module_new_from_lookup().

libkmod/libkmod-module.c: In function 'kmod_module_new_from_lookup.part.4.constprop':
libkmod/libkmod-module.c:192:8: warning: 'depmod' may be used uninitialized in this function [-Wmaybe-uninitialized]
   list = kmod_list_prepend(list, depmod);
        ^
libkmod/libkmod-module.c:173:23: note: 'depmod' was declared here
   struct kmod_module *depmod;
2015-01-25 23:54:05 -02:00
Lucas De Marchi
a5f799af98 build: pass --no-undefined to linker
Do not allow undefined symbols.
2015-01-25 23:29:50 -02:00
Lucas De Marchi
27bcc9111b build: enable LTO and _FORTIFY_SOURCE with optimization
If building with optimization enabled, enable LTO.
2015-01-25 23:28:46 -02:00
Caio Marcelo de Oliveira Filho
88f6ffe449 util: remove dead code in freadline_wrapped
Each loop iteration starts with 'i < size'. When i is changed
the invariant is kept by checking if 'i == size' and growing the
buffer.
2015-01-21 10:18:44 -02:00
Caio Marcelo de Oliveira Filho
211e3840fc testsuite: add more input cases to freadline_wrapped test 2015-01-21 10:18:07 -02:00
Caio Marcelo de Oliveira Filho
22f602c3c5 testsuite: add test for growing then shrinking a hash 2015-01-21 10:17:27 -02:00
Caio Marcelo de Oliveira Filho
9c2d39c735 testsuite: add test for hash_add_unique 2015-01-21 10:15:40 -02:00
Lucas De Marchi
9c6084d90c testsuite: improve coverage of shared/util.h
Add tests to improve coverage of shared/util.h functions.
2015-01-14 17:26:36 -02:00
Lucas De Marchi
2d1f8bdec0 testsuite: improve assert report 2015-01-14 16:28:16 -02:00
Lucas De Marchi
5b0436a759 tools: prefer the use of streq() 2015-01-14 14:32:09 -02:00
Lucas De Marchi
5c42c5fced testsuite: prefer the use of streq() 2015-01-14 14:32:09 -02:00
Lucas De Marchi
9b51e13b84 testsuite: test kmod_module_remove_module for failure 2015-01-14 14:32:09 -02:00
Lucas De Marchi
bf2fbabb9e shared: add STRINGFY macro 2015-01-14 14:32:09 -02:00
Lucas De Marchi
af87874f9c testsuite: fix retcodes parsing
It was not saving _modules in modules and thus all check were falling in
the fallback "consider a success if module is not in the list". Also the
name check wasn't right: replace with streq().

The parsing could be better implemented, but this is left for later.
2015-01-14 14:25:02 -02:00
Lucas De Marchi
7db094c050 tools: kmod: use streq 2015-01-14 12:35:04 -02:00
Lucas De Marchi
5ca15057e3 CODING-STYLE: add include order 2015-01-14 12:35:04 -02:00
Caio Marcelo de Oliveira Filho
ace71985fc tools: kmod: break iteration once a command is executed 2015-01-14 12:24:31 -02:00
Lucas De Marchi
895aa13478 Update TODO 2015-01-14 11:10:53 -02:00
Lucas De Marchi
c78066aef1 testsuite: add test for array_pop() 2015-01-08 17:10:18 -02:00
Lucas De Marchi
e9b0d1b40e build-sys: integrate coverage report
Just pass --enable-coverage to configure and then "make coverage" to
have the coverage report at coverage dir.
2015-01-07 23:02:34 -02:00
Lucas De Marchi
8ff7f008cd testsuite: do not overrid paths inside build
If we are accessing a file inside the build directory we should really
not trap the path. Right now this isn't important because we never do
such accesses. However it will be needed when gcov is integrated because
it dumps files to the same place where the binaries are located.
2015-01-07 19:14:20 -02:00
Lucas De Marchi
84aaaedfa6 build-sys: rename cflags/ldflags variable
Not all of them are for warnings or gc.
2015-01-02 16:32:03 -02:00
Lucas De Marchi
b35bf2a11c Fix include in python bindings
Prefix the include of libkmod in python bindings.
2015-01-02 13:11:39 -02:00
Lucas De Marchi
0a67d4f360 libkmod-elf: Remove unused variables
libkmod/libkmod-elf.c:52:34: warning: unused variable 'native_endianess'
      [-Wunused-const-variable]
static const enum kmod_elf_class native_endianess = KMOD_ELF_LSB;
2015-01-02 12:47:00 -02:00
Lucas De Marchi
f357866d97 Fix includes after change to build-sys
Make the includes be libkmod/libkmod.h for code outside of library. This
fixes the broken build after 1315123 ('build-sys: Don't add libkmod
subdirectory to include path').
2015-01-02 12:41:01 -02:00
Lucas De Marchi
dea2dfee9b Remove FSF mailing address
It has changed in the past, and these days, anyone can get a copy of the
LGPL via the web rather than by post.

Like 657a122 (Remove FSF mailing address) in libabc by Josh Tripplet,
but let the FSF website in which the license can be found.
2014-12-25 23:41:34 -02:00
Lucas De Marchi
15cfa1d19c build-sys: set -e separately, rather than putting -e in the shebang line
Like a008d76 (autogen.sh: set -e separately, rather than putting -e in
the shebang line) in libabc by Josh Triplett.
2014-12-25 23:41:34 -02:00
Lucas De Marchi
dd66ff3a14 build-sys: Don't define LIBEXECDIR
Like b2fd181 (Makefile.am: Don't define LIBEXECDIR) in libabc by Josh
Triplett.
2014-12-25 23:41:34 -02:00
Lucas De Marchi
1315123955 build-sys: Don't add libkmod subdirectory to include path
Like 05437b8 (Makefile.am: Don't add abc subdirectory to include path)
in libabc by Josh Triplett.
2014-12-25 23:41:34 -02:00
Mike Auty
fd56638aed build: Do not force diagnostics-color flag
The -fdiagnostics-color flag is only available on GCC >= 4.9, for
older versions this could raise an error in certain circumstances
(such as when using ccache).  Instead, since -fdiagnostic-color=auto
by default  in gcc-4.9, simply set the required environment variable
to the default one if it's undefined.

Based mostly on the systemd commit f44541bc by Michal Schmidt.
2014-12-17 00:41:01 -02:00
Lucas De Marchi
1dd4ff56f6 README: move mailing list information to top
It seems people are missing the information about the mailing list, so
let's move it to the top in hope it's more visible.
2014-12-13 11:55:05 -02:00
Natanael Copa
efb5bfaca9 util: fix build on systems missing strndupa
we need include shared/missing.h to be able to compile on sysmtes that
lacks strndupa.
2014-11-17 13:00:19 -02:00
Lucas De Marchi
3b058610b4 NEWS: Fix typos 2014-11-16 10:37:45 -02:00
Lucas De Marchi
f9e2167b10 kmod 19 2014-11-16 10:24:50 -02:00
Lucas De Marchi
bb72153d34 libkmod-index: move comment to include the includes 2014-11-15 11:18:54 -02:00
Lucas De Marchi
a5852e3b36 libkmod-index: remove invalid comment 2014-11-15 11:18:54 -02:00
Lucas De Marchi
778395e4e8 depmod: point to documentation in libkmod
Instead of repeating all documentation, point to the documentation
available in libkmod-index.c

This also removes INDEX_PRIORITY_MIN that was not being used.
2014-11-15 11:18:46 -02:00
Lucas De Marchi
c4cbdf8e17 libkmod-index: keep index and comments in .c
Just like other source files, keep the index and comments in the source
file rather than the header.

This also removes INDEX_PRIORITY_MIN that was never being used.
2014-10-29 11:58:12 -02:00
Tom Gundersen
27eceb2e4e static-nodes: indicate that creation of static nodes should only happen at boot
udev will only manage static nodes that exist at the time udev is started, so
creating static nodes later on will likely not behave as expected. In
particular, recreating the static nodes at run-time will reset any permissions
udev may have applied to the nodes at boot.

See <https://bugzilla.redhat.com/show_bug.cgi?id=1147248> and the discussion
following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/23795>.

Note that this requires (the yet to be released) systemd v217 or a backport
of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.
2014-10-28 16:49:46 -02:00
Lucas De Marchi
e62d8c725b strbuf: make strbuf_pushchars() a little less dumb
Do not push one char at a time. We have strlen() and memcpy() to rely
on.
2014-10-16 21:39:33 -03:00
Lucas De Marchi
8863154e44 strbuf: do not calculate next step in size on all calls
We only need to check if the new size is less or equal than the current
size. We don't really need to calculate the next step.
2014-10-16 21:22:32 -03:00