Commit Graph

20 Commits

Author SHA1 Message Date
Lucas De Marchi fdafa6b655 testsuite: add tests for array implementation 2014-10-09 01:26:39 -03:00
Lucas De Marchi 5963c36da3 testsuite: Add basic tests for hash implementation
Far from complete, but already covers all internal APIs.
2014-06-06 02:24:39 -03:00
Lucas De Marchi 807c601df2 testsuite: Move test-alias to test-util
Move file so we can use the same file to test other functions from
libkmod-util.c
2013-11-18 04:35:03 -02:00
Lucas De Marchi 4111bc0fc7 gitignore: ignore files generated by Automake's testsuite
These files are generated by Automake 1.13 when running the testsuite.
2013-01-15 18:03:55 -02:00
Lucas De Marchi b0c9fc85a2 testsuite: add depmod test for modules.alias
Check if modules.alias is correctly generated from modules.order if we
have compressed modules.
2012-10-04 01:08:13 -03:00
Lucas De Marchi 0de690c96c testsuite: check if rootfs dir is dirty before running
Keep around a stamp-rootfs file that is generated together with the
rootfs. testsuite checks each test directory if its mtime is greater
than stamp's mtime, deciding if rootfs should be re-generated.
2012-06-05 00:54:47 -03:00
Lucas De Marchi e2ee7d9b7a testsuite: rename rootfs dir 2012-06-05 00:54:47 -03:00
Dan McGee c88aec70d1 test-conversion: convert test-get-dependencies to new infrastructure
The test uses the ext4 module dependencies as the testcase, checking
both the number and the names of the returned modules.
2012-05-11 08:44:55 -03:00
Dan McGee bcca1b95d2 test-conversion: convert test-blacklist to new infrastructure
Add a modprobe.conf with some blacklist entries in a test rootfs, and
then ensure our blacklist function actually cuts out the two listed
entries (and doesn't cut out the others).
2012-05-11 08:44:55 -03:00
Lucas De Marchi 452c1dde2f build-sys: copy rootfs to another directory
We can't use the rootfs directory because it breaks out-of-tree build
and in future we want to make modifications to the fake filesystem such
as adding and removing files.

We need to call "chmod -R +w" in the resulting directory because when we
distribute the source with make dist all files will be readonly.

Fix 'make distcheck'
2012-05-11 02:23:34 -03:00
Dan McGee cdbcc2481c testsuite: ship testsuite/rootfs unzipped
The current configuration is dumb in any number of ways:
1) If the rationale was for space savings, it works the opposite- the
   git repo gets more bloated because we are adding binary compressed
   blobs that share little in common with their parent, and anyone that
   wants to run the test suite has to unzip it anyway.
2) It is a pain in the butt to add new tests, and not accidentally lose
   any new rootfs you built in the directory.
3) `git status` won't help you if you are tweaking files in the rootfs
   and don't know they have been changed, or if some test did that and
   you couldn't detect it.
4) `git log` won't help you find out what is changing in the rootfs test
   directory itself when changes are made to the binary blob, such as
   new files being added or even existing files being tweaked.
5) The files just aren't that big anyway- 2.7MB unzipped.
2012-05-11 01:03:17 -03:00
Lucas De Marchi 976ea8c3ae testsuite: add tests to modprobe --show-depends
test 1 - check whether modprobe outputs the right thing when
using --show-depends is used with already loaded modules.

test 2 - check whether modprobe outputs the right thing when
using --show-depends with modules not loaded yet
2012-02-08 02:04:10 -02:00
Dan McGee 2ec79834a3 Update .gitignore files
Add kmod-* prefixed tool names, add 'tags' in root directory (for ctags,
matches cscope.out ignore already in there), and prefix tools/ entries
with '/' so they are absolute ignores and don't apply to subdirectories.
2012-02-05 02:15:20 -02:00
Lucas De Marchi a9474303a4 testsuite: add test for kmod_module_new_from_name()
Check if module names are being correctly normalized.
2012-01-30 20:05:34 -02:00
Pedro Pedruzzi 760b8968d4 testsuite: add test for function alias_normalize 2012-01-28 12:18:58 -02:00
Lucas De Marchi 95daea07f4 testsuite: add test for modinfo
These ext4 modules were sent by Jon Master so we can test the result of
modinfo with modules generated for different architectures.

They are now added to testsuite and their output tested automatically.
2012-01-26 16:05:05 -02:00
Lucas De Marchi 61e9433f7c testsuite: add simple test for list of loaded modules 2012-01-26 16:05:05 -02:00
Lucas De Marchi 6afc9cd616 testsuite: add trap to fopen() including tests 2012-01-26 16:05:04 -02:00
Lucas De Marchi eebca81e94 testsuite: test libkmod initialization 2012-01-26 16:05:04 -02:00
Lucas De Marchi 80f9e02382 testsuite: add skeleton 2012-01-26 16:05:04 -02:00