Age | Commit message (Collapse) | Author |
|
All tests agree that this is a letal failure, so no point
to pass it back to callers.
Also add some igt_require calls for the drm_fd where I've
noticed that it's missing.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I was fedup with having to run my tests as root and not being able to
use my usual setup for tests that only exercise the GT part of the GPU.
Render nodes to the rescue!
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
kmstest_paint_color_alpha() just like kmstest_paint_color() except you
also get to specify the alpha channel.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
v2 (by Ben): Remove libdrm dependency since intel-gpu-tools now requires
a higher version anyway. Remove associated #ifdef ENABLE_AUB_DUMP
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Just a very quick hack cobbled together with /bin/sh and exec. We
can't use system since that does stupid things with singals ... Still
we need to whack the child process pretty hard to get rid of it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For tests that expect failures. Also apply the existing gem_set_tiling
helper a bit wider.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
When dumping the details of a mode, let's add the 3D formats the mode
supports.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
v2: Add a comment about the pitfalls around va_list handling.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The upshot is that we can share the logic to make sure the helpers
are all properly stoved again in a 2nd step.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I've fumbled the logic inversion when converting to igt_require way
too often, so lets add something for dummies like me ;-)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
|
|
We need it for mmapping to get at PROT_READ|WRITE anyway.
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>
|
|
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: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
This exercises a proposed patch from Christopher James Halse Rogers.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
abort results in "crash" test results in the piglit runner, igt gives
us neater output.
The downside is that we can now only use these in igt tests, but
that's already the case (and given their placement in drmtest.h their
intended use-case, too).
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
Just a tiny wrapper to protect global test setup/teardown code when
just listing subtests. Rolling this out over all tests with subtests
should allow us to generate the testlist with piglit as an
unpriviledged user on a non-intel system.
The aim here is to make our QA team happy who currently suffers from
this. Even more so for the prime tests since you need a system with
intel _and_ nouveau gpus to just be able to list tests.
Exemplary conversion with gem_concurrent_blt.c
Fixture is the same name other test suites like googletest use for
setup/teardown code used by multiple tests.
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>
|
|
Useful when stitching together combinatorial testnames.
v2:
- ## rules are just fun. We need 2 indirections to actually get
__LINE__ to properly expand.
- Kill stray ; which botched the logic.
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>
|
|
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>
|
|
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>
|
|
The _block postfix meant to convey that a C statement/block must
follow can be misread as the verb to block. So drop it.
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>
|
|
To simplify things add a set of gem_check_<ring> functions which take
care of this. Since I've opted for static inlines drmtest.h grew a few
more header includes which was a neat opportunity to dump a few redundant
#defines.
This kills all the skipped_all hand-rolled logic we have.
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>
|
|
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>
|
|
Doesn't do more than an if (drmtest_run_test(name)) right now, but
as soon as we get a bit of infrastructure to handle test failures and
skipping, this will get more interesting.
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>
|