Age | Commit message (Collapse) | Author |
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
- reset the count when forking
- don't add the same handler multiple times
- don't restore the exit signal handlers in the forked helper
process
- reset the exit handler count once called to make sure we don't call
it multiple times when dying
- don't wait for the signal helper if it's gone already
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Making sure that we correctly collect the exit codes from all children
is a bit a hassle. So add another magic igt codeblock for easy forking
and joining.
Note that children are (currently at least) not allowed to call igt_skip.
Add an assert to enforce this.
v2:
- Properly propagate the exit code.
- Fix the segfault.
- Add a child int and num_children paramter to the magic codeblock as
suggested by Chris Wilson.
- Don't dump noise into stdout when a child thread fails, the parent
will do that for us already.
v3: Now with some docs.
v4: Fixup igt_waitchildren to properly reset state so it can be used
again.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For machine with split BCS/RCS rings, we also need to test whether we
correctly wait upon outstanding render work before flipping and changing
modes. This should also serve to exercise the ring selection code for
flips.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
I didn't really want to revert those, too ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This reverts commit 912a7d855600aadb937517ec5bab26bfd9b8953d.
Now fixed for real!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Longjmp creates havoc with stack variables of the current stackframe.
And since fixtures should be used to set up such variables creating
havoc isn't a great idea. With this I can revert a bunch of
bogus patches I've done to paper over this by moving stack variables
to be global.
The same issue is actually a feature for subtest blocks since subtests
should be independant anyway.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
So far we handled -h or --help arguments properly only if the test
called igt_subtest_init_parse_opts(). Fix this for igt_subtest_init()
callers too. Make sure we still don't exit for any other
unknown options, which the caller may parse with a second getopt scan.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68363
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Apparently the simple changes introduced in
commit 78865847f9fae7e590960f9836f2ec8b611a190e
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Mon Aug 19 07:23:49 2013 +0200
Commit: Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Mon Aug 19 08:09:25 2013 +0200
lib/drmtest: skip fixtures after an igt_skip
pushed the stack space requirement for run_modes over some magic limit
(I guess where the strack grow logic starts to fail, but I didn't
check). Fix this by moving the data into .bss.
Also add some asserts to check that fixtures aren't abused while at
it (i.e. the useful parts of my debug printf/assert craze).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68299
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
At the moment any command line option handling done by tests will
interfere with the option handling of the subtest interface. To fix this
add a new version of the subtest_init function accepting optional short
and long command line options. Merge these together with the subtest
interface's own long options and handle both together in the same
getopt_long call.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Also add printf support to igt_skip to make sure there's always a
reason why we fail a testcase.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
libdrm requirements are now up to it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
It's unused. Also most of our tests failed to ask for the right type
of drm fd anyway. So it's imo better to just let them fall over when
they don't get master but want it, like they already do today.
This also allows us to garbage-collect the master parameter to
drm_get_card and associated code.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
drm/* kernel test nirvana!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
With the abortable fixtures we can now correctly fail all subsequent
sutbests if we hit upon an igt_assert outside of a subtest.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This way we can just enclose all igt_skip/igt_require calls into
fixtures even when we have subtests, and still output correct SKIP
message for all of them. Wohoo, magic!
The only thing which doesn't work yet is enumerating failed subtests,
but I think that should work out on top of this.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Stop printing the debugging information of how many times we emitted a
signal.
|
|
This exercises a proposed patch from Christopher James Halse Rogers.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
(null) isn't too nice ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Useful when the testname is constructed with igt_subtest_f.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
And make the behaviour of igt_exit() a bit saner.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Since igt_skip has funny control flow we can abuse it and make it work
like a special kind of assert which automatically skips tests if a
requirement fails.
Note that in places where we have a less strict test which should
always succeed (e.g. ioctl works or isn't available) the igt_assert
should be place before the igt_require with the more strict
requirements. Otherwise we'll skip a test instead of properly failing
it.
Convert a few users of igt_skip over to igt_require to showcase its
use.
v2: s/gem_check_/gem_require_/ so that we consistently use "require"
to indicate magic check that can call igt_skip. Imo hiding the
igt_require for feature checks is ok, but for more traditional assert
like use cases an explicit igt_require might be better.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I've left the asserts as-is where they check for tests that use the
infrastructure in drmtest.c incorrectly. That way piglit's
differentiation between a failed testcase and a crashing testcase
should be more useful.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The aim is that we keep on running subtests even when a not-too-lethal
assert failed in a subtest. To make that useful also print per-subtest
test results from igt_skip|fail|success functions.
If required we can always go googletest-nuts with different types of
asserts later on, but I think for now we're good with what we have
here.
v2: Also print out proper SKIP message when skipping all subsequent
tests since a global (i.e. outside of a subtest) init step failed and
resulted in an igt_skip call.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Requested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Requested-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Now that callers must setup the longjmp target (we can't do that in
run_subtest itself since that callframe won't survive) tests shouldn't
call this function directly any more.
Make this clear by adding a __ prefix.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This way we can rip out all the skip handling from the test control flow,
and additionally (by using drmtest_retval()) even get correct exit codes.
The only tricky part is that when we only want ot skip parts of a test
(like for gem_pread and gem_pwrite) we need to split out those parts as
subtests. But no addition of control-flow is required, the set/longjmp
magic in the helpers all makes it happen.
Also we make extensive use of the behaviour of drmtest_skip to skip
all subsequent subtests if it is called outside of a subtest. This allows
us to re-flatten the control flow a lot.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If we skip a test and and fail somewhere the parent might die before the
child. So add some cleanup to handle this case. Also make sure that the
parent indeed waits for the child to die.
This is required to make the latest version of the piglit runner happy,
it tends to wait for all zombies to disappear.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Exitcode handling in igt testcases has too ugly facets in combination
with subtests:
- When individual subtest needed to be skipped for different reasons
we need to painstakingly thread this information through the test to
make sure that we still succeed if just one testcase worked (for
running it with the simple automake test runner in igt). But it also
needs to correctly report the skip exit value if only this one
skipped testcase has been run (e.g. when run with piglit or in QA's
test infrastructure).
- We'd prefer to easily skip (and also fail) subtests without
hampering other subtests. Again threading the return value of each
subtest through the code is cumbersome.
To simplify test case writing use longjmps to be able to get out of
subcases easily. But since longjmps are funny things thug it all away
into the newly added drmtest_subtest_block macro.
Note that if drmtest_skip is called outside of a subtest, but in a
testcase with subtests all subsequent subtests will be automatically
skipped.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
|
|
|
|
Needed by the next patch.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Requires us to rename a few things in the gem_flink test to avoid
variable shadowing.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This exercise the bug fixed in
commit 94a335dba34ff47cad3d6d0c29b452d43a1be3c8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed Jul 17 14:51:28 2013 +0200
drm/i915: correctly restore fences with objects attached
For fun I've also added a subtest for the inverse transition.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
So when the environment value isn't set, one can specify the default
value to return.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|