History log of /external/kmod/testsuite/testsuite.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f6dc239ed2a4d1b6abd4e52976d558cdbb730d01 21-Feb-2015 Lucas De Marchi <lucas.demarchi@intel.com> testsuite: add option to copy output from test

This is helpful while debugging the tests: copy the output from test
(both stdout and stderr) to the stdout of the parent process.
/external/kmod/testsuite/testsuite.c
03a5079f620982995ac1416540ba7e3c54121f7c 21-Feb-2015 Lucas De Marchi <lucas.demarchi@intel.com> testsuite: fix exiting with success on no output activity

If we were expecting output on stdout or stderr but the test didn't
produce any, we were incorrectly assuming the test was successful.
Now test on exit if there was activity on the monitored fd. If there
was, check also if the file size to check for output is > 0 for the
cases in which we want to assert there was no activity on certain fd.
/external/kmod/testsuite/testsuite.c
5c42c5fcedb3d1ce1de62711870e691cf768f4ca 14-Jan-2015 Lucas De Marchi <lucas.demarchi@intel.com> testsuite: prefer the use of streq()
/external/kmod/testsuite/testsuite.c
dea2dfee9b301da84dbb09cf510b8ebf2ef28fff 26-Dec-2014 Lucas De Marchi <lucas.demarchi@intel.com> 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.
/external/kmod/testsuite/testsuite.c
c5798fea9376958f62c4a7b253a9d8136c241040 09-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> testsuite: use a section to put tests in instead of array

Intead of having to declare an array of tests, tweak the definition of
DEFINE_TEST and TESTSUITE_MAIN so they know the tests are put in a
particular section of the ELF file.

This avoids the mistake of adding a test and forgetting to add it to the
array. Now once a test is defined, it's ready to run, so one less step
to define new tests.

The removal of the arrays is left for another patch so not to clutter
the diff on this one.
/external/kmod/testsuite/testsuite.c
f4e8c16291c58b71dfc622c11f3e00c818dcaebb 09-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> Move remaining functions from libkmod-util to shared
/external/kmod/testsuite/testsuite.c
c2e4286bb98c6bec77575ac0c6f862e7ddf6394f 03-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> Reorder and reorganize header files

Let the includes in the following order:

< system headers >
< libkmod >
< tool >
< local headers >
/external/kmod/testsuite/testsuite.c
96573a02208abebe4a884c0bbd0d6ecde9047f37 03-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> Move generic util functions to shared directory
/external/kmod/testsuite/testsuite.c
f988e25c6864a9467eb53262cbd718752204f80f 05-Jun-2014 Lucas De Marchi <lucas.demarchi@intel.com> testsuite: separate testcases on log
/external/kmod/testsuite/testsuite.c
d7293a1628ab14062cddb17d167fe094081a3221 30-May-2014 Lucas De Marchi <lucas.demarchi@intel.com> testsuite: Fix expected_fail parsing

If a test has expected_fail=true, it means the return code must be
different from 0 *and* the outputs must match. This way it's possible to
check if the error messages are printed as they should.
/external/kmod/testsuite/testsuite.c
f429113a473ccf3f7d98a3b3e6d6c8b6b43af5d0 30-May-2014 Lucas De Marchi <lucas.demarchi@intel.com> testsuite: Add braces
/external/kmod/testsuite/testsuite.c
88ac40840f0d13aaca844bb7198c252178968878 28-Feb-2014 Michal Marek <mmarek@suse.cz> 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.
/external/kmod/testsuite/testsuite.c
bd4e7340bcd9f95e04a6309667ffe1a5427edcaa 27-Aug-2013 John Spencer <maillist-kmod@barfooze.de> testsuite: fix usage of reserved names

stdout and stderr are names reserved for the implementation
and musl uses them rightfully as macro - and the expansion
causes (of course) unexpected results.

rename the struct members stdout to out and stderr
to err, to be 1) compliant 2) cause compilation to
succeed.

fixes build with musl libc.
/external/kmod/testsuite/testsuite.c
2ad09ccf0fc5232d9d45eb5b5b94193e64ed7ed2 12-Apr-2013 Lucas De Marchi <lucas.de.marchi@gmail.com> testsuite: errno is a positive number
/external/kmod/testsuite/testsuite.c
489c04ddecb63e12b0fe6d45efd7376762e106f1 21-Mar-2013 Lucas De Marchi <lucas.de.marchi@gmail.com> testsuite: Exit with success on signal if test has expected_fail=true
/external/kmod/testsuite/testsuite.c
e6b0e49b4ea7937a98b16f23d621244ee1a3e588 16-Jan-2013 Lucas De Marchi <lucas.demarchi@profusion.mobi> Update copyright notices
/external/kmod/testsuite/testsuite.c
3e451bfefbe1cb481fe9263a64e00926ebfaa229 04-Oct-2012 Lucas De Marchi <lucas.de.marchi@gmail.com> testsuite: allow to check generated files

This gives the test cases the ability to supply files that must be
checked after the test is run, rather than just checking stdout/stderr.

This is intended to be used with tools that generate files, like depmod.
It includes a poor's man implementation of a "check for differences in
files". Not really optimized, but it's simple enough and does what it
proposes to.
/external/kmod/testsuite/testsuite.c
e1b1ab24ab7b690343dbddd8087b17f6d722327c 10-Jul-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: re-license under LGPL
/external/kmod/testsuite/testsuite.c
34db3f2d3e2438a2c173d051a8736083f63bd8c5 06-Jun-2012 Lucas De Marchi <lucas.de.marchi@gmail.com> testsuite: allow to export custom env vars
/external/kmod/testsuite/testsuite.c
b8e344a6d2c9526a7476b78255185a96097f2629 06-Jun-2012 Lucas De Marchi <lucas.de.marchi@gmail.com> testsuite: add timeout for each test

Each test must run under 2 seconds. Ideally they should run in much less
than this; just give an arbitrary number so we don't wait forever in
case we reached an infinite loop somewhere.
/external/kmod/testsuite/testsuite.c
ed8e93fd92a95d63198fc96d59053b6be40e09f8 06-Jun-2012 Lucas De Marchi <lucas.de.marchi@gmail.com> testsuite: create additional pipe to monitor child
/external/kmod/testsuite/testsuite.c
0de690c96c15bdbe2ea04e81092b14dc8b3cfd86 24-May-2012 Lucas De Marchi <lucas.de.marchi@gmail.com> 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.
/external/kmod/testsuite/testsuite.c
050db08c57c10cb964d337c5668c4dce309b8d41 18-Feb-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> Add missing newlines

Checked with following semantic patch for the library:

// smpl
@a@
identifier virtual.func;
expression E1;
expression fmt;
position p1;
@@

func(E1, fmt@p1, ...)

@script:python b@
fmt << a.fmt;
p1 << a.p1;
@@

s = str(fmt)
if s.find("\\n") < 0:
print p1[0].file + ":" + p1[0].line

// smpl

For tools, just remove E1
/external/kmod/testsuite/testsuite.c
658e0471b39087a9914184748eb45fa1ddfc7c9e 17-Feb-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: fix color of unexpected failure
/external/kmod/testsuite/testsuite.c
f31d49c8b3a8ef863a6d6401b98b9e59a29ea53d 15-Feb-2012 Dave Reisner <dreisner@archlinux.org> testsuite: add .path member to test struct

This allows us to prepend an arbitrary item to the PATH environment
variable, meaning we can favor the binaries we just built, rather than
relying on those in the filesystem.
/external/kmod/testsuite/testsuite.c
fa0046ba83bdb6d7e7a6c5285ab0082294a2ff5a 30-Jan-2012 Dave Reisner <dreisner@archlinux.org> testsuite: allow for expected failure of tests

Adds a bool to the test struct called 'expected_fail' which can be set
to flip the logic used to determine success and failure. Messaging is
also changed to reflect an unexpected pass or expected fail. This can be
used to write tests which may represent functionality desirable for a
future release.
/external/kmod/testsuite/testsuite.c
e701e381faac8977f472b881d426335b869998dc 26-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: add GPL license
/external/kmod/testsuite/testsuite.c
f6ef5d6b5fa47ab5fa9c9275eaa38916b92ca5a4 26-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: trap calls to delete_module() including simple test
/external/kmod/testsuite/testsuite.c
d2c2b8b500bfea8882dea0b6f0b68d8531860ea8 26-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> build-sys: autotoolify build of check libraries

Many thanks to Iván Briano (sachieru@gmail.com) for pointing out this
thread in libtool mailing list:
http://www.mail-archive.com/libtool@gnu.org/msg09627.html

Passing '-rpath /nowhere' in LDFLAGS we are able to create shared libs
that are not installed.
/external/kmod/testsuite/testsuite.c
53646fc56f32b7e3e7a2a8cd1e24aeb6b3422dbc 26-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: add trap to init_module() including simple test
/external/kmod/testsuite/testsuite.c
9e3b9d2e8cf295957ddad359abc80228a027ebf7 25-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: remind users to build tools
/external/kmod/testsuite/testsuite.c
51b1d1ab28b594ab1369fe411a6be3bce40da51c 25-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: add colors to test output
/external/kmod/testsuite/testsuite.c
3dbb8dea5ff4fb23484b604d0c4b9c9ae77a03a5 25-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: match outputs of test with a known correct one

Tests may put the correct output in a file and tell testsuite to check
if it matches the output from the test running.

Testsuite compares the outputs while running the test: it creates a pipe
between parent and child; parent reads both stdout and stderr from child
and compares with the correct output.
/external/kmod/testsuite/testsuite.c
45481ee28c44c66a25015b7682f355d093c3b94a 25-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: separate child from parent
/external/kmod/testsuite/testsuite.c
6b88ef3e97cb34693adae1257adf7ac513a2baef 25-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: allow to run tests outside of top_buildir

In order to locate where the shared libs to be preloaded are we need to
reference them using abs_top_buildir. Otherwise we are limited to
running tests from there.
/external/kmod/testsuite/testsuite.c
395478cbbbd5b68a65514ee1e41e634d3d5d62db 25-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: export environment with flags and LD_PRELOAD

A certain config can add flags and each flag may be associated with a
lib to LD_PRELOAD. It's now done for uname(2), which requires uname.so
in order to trap the calls.

Other trap will be added in later commits.
/external/kmod/testsuite/testsuite.c
ed2df4e9845d58f46ec4405855036f25e8f72876 25-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: move oneshot to inside the test struct
/external/kmod/testsuite/testsuite.c
80f9e02382fa9e65ec903dd53d62f949078205ee 24-Jan-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi> testsuite: add skeleton
/external/kmod/testsuite/testsuite.c