Age | Commit message (Collapse) | Author |
|
We need to have the test list generated before running the check target.
Migrated igt_command_line.sh to tests/ from lib/tests/, which allows to
building the tests and execute the script.
This would allow cleaning followed by a make check.
Also assembler/ directory needs also to be adjusted in order for this
to work.
Kept the possibility to invoke tests/igt_command_line.sh to determine
which test is failing.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
Url: https://patchwork.freedesktop.org/series/6539/
Reviewed-By: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Allow the casual user to run igt_command_line.sh to discover what make
check is complaining about.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Makefile.sources
Replace the automake specific names of listings with something that isn't
automake specific.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
To simplify and speed up running interruptible tests, use a custom
ioctl() function that control the signaling and detect when we need no
more iterations to trigger an interruption.
We use a realtime timer to inject the signal after a certain delay,
increasing the delay on every loop to try and exercise different code
paths within the function. The first delay is very short such that we
hopefully enter the kernel with a pending signal.
Clients should use
struct igt_sigiter iter = {};
while (igt_sigiter_repeat(&iter, enable_interrupts=true))
do_test()
to automatically repeat the test until we can inject no more signals
into the ioctls. This is condensed into a macro
igt_interruptible(enable_interrupts=true)
do_test();
for convenience.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
... for some cases discussed with Chris on irc. We seem to get them all
right.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Useful for creating common setup code in igt_fixture which is only
needed by a subset of tests. And since I'm a good citizen it comes
with a library testcase/example included.
v2: Make testcase nastier to ensure a subtest group SKIPS when it's
parent is skipping already. I accidentally got this right, but let's
make sure.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Checks that
- exit handlers are run only once, even when registered multiple
times.
- run in reverse order
- actually run for all ways a test could exit.
This is prep work to extend exit handlers to also work in a subtest
aware way.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Make sure our igt_assert variants are doing something that looks vaguely
like the right thing.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
Dereferencing a NULL pointer is undefined behaviour and may not always
result in a segmentation fault. Explicitly raise the SIGSEGV signal to
test handling of this signal.
v2: include signal.h (Derek Morton)
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The commit "benchmarks: Do not install to system-wide bin/" changed
the benchmark file list from bin_PROGRAMS to benchmarks_PROGRAMS.
However Android.mk was not updated, resulting in IGT failing to
build for Android.
This commit adds that change. It also adds LOCAL_MODULE_PATH to
specify where the built benchmarks should be put.
v2: I discovered that the existing definitions of LOCAL_MODULE_PATH
were creating what should have been an invalid path. Not sure how it
was ever working previously, but fixed now.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
"Timed out" isn't a terribly informative message, allow users to set
something more informative. Inspired by a request from Jesse.
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Makes using GDB better on those binaries.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
It's all about good looking APIs.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Chris had a doubt, and I was lazy and didn't do a similar test for the
quartiles/median than for the mean (test_invalidate_mean()). Plug that
gap.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
IQR is a good measure of dispersion.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
More stuff, quite useful characteristics of a dataset.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Lucky enough to have exact values, == works!
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Somewhat useful, for instance to size an histogram.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
We're going to use this simple fixture once more, might as well make a
function instead of copy/pasting code.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
This changes how we compute the variance. We want an unbiased variance
when reasoning about a sample.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Because the structure started small, I initialized every member
directly, but that means that the new fields added weren't properly
initialized (sigh!). Zero the whole thing first then.
Also, the punishment for introducing a bug should be to write the
corresponding unit test. It's not a perfect one, but I'll take it.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Sure, that's an implementation details, but make sure we do recompute
the mean when we add a new value.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Sure, it'll be freed at exit(), but might as well be a bit pedantic.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
There are several types of averages eg. mean, median and mode.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The master plan would be to get a bit more stats in it, at least the
standard deviation and confidence interval. Just need the average for
now.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Unit test to check a segfaulting subtest is handled correctly.
v2: Added script to check subtest results
v3: Removed script. Updated test to use fork to monitor return status.
v4: Added igt_segfault to .gitignore
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Add a make file for android so the unit tests can be built.
Enabled asserts for the library code so the unit test behaviour
is correct.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
All tests now respond in a consistent way such that separate lists for
tests with and without subtests are no longer necessary.
v2: fix other references to the test list
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Use a failure status code for timeout to avoid confusion between tests
that take too long to execute versus a failure due to an operation
taking longer than expected.
v2: Add a "timed out" message before exiting. (Daniel Vetter)
Fix the timeout library check by disabling hard errors in xfail
tests, since these share the same exit status as test failure.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
|
|
Remove options from argv that have been handled by getopt to allow
additional non-option parameters to be processed in the test application.
This fixes issues when using options such as --debug with tests that accept
additional non-option parameters.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Check that the subtest list is not empty if using --list-subtests
returns with an exit code of 0, and that the list is empty if it returns
with 79.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Simple tests do not support subtests, so fail if igt_subtest is used in
one.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
An exit status of 99 is reported separately in the test summary as an
error, rather than as a test failure.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The igt_command_line.sh script was moved by commit 685e577 (Move library
selftests to lib/tests), but the location of the tests and the test
lists was not updated.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The "check_" prefix ensures the test programs are not installed and are
only built when "make check" is run.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Fix distcheck issues introduced by commit 685e577 (Move library
selftests to lib/tests).
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Again they're not really igt testcases so are in the way of
running spatch unconditionally. Move them someplace else.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|